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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i nullo

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • nickbottomley