array-to-object-keys
Advanced tools
Comparing version 1.0.12 to 1.0.13
/** | ||
* @typedef valueGenerator | ||
* @type {function} | ||
* @param {string} value The original array entry | ||
* @param {number} index The index of the array entry (starts at 0) | ||
* @returns {*} | ||
*/ | ||
declare type valueGenerator = (value: string, index: number) => any; | ||
/** | ||
* Converts an array to an object with static keys and customizable values | ||
@@ -13,8 +22,8 @@ * @example | ||
* @param {string[]} array Keys for the generated object | ||
* @param {function(value, index)|*} [valueGenerator] Optional function that sets the object values based on key and index | ||
* @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 | ||
*/ | ||
declare function default(array: string[], valueGenerator?: ((...params: any[]) => any) | any): { | ||
declare function default(array: string[], valueGenerator?: valueGenerator | any): { | ||
[key: string]: any; | ||
}; | ||
/*! | ||
*** array-to-object-keys 1.0.12 | ||
*** array-to-object-keys 1.0.13 | ||
*** Copyright © 2019, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid) | ||
@@ -4,0 +4,0 @@ *** Licensed under MIT |
@@ -1,1 +0,1 @@ | ||
{"author":{"name":"Jaid","email":"jaid.jsx@gmail.com","url":"https://github.com/Jaid"},"bugs":"https://github.com/Jaid/array-to-object-keys/issues","description":"Converts an array to an object where the keys are the array entries and the values are customizable in a function.","homepage":"https://array-to-object-keys.jaid.codes","keywords":["array","array-manipulations","array-map","convert","javascript-array","javascript-object","keys","lang","object","values"],"license":"MIT","name":"array-to-object-keys","repository":"github:Jaid/array-to-object-keys","types":"index.d.ts","version":"1.0.12"} | ||
{"author":{"name":"Jaid","email":"jaid.jsx@gmail.com","url":"https://github.com/Jaid"},"bugs":"https://github.com/Jaid/array-to-object-keys/issues","description":"Converts an array to an object where the keys are the array entries and the values are customizable in a function.","homepage":"https://array-to-object-keys.jaid.codes","keywords":["array","array-manipulations","array-map","convert","javascript-array","javascript-object","keys","lang","object","values"],"license":"MIT","name":"array-to-object-keys","repository":"github:Jaid/array-to-object-keys","types":"index.d.ts","version":"1.0.13"} |
4403
32