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