
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
i18next-callback-backend
Advanced tools
CustomCallbackBackend
for i18nextThis is a very simple i18next backend to be used in the browser or in the server. It allows you to tap in to i18next's callback to load resources without having to write the boilerplate yourself.
Package can be downloaded via npm.
npm install i18next-callback-backend
Wiring up:
import i18next from "i18next";
import CustomCallbackBackend from "i18next-callback-backend";
i18next
.use(CustomCallbackBackend)
.init(i18nextOptions);
window.i18nextCustomCallbackBackend
{
// Callback used when loading a single resource.
customLoad: (language, namespace, callback) => {
// Your custom loading logic.
callback(null, /* your loaded resource */);
},
// Callback used when loading multiple resources. (Optional)
customLoadMulti: (languages, namespaces, callback) => {
// Your custom loading logic.
callback(null, /* your loaded resources */);
},
// Callback used when saving resources. (Optional)
customCreate: (languages, namespace, key, fallbackValue) => {
// Your custom saving logic.
},
}
Options can be passed in:
preferred - by setting options.customLoad
, in i18next.init:
import i18next from "i18next";
import CustomCallbackBackend from "i18next-callback-backend";
i18next
.use(CustomCallbackBackend)
.init({
customLoad: /* your custom callback */,
customLoadMulti: /* your custom callback */,
customCreate: /* your custom callback */,
});
on construction:
import CustomCallbackBackend from "i18next-callback-backend";
const customCallbackBackend = new CustomCallbackBackend(
null,
{
customLoad: /* your custom callback */,
customLoadMulti: /* your custom callback */,
customCreate: /* your custom callback */,
}
);
via calling init:
import CustomCallbackBackend from "i18next-callback-backend";
const customCallbackBackend = new CustomCallbackBackend();
customCallbackBackend.init({
customLoad: /* your custom callback */,
customLoadMulti: /* your custom callback */,
customCreate: /* your custom callback */,
});
FAQs
A "custom callback" backend for i18next.
The npm package i18next-callback-backend receives a total of 145 weekly downloads. As such, i18next-callback-backend popularity was classified as not popular.
We found that i18next-callback-backend 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.