es-toolkit
es-toolkit copied to clipboard
Add support for `values`
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]);
}