
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
fretted-strings
Advanced tools
Marks on your strings and get it's position.
npm i fretted-strings
import { mark, Frets } from 'fretted-strings';
const frets: Frets = {};
const content = mark(
`
hogehoge
%%% ^ ^ %%%
%%% p1 p2 %%%
fooo`,
frets,
);
// Function `mark` returns a string which is removed lines enclosed by '%%%' tags from the parameter.
assert(
content,
`
hogehoge
fooo`,
);
// And this function assigns specified location whose name is represented
// as identifier under the `^` character to 2nd parameter.
assert(frets.p1.line, 1);
assert(frets.p1.col, 6);
assert(frets.p2.line, 1);
assert(frets.p2.col, 13);
import { setOptions, mark, Frets } from 'fretted-strings';
setOptions({
tagStart: '<!--%%',
tagEnd: '%%-->',
});
const frets: Frets = {};
mark(
`<html>
<div>hogehoge</div>
<!--%% ^ %%-->
<!--%% p %%-->
</html>`,
frets,
);
Or
import { FretsMarker, Frets } from 'fretted-strings';
const marker = new FretsMarker({
tagStart: '<!--%%',
tagEnd: '%%-->',
});
const frets: Frets = {};
marker.mark(
`<html>
<div>hogehoge</div>
<!--%% ^ %%-->
<!--%% p %%-->
</html>`,
frets,
);
MIT
FAQs
Mark on your strings and get it's position
The npm package fretted-strings receives a total of 1,205 weekly downloads. As such, fretted-strings popularity was classified as popular.
We found that fretted-strings 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.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.