<div dir="ltr">By the way it looks very similar to  [s-ctypes/StructType](<a href="https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/StructType#Describing_fields" target="_blank">https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/StructType#Describing_fields</a>) Although it designed for interoperability with native code (not for code performance improvement, or better code readability), it still might be interesting for you (more links can be found at [wiki/Libffi/JavaScript](<a href="https://en.wikipedia.org/wiki/Libffi#JavaScript" target="_blank">https://en.wikipedia.org/wiki/Libffi#JavaScript</a>) )<br></div>