Comparing version 0.2.1 to 0.2.2
10
index.js
@@ -22,3 +22,3 @@ 'use strict'; | ||
pattern = typeof pattern === 'string' ? [pattern] : pattern; | ||
options = options || {}; | ||
options = options || {matchBase: true}; | ||
@@ -43,8 +43,8 @@ var cwd = options.cwd || process.cwd(); | ||
var dir = normalized(process.cwd()); | ||
cwd = normalized(cwd); | ||
if (dir === normalized(cwd)) { | ||
return cwd; | ||
} | ||
if (dir === cwd) { | ||
return dir; | ||
} | ||
cwd = path.join(cwd, '..'); | ||
@@ -51,0 +51,0 @@ if (cwd === '..') { |
{ | ||
"name": "look-up", | ||
"description": "Like findup-sync and supports the same features but 20x-40x faster on avg.", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/jonschlinkert/look-up", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -20,2 +20,6 @@ /*! | ||
describe('lookup', function () { | ||
it('should work when no cwd is given', function () { | ||
norm(lookup('package.json')).should.eql('package.json'); | ||
}); | ||
it('should support glob patterns', function () { | ||
@@ -22,0 +26,0 @@ norm(lookup('**/c/package.json', {cwd: 'fixtures/a/b/c/d/e/f/g'})).should.eql('fixtures/a/b/c/package.json'); |
11242
136