Object
/ API ReferenceObject
/ API Referencevalues
Returns the values of the object.
Similar to Object.values, but with proper type inference.
The Gist
import { values } from '@weser/object'
const objValues = values({ a: 1, b: 2, c: 3 })
// => [1, 2, 3]
console.log(objValues)
Parameters
| Parameter | Type | Description |
|---|---|---|
| obj | Record<PropertyKey, any> | The object to get the values of. |
Returns
(Array<T[keyof T]>) The values of the object.
© 2024-present Robin Weser. All Rights Reserved.