Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

also pass along value to functions

  • Loading branch information...
commit e8578c1747c77b878d1968f7c005229ee3ad8458 1 parent b8cfc39
@substack authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  index.js
View
2  index.js
@@ -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] })
;
});
Please sign in to comment.
Something went wrong with that request. Please try again.