Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

now returns the function names

  • Loading branch information...
commit 1ee6fdcf2befa2c0bb636310b536982faafb35db 1 parent 1ae65ba
James Halliday authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 index.js
8 index.js
View
@@ -5,10 +5,8 @@ module.exports = function solve (signature, pool) {
if (pre.length === 0) return [];
var exact = Object.keys(pool)
- .map(function (name) {
- return pool[name];
- })
- .filter(function (sig) {
+ .filter(function (name) {
+ var sig = pool[name];
return signature[0] === sig[0] && signature[1] === sig[1];
})
;
@@ -16,7 +14,7 @@ module.exports = function solve (signature, pool) {
return pre.reduce(function (acc, name) {
var sig = pool[name];
var res = solve([ sig[1], signature[1] ], pool)
- .map(function (r) { return [sig].concat(r) })
+ .map(function (r) { return [name].concat(r) })
;
return acc.concat(res);
}, exact);
Please sign in to comment.
Something went wrong with that request. Please try again.