0.0.1 • Published 6 years ago

object-own v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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.