diff --git a/snippets/checkProp.md b/snippets/checkProp.md index e8c4bbb11..ca0dc0545 100644 --- a/snippets/checkProp.md +++ b/snippets/checkProp.md @@ -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 -``` \ No newline at end of file +```