Parcourir la source

add jsdoc to prop function

mightyplow il y a 7 ans
Parent
commit
e4700b484c
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/object/prop.js

+ 6 - 0
src/object/prop.js

@@ -1,3 +1,9 @@
+/**
+ * Creates a function which returns a property of a passed object.
+ *
+ * @param {string} prop - the property to return from the passed object
+ * @return {function(obj: Object)} function to return a property from a passed object
+ */
 const prop = prop => obj => obj[prop];
 
 export default prop;