@naverpay/hidash
Version:
improved lodash
19 lines (17 loc) • 579 B
text/typescript
/**
* @description
* Returns an array of the values of the given object.
*
* @param {AnyKindOfDictionary<Value> | object | Map<Key, Value> | Set<Value>} [obj] The object to get values from
* @returns {Value[]} An array of the values of the object
*
* @example
* values({ a: 1, b: 2 }) // [1, 2]
* values([1, 2, 3]) // [1, 2, 3]
* values(new Map([['a', 1], ['b', 2]])) // [1, 2]
* values(new Set([1, 2, 3])) // [1, 2, 3]
* values('abc') // ['a', 'b', 'c']
* values(null) // []
*/
declare function values<T>(obj: T): unknown[];
export { values as default, values };