Travis build: 1066

This commit is contained in:
30secondsofcode
2019-03-17 15:13:05 +00:00
parent 3e54f32435
commit 3d96e30092
23 changed files with 129 additions and 54 deletions

View File

@ -5,10 +5,11 @@ Given a `predicate` function and a `prop` string this curried function will then
It summons `prop` on `obj` and passes it to a provided `predicate` function and returns a masked boolean
```js
const checkProp = (predicate, prop) => obj => !!predicate(obj[prop])
const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
```
```js
const lengthIs4 = checkProp(l => l === 4, 'length')
lengthIs4([]) // false
lengthIs4([1,2,3,4]) // true