# object-entries

> An ObjectIterator implementation.

Latest version **1.0.0** (published 2014-06-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install object-entries
pnpm add object-entries
yarn add object-entries
bun add object-entries
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-06-20 |
| First published | 2014-06-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Erik Toth |
| Maintainers | totherik |
| Keywords | object, iterable |

## Links

- npm: https://www.npmjs.com/package/object-entries
- Repository: https://github.com/totherik/object-entries
- Issues: https://github.com/totherik/object-entries/issues
- npm.io page: https://npm.io/package/object-entries

## Recent versions

- 1.0.0 (latest) — 2014-06-20

## README

An Object Iterator implementation.
---

Create an iterator for a given object. Note that the iterator will only use keys
present at the time of Iterator creation, so keys added after the iterator has
been created will not be present during iteration.

```javascript
var entries = require('object-entries');

var iter;
iter = entries({ 'foo': 'bar' });
iter.next(); // { value: ['foo', 'bar'], done: false }
iter.next(); // { value: undefined, done: true }
```

#### Properties

##### `kind` (String, *optional*)
Can be `'key'`, `'value'`, or `'key+value'`; defaults to `'key+value'`. Indicates the return
value desired.

```javascript
var obj = {
    a: '1',
    b: '2',
    c: '3'
};

var iter = entries(obj);

// defaults to 'key+value'
iter.next(); // { value: ['a', '1'], done: false }

iter.kind = 'key';
iter.next(); // { value: 'b', done: false }

iter.kind = 'value';
iter.next(); // { value: '3', done: false }

// all done
iter.next(); // { value: undefined, done: true }

```

---
_Source: https://npm.io/package/object-entries · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
