
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
i18next-translation-parser
Advanced tools
This is a module to parse an i18next translation string into an AST and back to a string.
Source can be loaded via npm or downloaded from this repo.
# npm package
$ npm install i18next-translation-parser
import { parse, stringify } from 'i18next-translation-parser';
const AST = parse('<div>test</div>');
// will return
/*
[
{
"type": "tag",
"name": "div",
"voidElement": false,
"attrs": {},
"children": [
{
"type": "text",
"content": "test"
}
]
}
]
*/
stringify(AST); // -> '<div>test</div>'
parse('test {{val}} text {{- encoded}} with {{val, format}} some $t{nesting} help');
// will return
/*
[
{
"type": "text",
"content": "test "
},
{
"type": "interpolation",
"raw": "{{val}}",
"prefix": "{{",
"suffix": "}}",
"content": "val",
"variable": "val"
},
{
"type": "text",
"content": " text "
},
{
"type": "interpolation_unescaped",
"raw": "{{- encoded}}",
"prefix": "{{-",
"suffix": "}}",
"content": " encoded",
"variable": "encoded"
},
{
"type": "text",
"content": " with "
},
{
"type": "interpolation",
"raw": "{{val, format}}",
"prefix": "{{",
"suffix": "}}",
"content": "val, format",
"variable": "val, format"
},
{
"type": "text",
"content": " some "
},
{
"type": "nesting",
"raw": "$t{nesting}",
"prefix": "$t{",
"suffix": "}",
"content": "nesting",
"variable": "nesting"
},
{
"type": "text",
"content": " help"
}
]
*/
1.0.1
FAQs
parses i18next translations to AST
The npm package i18next-translation-parser receives a total of 15,340 weekly downloads. As such, i18next-translation-parser popularity was classified as popular.
We found that i18next-translation-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.