0.1.1 • Published 2 years ago

create-object-and-assign v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

create-object-and-assign

(p, ...a) → Object.assign(Object.create(p), ...a)

  • Exactly what is says on the tin. ( is not =>)
  • No shenanigans.
  • No polyfills. (If you want them, try npm:create-assign instead.)

API

This module exports one function:

function crObAss(p, ...a) { return Object.assign(Object.create(p), ...a); }
module.exports = crObAss;

Usage

see test/usage.mjs

import crObAss from 'create-object-and-assign';

Known issues

  • Needs more/better tests and docs.

 

License

ISC