Proxymise
Chainable Promise Proxy.
Lightweight ES6 Proxy for Promises with no additional dependencies. Proxymise allows for method
and property chaining without need for intermediate then()
or await
for cleaner and simpler code.
Use
npm i proxymise
const proxymise = ; // Instead of thensfoo ; // Instead of awaitsconst value1 = await foo;const value2 = await value1;const value3 = await value2;const value4 = await value3qux;console; // Use proxymiseconst value = await qux;console;
Practical Examples
Performance
Proxymised benchmark with 10000 iterations is practically as performant as the non-proxymised one.
node test/benchmark.js with proxymise: 3907.582mswithout proxymise: 3762.375ms