https://github.com/unadlib/invariance
Utils for immutable data structures Records & Tuples
https://github.com/unadlib/invariance
Last synced: 6 months ago
JSON representation
Utils for immutable data structures Records & Tuples
- Host: GitHub
- URL: https://github.com/unadlib/invariance
- Owner: unadlib
- License: mit
- Created: 2022-04-08T18:35:16.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-08T19:49:17.000Z (about 4 years ago)
- Last Synced: 2025-09-27T15:41:55.257Z (9 months ago)
- Language: TypeScript
- Size: 103 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# invariance

[](https://www.npmjs.com/package/invariance)
Utils for immutable data structures [Records & Tuples](https://github.com/tc39/proposal-record-tuple)
## APIs
- `toImmutable()`
Deeply convert regular objects, arrays and JSON objects to Records or Tuples.
- `JSON.parseImmutable()`
## Interfaces
- `DeepReadonly`
- `Record`
- `Tuple`
## TODO
- [ ] Add Types from [Spec](https://tc39.es/proposal-record-tuple)
- [ ] Implement polyfill for `JSON.parseImmutable`