add missing parens

This commit is contained in:
Robert Mennell
2019-03-17 08:09:25 -07:00
committed by GitHub
parent 64d627ddb8
commit db377f79ca

View File

@ -12,7 +12,7 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop])
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(new Set([1,2,3,4])) // false (Set uses Size, not length)
const session = { user: {} }
const validUserSession = checkProps(u => u.active && !u.disabled, 'user')