
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Tiny string internationalization and interpolation library.
Features:
npm install i21n
const i21n = require('i21n')
const i21n = new i21n({
/* Basic */
'hello.world': 'Hello world',
/* With variables */
'hello.fullname': 'Hello {name}, your full name is {name} {surname}',
/* Nested */
'hello.world.and': {
'goodbye': {
'name': 'Hello world, goodbye {name}'
}
}
})
// "Hello world"
i21n.t('hello.world')
// "Hello Ram, your full name is Ram Bo"
i21n.t('hello.fullname', {
name: 'Ram',
surname: 'Bo'
})
// "Hello world, goodbye Ram"
i21n.t('hello.world.and.goodbye.name', {
name: 'Ram'
})
Different language translation versions (i.e. locales):
const i21n = new i21n({
'good': {
'day': {
'en-gb': 'Good day {name}',
'de': 'Guten tag {name}'
}
},
'my': {
'name.is': {
'en-gb': 'My name is {name}',
'zh-TW': '我叫{name}'
}
}
}, {
/** Locale to use when not explicitly specified or when specified locale version not found */
defaultLocale: 'en-gb'
})
// Default locale
// "Good day Ram"
i21n.t('good.day', {
name: 'Ram'
})
// Override with a specific locale
// "Guten tag Ram"
i21n.t('good.day', {
name: 'Ram'
}, {
locale: 'de'
})
// Override with a specific locale for which there is no string - it uses the default locale instead!
// "My name is Ram"
i21n.t('my.name.is', {
name: 'Ram',
locale: 'de'
})
// Load additional locale data
i21n.loadLocale('zh-CN', {
'good': {
'day': '你好{name}',
},
})
// "你好Ram"
i21n.t('good.day', {
name: 'Ram'
}, {
locale: 'zh-CN'
})
MIT - see LICENSE.md
FAQs
Tiny internationalization library for Node and the Browser
The npm package i21n receives a total of 151 weekly downloads. As such, i21n popularity was classified as not popular.
We found that i21n 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.