UNPKG
npmc
Version:
latest (6.9.0-canary.0)
6.9.0-canary.0
6.8.0-canary.2
6.8.0-canary.1
6.8.0-canary.0
6.7.0-canary.1
6.7.0-canary.0
6.6.0-canary.1
6.6.0-canary.0
6.5.0-canary.3
6.5.0-canary.2
6.5.0-canary.0
6.4.1-canary.2
6.4.1-canary.1
6.4.1-canary.0
6.4.0-canary.0
6.2.0-canary.1
6.2.0-canary.0
6.1.0-canary.5
6.1.0-canary.4
6.1.0-canary.3
6.1.0-canary.2
6.1.0-canary.1
6.1.0-canary.0
6.0.1-canary.10
6.0.1-canary.9
6.0.1-canary.8
6.0.1-canary.7
6.0.1-canary.6
6.0.1-canary.5
6.0.1-canary.4
6.0.1-canary.3
6.0.1-canary.2
6.0.1-canary.1
6.0.1-canary.0
6.0.0-canary.3
6.0.0-canary.2
6.0.0-canary.1
6.0.0-canary.0
5.8.0-canary.4
5.8.0-canary.3
5.8.0-canary.2
5.8.0-canary.1
5.8.0-canary.0
5.7.1-canary.13
5.7.1-canary.12
5.7.1-canary.11
5.7.1-canary.10
5.7.1-canary.9
5.7.1-canary.8
5.7.1-canary.7
5.7.1-canary.6
5.7.1-canary.5
5.7.1-canary.4
5.7.1-canary.3
5.7.1-canary.2
5.7.1-canary.1
5.6.0-canary.12
5.6.0-canary.11
5.6.0-canary.10
5.6.0-canary.9
5.6.0-canary.8
5.6.0-canary.7
5.6.0-canary.6
5.6.0-canary.5
5.6.0-canary.4
5.6.0-canary.3
5.6.0-canary.2
5.6.0-canary.1
5.5.1-canary.9
5.5.1-canary.8
5.5.1-canary.7
5.5.1-canary.6
5.5.1-canary.5
5.5.1-canary.4
5.5.1-canary.3
5.5.1-canary.2
5.5.1-canary.1
5.4.2-canary.7
5.4.2-canary.6
5.4.2-canary.5
5.4.2-canary.4
5.4.2-canary.3
5.4.2-canary.2
5.4.2-canary.1
5.4.1-canary.1
5.4.0-canary.1
5.4.0-canary.0
5.3.0-canary.2
5.3.0-canary.1
5.3.0-canary.0
5.2.0-canary.2
5.2.0-canary.1
5.2.0-canary.0
5.1.0-canary.2
5.1.0-canary.1
5.0.4-canary.14
5.0.4-canary.13
5.0.4-canary.12
5.0.4-canary.11
5.0.4-canary.10
5.0.4-canary.9
5.0.4-canary.8
5.0.4-canary.7
5.0.4-canary.6
5.0.4-canary.5
5.0.4-canary.4
5.0.4-canary.3
5.0.4-canary.2
5.0.4-canary.1
5.0.3-canary.12
5.0.3-canary.11
5.0.3-canary.10
5.0.3-canary.9
5.0.3-canary.8
5.0.3-canary.7
5.0.3-canary.6
5.0.3-canary.5
5.0.3-canary.4
5.0.3-canary.3
5.0.3-canary.2
5.0.3-canary.1
5.0.2-canary.10
5.0.2-canary.9
5.0.2-canary.8
5.0.2-canary.7
5.0.1-canary.6
5.0.1-canary.5
5.0.1-canary.4
5.0.1-canary.3
5.0.1-canary.2
5.0.1-canary.1
a package manager for JavaScript
docs.npmjs.com
npm/cli
npmc
/
node_modules
/
yargs
/
lib
/
obj-filter.js
12 lines
(11 loc)
•
269 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
module
.
exports
=
function
objFilter
(
original, filter
) {
const
obj = {} filter = filter || (
(
k, v
) =>
true
)
Object
.
keys
(original || {}).
forEach
(
(
key
) =>
{
if
(
filter
(key, original[key])) { obj[key] = original[key] } })
return
obj }