object-own
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.