filter-keys
Advanced tools
Comparing version 0.1.2 to 1.0.0
'use strict'; | ||
var multimatch = require('multimatch'); | ||
var mm = require('micromatch'); | ||
@@ -11,2 +11,4 @@ module.exports = function filterKeys(o, patterns) { | ||
var keys = Object.keys(o); | ||
if (!patterns) return keys; | ||
if (arguments.length === 1) { | ||
@@ -16,3 +18,3 @@ return keys; | ||
return multimatch(keys, patterns); | ||
return mm(keys, patterns); | ||
}; |
{ | ||
"name": "filter-keys", | ||
"description": "Filter the keys of an object using glob patterns. ", | ||
"version": "0.1.2", | ||
"description": "Filter the keys of an object using glob patterns.", | ||
"version": "1.0.0", | ||
"homepage": "https://github.com/jonschlinkert/filter-keys", | ||
@@ -17,8 +17,6 @@ "author": { | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/filter-keys/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/filter-keys/blob/master/LICENSE-MIT" | ||
}, | ||
"main": "index.js", | ||
@@ -31,7 +29,8 @@ "engines": { | ||
}, | ||
"dependencies": { | ||
"micromatch": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*", | ||
"should": "^4.1.0", | ||
"verb": ">= 0.2.6", | ||
"verb-tag-jscomments": ">= 0.2.0" | ||
"should": "^4.1.0" | ||
}, | ||
@@ -49,6 +48,3 @@ "keywords": [ | ||
"utility" | ||
], | ||
"dependencies": { | ||
"multimatch": "^1.0.0" | ||
} | ||
} | ||
] | ||
} |
# filter-keys [![NPM version](https://badge.fury.io/js/filter-keys.svg)](http://badge.fury.io/js/filter-keys) | ||
> Filter the keys of an object using glob patterns. | ||
> Filter the keys of an object using glob patterns. | ||
## Install | ||
#### Install with [npm](npmjs.org): | ||
## Install with [npm](npmjs.org) | ||
```bash | ||
npm i filter-keys --save-dev | ||
npm i filter-keys --save | ||
``` | ||
@@ -26,2 +25,3 @@ | ||
``` | ||
## Contributing | ||
@@ -38,3 +38,3 @@ Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue][issues]. | ||
## License | ||
Copyright (c) 2014 Jon Schlinkert, contributors. | ||
Copyright (c) 2014 Jon Schlinkert | ||
Released under the MIT license | ||
@@ -44,4 +44,4 @@ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 24, 2014._ | ||
_This file was generated by [verb](https://github.com/assemble/verb) on December 30, 2014._ | ||
[issues]: https://github.com/jonschlinkert/filter-keys/issues |
/*! | ||
* filter-keys <https://github.com/jonschlinkert/filter-keys> | ||
* | ||
* Copyright (c) 2014 Jon Schlinkert, contributors. | ||
* Copyright (c) 2014-2015, Jon Schlinkert. | ||
* Licensed under the MIT License | ||
@@ -6,0 +6,0 @@ */ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
43
0
6273
+ Addedmicromatch@^1.0.0
+ Addedansi@0.3.1(transitive)
+ Addedansi-regex@0.2.12.1.1(transitive)
+ Addedansi-styles@1.1.02.2.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-map@1.0.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedasync-array-reduce@0.2.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbenchmark@1.0.0(transitive)
+ Addedbenchmarked@0.1.5(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbraces@1.8.5(transitive)
+ Addedcamel-case@1.2.2(transitive)
+ Addedchalk@0.5.11.1.3(transitive)
+ Addedclone@1.0.4(transitive)
+ Addedclone-stats@0.0.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedexpand-brackets@0.1.5(transitive)
+ Addedexpand-range@1.8.2(transitive)
+ Addedexpand-tilde@1.2.2(transitive)
+ Addedextend-shallow@1.1.42.0.1(transitive)
+ Addedextglob@0.2.0(transitive)
+ Addedfile-reader@1.1.1(transitive)
+ Addedfilename-regex@2.0.1(transitive)
+ Addedfill-range@2.2.4(transitive)
+ Addedfor-in@0.1.81.0.2(transitive)
+ Addedfor-own@0.1.5(transitive)
+ Addedfs-exists-sync@0.1.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedglob-base@0.1.1(transitive)
+ Addedglob-parent@1.3.0(transitive)
+ Addedglob-path-regex@1.0.0(transitive)
+ Addedglobal-modules@0.2.3(transitive)
+ Addedglobal-prefix@0.1.5(transitive)
+ Addedhas-ansi@0.1.02.0.0(transitive)
+ Addedhas-glob@0.1.1(transitive)
+ Addedhas-values@0.1.4(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-extendable@0.1.1(transitive)
+ Addedis-extglob@1.0.0(transitive)
+ Addedis-glob@1.1.32.0.1(transitive)
+ Addedis-number@2.1.04.0.0(transitive)
+ Addedis-posix-bracket@0.1.1(transitive)
+ Addedis-valid-glob@0.3.0(transitive)
+ Addedis-windows@0.2.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisobject@0.2.02.1.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedkind-of@1.1.03.2.26.0.3(transitive)
+ Addedlazy-cache@1.0.42.0.2(transitive)
+ Addedlower-case@1.1.4(transitive)
+ Addedmap-files@0.8.2(transitive)
+ Addedmatched@0.4.4(transitive)
+ Addedmath-random@1.0.4(transitive)
+ Addedmicromatch@1.6.2(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedms@2.0.0(transitive)
+ Addedobject.omit@0.2.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedparse-glob@2.1.1(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpreserve@0.2.0(transitive)
+ Addedrandomatic@3.1.1(transitive)
+ Addedread-yaml@1.1.0(transitive)
+ Addedregex-cache@0.3.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedreplace-ext@0.0.1(transitive)
+ Addedresolve-dir@0.1.1(transitive)
+ Addedsentence-case@1.1.3(transitive)
+ Addedset-getter@0.1.1(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstrip-ansi@0.3.03.0.1(transitive)
+ Addedsupports-color@0.2.02.0.0(transitive)
+ Addedto-key@1.0.0(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedupper-case@1.1.3(transitive)
+ Addedvinyl@1.2.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedmultimatch@^1.0.0
- Removedarray-differ@1.0.0(transitive)
- Removedarray-union@1.0.2(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedminimatch@1.0.0(transitive)
- Removedmultimatch@1.0.1(transitive)
- Removedsigmund@1.0.1(transitive)