2.5.0 • Published 5 years ago

has-key-deep v2.5.0

Weekly downloads
10
License
MIT
Repository
github
Last release
5 years ago

hasKeyDeep

Build Status

Deep-search objects for keys. Keys can be searched by providing an array of keys, or using a dot-notiation.

Examples

Complete application

hasKeyDeep({ a: { b: { c: 1 } } }, 'a.b.c') => true
hasKeyDeep({ a: { b: { c: 1 } } }, ['a', 'b', 'c']) => true
hasKeyDeep({ a: { b: { c: 1 } } }, 'a.b.c.d') => true
hasKeyDeep({ a: { b: { c: 1 } } }, 'a.c') => false
hasKeyDeep({}, 'a') => false

Partial application

var hasABC = hasKeyDeep('a.b.c');
hasAbc({a: { b: { c: 1 } } }) => true
hasAbc({a: 1 }) => false
2.5.0

5 years ago

2.4.0

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

7 years ago

2.1.4

8 years ago

2.1.3

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago