mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Updated tests
- Added tests for `str` - Added tests for `pick`
This commit is contained in:
parent
f39b626373
commit
6e2fa1cb73
@ -47,12 +47,21 @@ var newObj = {
|
||||
nested: {
|
||||
value: 'Hi there!'
|
||||
}
|
||||
},
|
||||
breath: {
|
||||
value: 'Hello'
|
||||
}
|
||||
};
|
||||
|
||||
var val = dot.pick('some.nested.value', newObj);
|
||||
console.log(val);
|
||||
|
||||
// Set a new value
|
||||
val = dot.str('breath.value', 'World', newObj);
|
||||
|
||||
// Replacing with a new object
|
||||
val = dot.set('breath', { value: 'Goodbye' }, newObj);
|
||||
|
||||
// Pick & Remove the value
|
||||
val = dot.pick('some.nested.value', newObj, true);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user