Travis build: 1611

This commit is contained in:
30secondsofcode
2019-12-09 10:56:20 +00:00
parent 2c830d8a6f
commit b26bc18ec3
15 changed files with 875 additions and 873 deletions

View File

@ -14,8 +14,8 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
```js
const lengthIs4 = checkProp(l => l === 4, 'length');
lengthIs4([]); // false
lengthIs4([1,2,3,4]); // true
lengthIs4(new Set([1,2,3,4])); // false (Set uses Size, not length)
lengthIs4([1, 2, 3, 4]); // true
lengthIs4(new Set([1, 2, 3, 4])); // false (Set uses Size, not length)
const session = { user: {} };
const validUserSession = checkProps(u => u.active && !u.disabled, 'user');