Comparing version 0.1.7 to 0.1.8
@@ -77,3 +77,4 @@ export { default as minBy, default as min_by } from './minBy.js'; | ||
export { default as calls } from './calls.js'; | ||
export { default as delay } from './delay.js'; | ||
export * from './L.js'; | ||
export * from './C.js'; |
16
L.js
@@ -15,2 +15,6 @@ import deepFlatLazy from './Lazy/deepFlatLazy.js'; | ||
import valuesLazy from './Lazy/valuesLazy.js'; | ||
import takeLazy from './Lazy/takeLazy.js'; | ||
import takeWhileLazy from './Lazy/takeWhileLazy.js'; | ||
import takeUntilLazy from './Lazy/takeUntilLazy.js'; | ||
import intervalLazy from './Lazy/intervalLazy.js'; | ||
@@ -31,3 +35,7 @@ const L = { | ||
reverse: reverseLazy, | ||
values: valuesLazy | ||
values: valuesLazy, | ||
take: takeLazy, | ||
takeWhile: takeWhileLazy, | ||
takeUntil: takeUntilLazy, | ||
interval: intervalLazy | ||
}; | ||
@@ -50,3 +58,7 @@ | ||
reverseLazy, | ||
valuesLazy | ||
valuesLazy, | ||
takeLazy, | ||
takeWhileLazy, | ||
takeUntilLazy, | ||
intervalLazy | ||
} |
{ | ||
"name": "fxjs2", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "Functional Extensions for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
## FxJS - Functional Extensions for Javascript | ||
ES6+에서 사용하는 함수형 라이브러리 | ||
FxJS는 자바스크립트의 기본 값을 이용하고, 이터러블 프로그래밍과 Promise를 강조한 함수형 프로그래밍 라이브러리입니다. | ||
### iterable | ||
```javascript | ||
const res = go( | ||
L.range(Infinity), | ||
L.filter(a => a % 2), | ||
L.take(3), | ||
reduce(add)); | ||
log(res); // 9 | ||
``` | ||
### iterable + time | ||
```javascript | ||
go( | ||
L.range(Infinity), | ||
L.map(delay(1000)), | ||
L.map(a => a + 10), | ||
L.take(3), | ||
each(log)); | ||
// 1초 후 10 | ||
// 2초 후 11 | ||
// 3초 후 12 | ||
``` | ||
### iterable + time + Promise | ||
```javascript | ||
// L.interval = time => L.map(delay(time), L.range(Infinity)); | ||
(async () => { | ||
await go( | ||
L.interval(1000), | ||
L.map(a => a + 30), | ||
L.takeUntil(a => a == 33), | ||
each(log)); | ||
// 1초 후 30 | ||
// 2초 후 31 | ||
// 3초 후 32 | ||
// 4초 후 33 | ||
await go( | ||
L.interval(1000), | ||
L.map(a => a + 20), | ||
L.takeWhile(a => a < 23), | ||
each(log)); | ||
// 5초 후 20 | ||
// 6초 후 21 | ||
// 7초 후 22 | ||
} ()); | ||
``` | ||
### 설치 | ||
@@ -6,0 +59,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
35548
120
845
196
0