@berakocc/saber
v2.0.0
Published
A library for enhancing objects and arrays with immutable methods
Downloads
10
Readme
A library for creating objects and arrays with immutable methods
Install
npm install @berakocc/saber
Usage
Saber is a modular library. You can import each component either from its own source file or from saber. I'll use the second way for convenient use.
const { SaberArray } = require('@berakocc/saber')
// You can use diamond notation for giving exact types.
// Even if you don't use it, that's not a problem.
// But you will get a little warning.
const saberArray = SaberArray.create<String | Boolean | Number>([1, true])
saberArray.prepend('value')
console.log(saberArray)
Documentation
A comprehensive documantion is on Saber's Github page.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Also you can help me to improve the library by adding new issues.