
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
re-write-js
Advanced tools
Yet another translator, created because I needed something simple.
This is just a syntax for writing simple String transformation functions. For example:
var translate = require("re-write-js").buildTranslatorFn({
"Hi {x}!" : "Salut {x} !",
"{x} plus {y} equals {z}" : "L'addition de {x} et {y} donne {z}",
'"{}"' : "« {} »",
"I have {} apples" : function(x){
if (x < 0) return "J'ai un déficit de pommes";
if (x == 0) return "Je n'ai pas de pommes";
if (x == 1) return "J'ai une pomme";
if (x == 2) return "J'ai deux pommes";
return "J'ai "+x+" pommes"; }
}, {name: "Wojtek"});
translate('Hi {name}!');
// Salut Wojtek !
translate('Hi {name}!', {name: "Anne"});
// Salut Anne !
translate('Hi {=Ben}!');
// Salut Ben !
translate('{x} plus {y} equals {z}', {x:1, y:2, z: 1 + 2});
// L'addition de 1 et 2 donne 3
translate(`{=2} plus {=2} equals {=${2+2}}`);
// L'addition de 2 et 2 donne 4
translate('"{str}"', {str: "Bonjour!"});
// « Bonjour! »
translate('{=Bonsoir!}');
// « Bonsoir! »
translate("I have {y} apples",{y:2+3});
// J'ai 5 pommes
translate("I have {=0} apples");
// Je n'ai pas de pommes
translate("I have {y} apples",{y:'Ho!'});
// J'ai Ho! pommes
FAQs
Another translator generator (for, e.g., internationalization)
The npm package re-write-js receives a total of 0 weekly downloads. As such, re-write-js popularity was classified as not popular.
We found that re-write-js 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.