소스 검색

[extract]: add jsdoc

mightyplow 7 년 전
부모
커밋
fcf373338c
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      src/object/extract.js

+ 10 - 0
src/object/extract.js

@@ -1,3 +1,13 @@
+/**
+ * Creates a function which extracts some properties out of an object.
+ *
+ * @typedef {function} extractProps
+ *
+ * @memberOf object
+ * @param {string[]} props
+ * @return {function(obj: Object)}
+ */
+
 const extract = (...props) => (obj) => {
     return props.reduce((extracted, key) => {
         extracted[key] = obj[key];