filter-keys
Advanced tools
Comparing version
'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 [](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
-50%43
2.38%0
-100%6273
-1.41%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed