
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
stringmerge
Advanced tools
Merges multiple strings together alternating through their arguments.
merge :: (...String) → String
merge :: ('abc', '123456') -> 'a1b2c3456'
You can either install stringmerge via npm:
yarn add stringmerge
Alternatively, you can download/copy one of files in the /dist folder depending on your use-case:
dist/stringmerge.js - The node build for use with webpack and the likedist/stringmerge-browser.js - The browser build includes all the various library dependanciesdist/stringmerge-browser.min.js - The minified version of browser versionThe default export merge merges string arguments together via a simple while loop. Any non-string arguments will be disregarded.
import merge from 'stringmerge'
const mergedString = merge('abc', '123', 123, 'z');
// should(mergeResults).be.eql('a1zb2c3');
Alternatively, you can use the mergeGenerator export which utilizes a generator to iterate through the arguments. This only makes sense if you have a ridiculous amount of arguments around the ballpark of +25000.
import { mergeGenerator } from 'stringmerge'
const mergedString = mergeGenerator('abc', '123', 123, 'z');
// should(mergeResults).be.eql('a1zb2c3');
scripts:
build: 'Builds stringmerge → output dist/'
clean: 'deletes all dist/ files'
commit: 'commitizen commit'
dev: 'webpack watch development'
benchmark: 'runs benchmarks located in __tests__/benchmark.run.js'
test: 'runs test located in __tests__/tests.run.js'
merge - two arguments x 325,472 ops/sec ±1.10% (91 runs sampled)
mergeGenerator - two arguments x 247,051 ops/sec ±0.50% (90 runs sampled)
merge - ten arguments x 37,848 ops/sec ±0.55% (91 runs sampled)
mergeGenerator - ten arguments x 25,903 ops/sec ±1.96% (89 runs sampled)
merge 50000 - arguments x 0.13 ops/sec ±65.16% (5 runs sampled)
mergeGenerator - 50000 arguments x 0.56 ops/sec ±50.97% (6 runs sampled)
FAQs
String Alternating Merge
We found that stringmerge 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.