프로젝트
GitHub에서 보기
kozhevnikov/proxymise
소개
체이닝 가능한 Promise 프록시
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalProxymise
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 = require('proxymise');
// Instead of thens
foo.then(value => value.bar())
.then(value => value.baz())
.then(value => value.qux)
.then(value => console.log(value));
// Instead of awaits
const value1 = await foo;
const value2 = await value1.bar();
const value3 = await value2.baz();
const value4 = await value3.qux;
console.log(value4);
// Use proxymise
const value = await proxymise(foo).bar().baz().qux;
console.log(value);
Practical Examples
Performance
Proxymised benchmark with 10000 iterations is practically as performant as the non-proxymised one.
node test/benchmark.js
with proxymise: 3907.582ms
without proxymise: 3762.375ms
관련 프로젝트 살펴보기
불러오는 중…