1.0.2 • Published 9 years ago

nullo v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago

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.