Class LPlunge
Object
|
+--Lens
|
+--LPlunge
- class
LPlunge
- extends Lens
The dual of LHoist, it pushes the concrete argument into an object
under a specific property in the get direction, e.g.:
> p = new LPlunge('foo')
> p.get(5)
{ foo: 5 }
> p.putback({ foo: 5 }, _) // _ is anything
5
Strictness issues are as in LHoist.
Defined in lens.js
|
Field Summary |
Object |
name
|
|
Constructor Summary |
LPlunge(<String> prop, <boolean> check_prop)
|
name
Object name
LPlunge
LPlunge(<String> prop, <boolean> check_prop)
Parameters:
prop - The property under which to plunge.
check_prop - Set to true to require that the tree on putback have one and only one property -- prop. The default is false, and so checking is more lax, but missing properties will not be reconstructed at the next get.
get
Object get(c)
putback
Object putback(a, c)
Documentation generated by
JSDoc on Wed Feb 14 15:36:01 2007