es-toolkit icon indicating copy to clipboard operation
es-toolkit copied to clipboard

Add support for `values`

Open HeathJared opened this issue 1 year ago • 0 comments

Reference

https://github.com/lodash/lodash/blob/main/src/values.ts

In the mean time I am using the following snippet, but it does not cover all cases provided by lodash.

export function values<T>(value: Record<any, T>): T[] {
    return value == null ? [] : Object.keys(value).map(key => value[key]);
}

HeathJared avatar Oct 04 '24 18:10 HeathJared