Merge pull request #1049 from PlayTheFallen/patch-1
[FIX] Patch assignment error & remove whitespace
This commit is contained in:
@ -12,38 +12,6 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
|
|||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const lengthIs4 = checkProp(l => l === 4, 'length');
|
const lengthIs4 = checkProp(l => l === 4, 'length');
|
||||||
lengthIs4([]); // false
|
lengthIs4([]); // false
|
||||||
lengthIs4([1,2,3,4]); // true
|
lengthIs4([1,2,3,4]); // true
|
||||||
@ -57,8 +25,8 @@ validUserSession(session); // false
|
|||||||
session.user.active = true;
|
session.user.active = true;
|
||||||
validUserSession(session); // true
|
validUserSession(session); // true
|
||||||
|
|
||||||
const noLength(l => l === undefined, 'length');
|
const noLength = checkProp(l => l === undefined, 'length');
|
||||||
noLength([]); // false
|
noLength([]); // false
|
||||||
noLength({}); // true
|
noLength({}); // true
|
||||||
noLength(new Set()); // true
|
noLength(new Set()); // true
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user