
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@hydroperx/fluent
Advanced tools
Rapidly support Fluent Project's translation in your web application. Both client-side and server-side applications are supported.
That is an updated version of com.hydroper.ftl.
Install dependency:
npm install @hydroperx/fluent
Example TypeScript:
import { FluentBox } from "@hydroperx/fluent";
class Main {
fluentBox: FluentBox;
constructor() {
this.fluentBox = new FluentBox({
locales: ["en"],
fallbacks: {
// "pt-BR": ["en"],
},
defaultLocale: "en",
source: "res/lang",
files: [
"_", // res/lang/LANG/_.ftl
],
clean: true,
// specify either 'http' or 'fileSystem' as load method
method: "fileSystem",
});
this.initialize();
}
async initialize() {
if (!(await this.fluentBox.load())) {
// failed to load
return;
}
console.log(this.fluentBox.getMessage("hello", { to: "Diantha" }));
}
}
new Main();
Example FTL file at res/lang/en/_.ftl:
hello = Hello, { $to }!
Usually, for server applications, set the clean option to false and clone the FluentBox object when necessary by invoking fluentBox.clone(); to change the current locale.
The fluentBox.clone(); method clones the FluentBox object, but still re-uses resources from the original object, avoiding resource duplication.
FAQs
Work with Project Fluent translation lists.
We found that @hydroperx/fluent demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.