Browse Source

add jsdoc to prop function

mightyplow 7 years ago
parent
commit
e4700b484c
1 changed files with 6 additions and 0 deletions
  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;