create-object-and-assign
v0.1.1
Published
(p, ...a) → Object.assign(Object.create(p), ...a)
Maintainers
Readme
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-assigninstead.)
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
