chainy/node_modules/hashish/examples/chain.js

10 lines
235 B
JavaScript
Raw Normal View History

2020-01-26 19:03:32 +00:00
var Hash = require('hashish');
Hash({ a : 1, b : 2, c : 3, d : 4 })
.map(function (x) { return x * 10 })
.filter(function (x) { return x < 30 })
.forEach(function (x, key) {
console.log(key + ' => ' + x);
})
;