Skip to content

tomek-he-him/as

Repository files navigation

Build status Coveralls David DM

as

as/array and as/object. Convert easily, back and forth.

  • Brings all functional goodness of arrays to objects.
  • Brings the flexibility of objects to arrays.
  • Works great with 1-liners, 101 and other functional programming libraries.

Installation

$ npm install as

Usage

var asArray = require("as/array");
var asObject = require("as/object");

as/array

asArray(
  {a: 1, b: 2}
  );
// [ {key: "a", value: 1}
// , {key: "b", value: 2}
// ]

as/object

asObject(
  [ {key: "a", value: 1}
  , {key: "b", value: 2}
  ]);
// {a: 1, b: 2}

License

MIT © Tomek Wiszniewski.

About

⛳ as/array and as/object. Convert easily, back and forth.

Resources

License

Stars

Watchers

Forks

Packages

No packages published