DEPRECATED - use tjmehta/object-loops
var fno = require('fn-object');
var obj = {
key: 'val'
};
fno(obj).vals
.map(function (val) {
return val+'1';
})
.val()
/*
{
key: 'val1'
}
*/
var fno = require('fn-object');
var obj = {
foo: true,
bar: true,
qux: false
};
fno(obj).vals
.filter(function (val) {
return val;
})
.val()
/*
{
foo: true,
bar: true
}
*/
var fno = require('fn-object');
var obj = {
key: 'val'
};
fno(obj).keys
.map(function (key) {
return key+'1';
})
.val()
/*
{
key1: 'val'
}
*/
var fno = require('fn-object');
var obj = {
key : true,
key2: true,
foo : true
};
fno(obj).keys
.filter(function (key) {
return key.indexOf('key') === 0;
})
.val()
/*
{
key : true,
key2: true
}
*/