dfg.codesD
Reactiflux4y ago
10 replies
dfg.codes

DanielFGray – 20-58 Jan 8

im using a library with an api like
foo.method(...args).run(pool)
and i want to abstract it so i dont need to add
.run(pool)
to every call..
whats the best way to approach this, without having to change anything to the usage except for removing the
.run(pool)
?
is a proxy useful here, or is there something else that doesnt require maintaining a list of methods on the original object?
Was this page helpful?