Auto
This commit is contained in:
9
node_modules/hashish/examples/chain.js
generated
vendored
Normal file
9
node_modules/hashish/examples/chain.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
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);
|
||||
})
|
||||
;
|
7
node_modules/hashish/examples/map.js
generated
vendored
Normal file
7
node_modules/hashish/examples/map.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
var Hash = require('hashish');
|
||||
var obj = { a : 1, b : 2, c : 3, d : 4 };
|
||||
|
||||
var mapped = Hash.map(obj, function (x) {
|
||||
return x * 10
|
||||
});
|
||||
console.dir(mapped);
|
Reference in New Issue
Block a user