Comparing version 0.7.0 to 0.7.1
14
index.js
@@ -56,3 +56,3 @@ 'use strict'; | ||
while (len--) { | ||
var pattern = patterns[len]; | ||
var pattern = expandTilde(patterns[len]); | ||
if (!isGlob(pattern)) { | ||
@@ -74,7 +74,7 @@ var fp = join(cwd, pattern); | ||
// try matching against the basename in the cwd | ||
if (re.test(name)) { return file; } | ||
// try matching against the absolute path | ||
if (re.test(file)) { return file; } | ||
// try matching against the basename in the cwd, | ||
// or the absolute path | ||
if (re.test(name) || re.test(file)) { | ||
return file; | ||
} | ||
} | ||
@@ -91,2 +91,2 @@ } catch (err) { | ||
return dir + '/' + fp; | ||
} | ||
} |
{ | ||
"name": "look-up", | ||
"description": "Like findup-sync and supports the same features but 20x-40x faster on avg.", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"homepage": "https://github.com/jonschlinkert/look-up", | ||
@@ -19,4 +19,7 @@ "author": { | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/look-up/blob/master/LICENSE-MIT" | ||
"url": "https://github.com/jonschlinkert/look-up/blob/master/LICENSE" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"main": "index.js", | ||
@@ -26,5 +29,2 @@ "engines": { | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"scripts": { | ||
@@ -37,3 +37,3 @@ "test": "mocha", | ||
"is-glob": "^1.1.3", | ||
"micromatch": "^2.1.0" | ||
"micromatch": "^2.1.5" | ||
}, | ||
@@ -66,2 +66,2 @@ "devDependencies": { | ||
] | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# look-up [![NPM version](https://badge.fury.io/js/look-up.svg)](http://badge.fury.io/js/look-up) | ||
# look-up [![NPM version](https://badge.fury.io/js/look-up.svg)](http://badge.fury.io/js/look-up) [![Build Status](https://travis-ci.org/jonschlinkert/look-up.svg)](https://travis-ci.org/jonschlinkert/look-up) | ||
@@ -21,3 +21,3 @@ > Like findup-sync and supports the same features but 20x-40x faster on avg. | ||
- `pattern` **{String|Array}**: glob pattern for the file to find | ||
- `options` **{Object}**: options to pass to micromatch | ||
- `options` **{Object}**: options to pass to [micromatch] | ||
+ `cwd` **{String}**: the directory to start looking (upwards) from | ||
@@ -52,24 +52,23 @@ | ||
#1: deep-close.js | ||
findup.js x 560 ops/sec ±2.56% (84 runs sampled) | ||
lookup.js x 18,117 ops/sec ±1.34% (92 runs sampled) | ||
findup.js x 645 ops/sec ±2.04% (84 runs sampled) | ||
lookup.js x 19,939 ops/sec ±0.98% (94 runs sampled) | ||
#2: deep-far.js | ||
findup.js x 102 ops/sec ±2.25% (74 runs sampled) | ||
lookup.js x 3,269 ops/sec ±1.43% (93 runs sampled) | ||
findup.js x 85.16 ops/sec ±2.07% (73 runs sampled) | ||
lookup.js x 5,546 ops/sec ±0.74% (95 runs sampled) | ||
#3: nested.js | ||
findup.js x 219 ops/sec ±2.02% (78 runs sampled) | ||
lookup.js x 4,112 ops/sec ±1.16% (95 runs sampled) | ||
findup.js x 200 ops/sec ±2.13% (77 runs sampled) | ||
lookup.js x 19,713 ops/sec ±0.86% (98 runs sampled) | ||
#4: non-glob.js | ||
findup.js x 5,597 ops/sec ±2.11% (88 runs sampled) | ||
lookup.js x 15,197 ops/sec ±1.87% (83 runs sampled) | ||
findup.js x 5,465 ops/sec ±2.20% (87 runs sampled) | ||
lookup.js x 20,068 ops/sec ±2.05% (86 runs sampled) | ||
#5: shallow.js | ||
findup.js x 149 ops/sec ±2.23% (76 runs sampled) | ||
lookup.js x 1,771 ops/sec ±1.46% (96 runs sampled) | ||
findup.js x 135 ops/sec ±2.13% (75 runs sampled) | ||
lookup.js x 10,228 ops/sec ±0.96% (94 runs sampled) | ||
``` | ||
## Running tests | ||
Install dev dependencies: | ||
@@ -82,3 +81,3 @@ | ||
## Contributing | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/look-up/issues). | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/look-up/issues) | ||
@@ -88,3 +87,3 @@ ## Author | ||
**Jon Schlinkert** | ||
+ [github/jonschlinkert](https://github.com/jonschlinkert) | ||
@@ -99,5 +98,5 @@ + [twitter/jonschlinkert](http://twitter.com/jonschlinkert) | ||
_This file was generated by [verb](https://github.com/assemble/verb) on February 09, 2015._ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._ | ||
[micromatch]: http://github.com/isaacs/micromatch | ||
[micromatch]: https://github.com/jonschlinkert/micromatch | ||
[findup-sync]: https://github.com/cowboy/node-findup-sync |
Sorry, the diff of this file is not supported yet
7047
71
98
Updatedmicromatch@^2.1.5