
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
array-map-sorted
Advanced tools
Compare two sorted arrays, and map the items of the first map to matched ones.
Compare two sorted arrays, and map the items of the first map to matched ones.
$ npm install array-map-sorted
import map from 'array-map-sorted'
const args = [
[
// 1 matches 4
1,
// 2 starts to match from 5 (4 has already been matched), and no matches
2,
// 3 starts to match from 5, and matches 9
3
],
[4, 5, 7, 9],
(a, b) => b % a === 0
]
map(...args)
// [4, undefined, 9]
map(...args, 0)
// [4, 0, 9]
map(...args, 0, (datum, rel) => datum + rel)
// [5, 0, 12]
Array<datum> the array to be mappedArray<rel> which each datum of data will be matched with.function(datum, rel, datum_i, rel_i): boolean the matcher functionany=undefined if there is no match, the datum will be mapped to defaultValuefunction(datum, rel, datum_i, rel_i): any if there is a match, mapper returns the value which the datum to be mapped into. By default, mapper is (datum, rel) => rel.Returns Array
MIT
FAQs
Compare two sorted arrays, and map the items of the first map to matched ones.
The npm package array-map-sorted receives a total of 137 weekly downloads. As such, array-map-sorted popularity was classified as not popular.
We found that array-map-sorted 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

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.