imut
This is a lib to make any object imutable
Install
$ npm install imut
Usage
const imut = ; //Only parent object// Simple usageconst a = {};;ab = 'test'console; //undefined // With object propertyconst a = b: c: 'd' ;;ab = 'test'console; //test //With childs objectsconst a = b: c: 'd' ;;ab = 'test'console; //{ c: 'd' }
API
imut(object, withProps)
Parameter | Type | Value |
---|---|---|
object | object | any object |
withProps | boolean | true or false |