We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e38d54e commit 576dcecCopy full SHA for 576dcec
src/index.js
@@ -22,9 +22,10 @@
22
* import arrayToObjectKeys from "array-to-object-keys"
23
* arrayToObjectKeys(["a", "b"], (key, index) => `value for ${key} #${index + 1}`)
24
* // {a: "value for a #1", b: "value for b #2"}
25
+ * @function
26
* @param {string[]} array Keys for the generated object
27
* @param {valueGenerator|*} [valueGenerator=null] Optional function that sets the object values based on key and index
- * @returns {Object<string, *>} A generated object based on the array input
28
+ * @returns {object<string, *>} A generated object based on the array input
29
*/
30
export default (array, valueGenerator = null) => {
31
if (!Array.isArray(array)) {
0 commit comments