Warning: API Unstable (even more so than most < 1.0.0 releases)
var p =person = pvar personWithAge = personperson //= falsepersonWithAge //= truepersonWithAge //= 24
npm install persistent
Creates an empty dict, or sets the attributes if an object is passed.
var o = p// orvar you = p
Returns a new dict with the additional attribute(s).
var o = pvar changed = ochanged //= truechanged //= 4
Gets an attribute.
var o = po //= 3
Returns true or false; same as
key in object for regular objects:
var o = po //= trueo //= false
Returns a new
dict with the key removed.
var o = pvar updated = oupdated //= falseo //= true
Returns a seperate, mutable object with the same attrs.
var o = pvar trans = odelete transfooo //= true
Shares the same API as
Returns a seperate, mutable array with the same attrs.
var arr1 = parr2 = arr1arr2arr11 !== arr21 //= true
The following native methods return a new instance of p.list:
The following native methods work as expected for a regular array: