0.0.8 • Published 4 years ago

iterable-objects v0.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Iterable objects

Make your objects iterable simplify and conveniently

Install

$ npm i --save iterable-objects

or if you use yarn:

$ yarn add iterable-objects

Usage

const object = { a: 1, b: 2, c: 3, d: 4 };
const iterable = new IterableObject(object);

const parsedIterable = iterable
  .filter(({ key }) => key > "a") //{b: 2, c: 3, d: 4}
  .map(({ key, value }) => (key > "b" ? value + 1 : value)) //{b: 2, c: 4, d: 5}
  .values;  //[2, 4, 5]

Licence

MIT © Erokhin Dmitriy

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago