Skip to content

values() function

객체의 자체 열거 가능한 문자열 키 속성 값의 이터레이터를 반환합니다.

Signature:

typescript
declare function values<T extends Record<string, any>>(
  obj: T,
): Generator<T[Extract<keyof T, string>], void, unknown>;

Example

ts
[...values({ a: 1, b: "2", c: true })];
// [1, "2", true]

Open Source Code

Released under the Apache-2.0 License.