(p, ...a) → Object.assign(Object.create(p), ...a)
npm install create-object-and-assign
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][cr-ass] instead.)
[cr-ass]: https://github.com/adf0001/create-assign/blob/c9475eee87096930f672c7274e71d1cfccac37c0/create-assign.js
API
---
This module exports one function:
``javascript`
function crObAss(p, ...a) { return Object.assign(Object.create(p), ...a); }
module.exports = crObAss;
Usage
-----
see test/usage.mjs
`javascript``
import crObAss from 'create-object-and-assign';
Known issues
------------
* Needs more/better tests and docs.
License
-------
ISC