Merge pull request #1049 from PlayTheFallen/patch-1

[FIX] Patch assignment error & remove whitespace
This commit is contained in:
Angelos Chalaris
2019-12-09 12:52:55 +02:00
committed by GitHub

View File

@ -12,38 +12,6 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
```
```js
const lengthIs4 = checkProp(l => l === 4, 'length');
lengthIs4([]); // false
lengthIs4([1,2,3,4]); // true
@ -57,8 +25,8 @@ validUserSession(session); // false
session.user.active = true;
validUserSession(session); // true
const noLength(l => l === undefined, 'length');
const noLength = checkProp(l => l === undefined, 'length');
noLength([]); // false
noLength({}); // true
noLength(new Set()); // true
```
```