Gyve
Prototypal delegation made simple.
Installation
Install the package with npm:
npm install gyve
Include it in your project:
const gyve = ;
Documentation
Given two objects, car
(delegatee) and bmw
(delegator), use gyve
to prototype-chain them:
const car = { ... } { ... } wheels: 4; const electric = { ... }; // car <-- electricconst electricCar = ;
Since gyve
is a curried function, partial application is possible:
const car = ... ; const delegateToCar = ; const f1 = ... ; // car <-- f1const f1Car = ;