Closed jaandrle closed 3 years ago
const { find, map }= new Proxy(Array.prototype, { get(target,name){ return Function.prototype.call.bind(target[name]); } });
const toFunctional= object=> new Proxy(object.prototype, { get(target,name){ return Function.prototype.call.bind(target[name]); } }); const { map, join }= toFunctional(Array); const { repeat }= toFunctional(String); const { keys }= Object; console.log(join(map(keys({ a: "A" }), key=> repeat(key, 2))));
Ke zmínění