nullo

1.0.2 • Public • Published

nullo

Create an object with null prototype, optionally merging other objects into it. Basically just somewhat less verbose than Object.create(null, descriptors) with a giant decriptors object.

  var obj = nullo();
  Object.getPrototypeOf(obj) === null // true;
  Object.keys(obj) // []

  var obj2 = nullo({letter: "a"}, {number: 1});
  obj2; // {letter: "a", number: 1}

The merge algorithm is that of Object.assign; it copies only own enumerable properties of arguments.

Readme

Keywords

none

Package Sidebar

Install

npm i nullo

Weekly Downloads

3

Version

1.0.2

License

MIT

Last publish

Collaborators

  • nickbottomley