callable demo

node v10.24.1
version: 1.0.0
endpointsharetweet
var m = require("@lopatnov/callable"); var Callable = m.Callable, CallableByCallee = m.CallableByCallee, CallableByClosure = m.CallableByClosure, CallableByProxy = m.CallableByProxy; class ChildCallable extends Callable { _call(...args) { return `Hello ${args[0]}`; } } let x = new ChildCallable(); let xc = x("World"); console.log(xc);
Loading…

no comments

    sign in to comment