Permalink
Browse files

also pass along value to functions

  • Loading branch information...
1 parent b8cfc39 commit e8578c1747c77b878d1968f7c005229ee3ad8458 @substack committed Jun 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -27,7 +27,7 @@ function withFilter (nodes, fn) {
if (typeof node !== 'object') return [];
return Object.keys(node)
- .filter(fn)
+ .filter(function (key) { return fn(key, node[key]) })
.map(function (key) { return node[key] })
;
});

0 comments on commit e8578c1

Please sign in to comment.