Skip to content

Commit 576dcec

Browse files
committed
Improved documentation
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent e38d54e commit 576dcec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
* import arrayToObjectKeys from "array-to-object-keys"
2323
* arrayToObjectKeys(["a", "b"], (key, index) => `value for ${key} #${index + 1}`)
2424
* // {a: "value for a #1", b: "value for b #2"}
25+
* @function
2526
* @param {string[]} array Keys for the generated object
2627
* @param {valueGenerator|*} [valueGenerator=null] Optional function that sets the object values based on key and index
27-
* @returns {Object<string, *>} A generated object based on the array input
28+
* @returns {object<string, *>} A generated object based on the array input
2829
*/
2930
export default (array, valueGenerator = null) => {
3031
if (!Array.isArray(array)) {

0 commit comments

Comments
 (0)