We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support saving values as const values, means they will be nested-immutable, and contiguous memory as possible.
Another idea: lock array & object structures, but allow updates that will use same amount of memory.
The involved data structures cloud be more efficient, as they are for read only, so they will be optimize for read and not update.
Take into account: what about circularities, and saving part of the tree into mutable branch of objectbuffer.
A possible api to save values as const:
import { saveAsConst } from '@bnaya/objectbuffer'; const ob = createObjectBuffer(); saveAsConst(() => { ob.const = {a: 1, b: [1, 2, 3]} }); ob.const.a === 1; // true ob.const.a = 2; // THROW!!
Worth noting: https://github.com/tc39/proposal-record-tuple#examples
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Support saving values as const values, means they will be nested-immutable, and contiguous memory as possible.
Another idea: lock array & object structures, but allow updates that will use same amount of memory.
The involved data structures cloud be more efficient, as they are for read only, so they will be optimize for read and not update.
Take into account: what about circularities, and saving part of the tree into mutable branch of objectbuffer.
A possible api to save values as const:
Worth noting:
https://github.com/tc39/proposal-record-tuple#examples
The text was updated successfully, but these errors were encountered: