A functional programming library for TypeScript/JavaScript
Installations
npm install @fxts/core
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
18.20.5
NPM Version
10.8.2
Score
91.8
Supply Chain
97
Quality
84.8
Maintenance
100
Vulnerability
88
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (97.86%)
JavaScript (1.74%)
CSS (0.26%)
Shell (0.09%)
Makefile (0.04%)
Developer
Download Statistics
Total Downloads
1,980,328
Last Day
786
Last Week
9,928
Last Month
114,933
Last Year
1,464,612
GitHub Statistics
993 Stars
515 Commits
72 Forks
12 Watching
10 Branches
36 Contributors
Bundle Size
39.05 kB
Minified
7.53 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.4.0
Package Id
@fxts/core@1.4.0
Unpacked Size
3.30 MB
Size
462.57 kB
File Count
1,277
NPM Version
10.8.2
Node Version
18.20.5
Publised On
26 Nov 2024
Total Downloads
Cumulative downloads
Total Downloads
1,980,328
Last day
-87.2%
786
Compared to previous day
Last week
-69.8%
9,928
Compared to previous week
Last month
-27.5%
114,933
Compared to previous month
Last year
300.3%
1,464,612
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
28
FxTS
FxTS is a functional library for TypeScript/JavaScript programmers.
Why FxTS?
- Lazy evaluation
- Handling concurrent requests
- Type inference
- Follow iteration protocols Iterable / AsyncIterable
Installation
npm install @fxts/core
Documentation
Please review the API documentation
Usage
1import { each, filter, fx, map, pipe, range, take } from "@fxts/core"; 2 3pipe( 4 range(10), 5 map((a) => a + 10), 6 filter((a) => a % 2 === 0), 7 take(2), 8 each((a) => console.log(a)), 9); 10 11// chaining 12fx(range(10)) 13 .map((a) => a + 10) 14 .filter((a) => a % 2 === 0) 15 .take(2) 16 .each((a) => console.log(a));
Usage(concurrent)
1import { concurrent, countBy, flat, fx, map, pipe, toAsync } from "@fxts/core"; 2 3// maybe 1 seconds api 4const fetchWiki = (page: string) => 5 fetch(`https://en.wikipedia.org/w/api.php?action=parse&page=${page}`); 6 7const countWords = async (concurrency: number) => 8 pipe( 9 ["html", "css", "javascript", "typescript"], 10 toAsync, 11 map(fetchWiki), 12 map((res) => res.text()), 13 map((words) => words.split(" ")), 14 flat, 15 concurrent(concurrency), 16 countBy((word) => word), 17 ); 18 19await countWords(); // 4 seconds 20await countWords(2); // 2 seconds
you can start here
Build
npm run build
Running Test
npm test
Running Type Test
npm run compile:check
License
Apache License 2.0
No vulnerabilities found.
No security vulnerabilities found.