Object
/ API Reference
Object
/ API Reference

values

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

ParameterTypeDescription
objRecord<PropertyKey, any>The object to get the values of.

Returns

(Array<T[keyof T]>) The values of the object.

On this page