@feugene/mu
Version:
Helpful TS utilities without dependencies
25 lines • 439 B
TypeScript
/**
* Converts `value` to an array.
*
* @memberof µ
* @author efureev
*
* @param {*} value The value to convert.
* @returns {Array} Returns the converted array.
*
* @example
*
* toArray({ 'a': 1, 'b': 2 });
* // => [1, 2]
*
* toArray('abc');
* // => ['a', 'b', 'c']
*
* toArray(1);
* // => []
*
* toArray(null);
* // => []
*/
export default function toArray(value?: any): any[];
//# sourceMappingURL=toArray.d.ts.map