hash library moved , then how should i change my old code
As hash library is moved seperate. so how should i change this code to work.
var Hash = require('traverse/hash');
Hash({ a : 1, b : 2 })
.map(function (v) {
return v + 1
})
.update({ b : 30,开发者_开发问答 c : 42 })
.filter(function (v) {
return v % 2 == 0
})
.tap(function () {
var anyC = this.some(function (value, key) {
return key == 'c'
}); // or just this.keys.some, but anyways
console.log(anyC ? "There's a C key this far." : "There's no C key this far." );
})
.items ;
var Hash = require('hashish');
精彩评论