object-own
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

object-own NPM version NPM monthly downloads NPM total downloads

Iterates over the own values of an object.

Install

$ npm install object-own

Example

Simple:

const obj = { x: 1, y: 2, z: 3 };

for (const { key, value } of own(obj)) {
    // ...
}

Named:

const obj = { x: 1, y: 2, z: 3 };

for (const { key: axis, value: position } of own(obj)) {
    // ...
}

Interoperability

You can use standard statements like continue and break.

/object-own/

    Package Sidebar

    Install

    npm i object-own

    Weekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • zaclummys