diff --git a/README.md b/README.md index 5d8948098..40e2bd4c6 100644 --- a/README.md +++ b/README.md @@ -4726,26 +4726,6 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]); Examples ```js - - - - - - - - - - - - - - - - - - - - const lengthIs4 = checkProp(l => l === 4, 'length'); lengthIs4([]); // false diff --git a/docs/function.html b/docs/function.html index 108886ee3..dfea172d9 100644 --- a/docs/function.html +++ b/docs/function.html @@ -145,26 +145,6 @@ console.log< ]);

checkProp

Given a predicate function and a prop string, this curried function will then take an object to inspect by calling the property and passing it to the predicate.

Summon prop on obj, pass it to a provided predicate function and return a masked boolean.

const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 const lengthIs4 = checkProp(l => l === 4, 'length');
 lengthIs4([]); // false
 lengthIs4([1,2,3,4]); // true
diff --git a/snippets/checkProp.md b/snippets/checkProp.md
index b0c5c8df8..c90195730 100644
--- a/snippets/checkProp.md
+++ b/snippets/checkProp.md
@@ -9,6 +9,7 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
 ```
 
 ```js
+
 const lengthIs4 = checkProp(l => l === 4, 'length');
 lengthIs4([]); // false
 lengthIs4([1,2,3,4]); // true