GitHub - madeinfree/immutable-js-tools: util tools for immutable.js (original) (raw)

Immutable Js Tools

Installation

Test Version 0.0.5

npm install --save immutable-js-tools

What Is Immutable Js ?

if you are in the beginning with immutable, you have to go here to understanding it.

What Is Immutable Js Tools ?

Do you always diving in immutable hell ? This maybe help you to use it clearly.

Quick Start

import Im from 'immutable'; import ImUtil from './src/'; const obj = { items: [ { id: 1, item: 'bar' } ], selected: [] } const _D = new ImUtil(Im.fromJS(obj)); let _O; /*

/*

/*

/*

Document

Immutable.js document

API

- Immutable.Map

- Immutable.List

- Immutable.Set

- little helper

- basic getter & setter

- basic validation: static method

- auto bind Functions of Sugar method helper

const _D = new ImUtil(Im.fromJS(obj)); const obj = { items: [ { id: 1, item: 'bar' } ], selected: [1, 2, 3] } //Functions of Sugar console.log(_D.getItems().toJS()); // => [ { id: 1, item: 'bar' } ] console.log(_D.getSelected().toJS()); // => [1, 2, 3]

TODO

License

MIT