
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
flatmap-fast
Advanced tools
The fastest flatMap this side of node.
Takes two arguments:
const flatMap = require("flatmap-fast");
const testArr = ['Hi', 'World'];
const splitWord = (word) => word.split('');
flatMap(testArr, splitWord);
// => ['H', 'i', 'W', 'o', 'r', 'l', 'd']
flatMap([1, 2, 3, 4], (x) => [x, x * 2]);
// => [1, 2, 2, 4, 3, 6, 4, 8]
Run npm test to test this flatMap against other flatMaps.
$ node --version
v12.18.3
$ yarn test
yarn run v1.22.4
$ node test.js
// => flatMapFast took: 650.86651 milliseconds.
[
'H', 'i', 'W',
'o', 'r', 'l',
'd'
]
// => flatmapjs took: 667.361729 milliseconds.
[
'H', 'i', 'W',
'o', 'r', 'l',
'd'
]
// => flatMapFast took: 517.463478 milliseconds.
[
1, 2, 2, 4,
3, 6, 4, 8
]
// => flatmapjs took: 676.208413 milliseconds.
[
1, 2, 2, 4,
3, 6, 4, 8
]
Done in 2.74s.
FAQs
A fast and modern flatMap for node. Monads for the win!
The npm package flatmap-fast receives a total of 12 weekly downloads. As such, flatmap-fast popularity was classified as not popular.
We found that flatmap-fast demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.