Skip to content

Commit

Permalink
Remove subpath, reuse path.
Browse files Browse the repository at this point in the history
Looks like the end of obvious minzip savings in the interpreter.

See #46.

File                             Raw         Min         Zip     Min/Zip
index.js                  5452/05.32  2018/01.97  1809/01.77   978/00.96
  • Loading branch information
flatheadmill committed Jul 18, 2013
1 parent 525c0e5 commit c241937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -83,8 +83,8 @@
} else if (nameOrPredicate == '.') {
candidates.push(candidate);
} else if (nameOrPredicate == '..') {
var subpath = path.slice();
candidates.unshift({ o: subpath.shift(), p: subpath, i: 0 });
path = path.slice();
candidates.unshift({ o: path.shift(), p: path, i: 0 });
} else if (Array.isArray(object)) {
for (j = object.length - 1; j > -1; --j) {
stack.unshift({ o: object[j], p: [ object ].concat(path) });
Expand Down

0 comments on commit c241937

Please sign in to comment.