![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
poeditor-utils
Advanced tools
Readme
higher-level POEditor utilities for Node.js
import * as utils from 'poeditor-utils'
import * as fs from 'fs'
const languageCodeOverrides = {
'pt-br': 'pt',
}
const translations = await utils.getTranslations('API token', [
'project A',
'project B',
])
const translationsByLanguage = utils.groupTranslations(translations, (translation) => translation.languageCode)
translationsByLanguage.forEach((translations, languageCode) => {
const language = languageCodeOverrides[languageCode] || languageCode
const data = utils.formatTranslationsAsJson(translations, {
indent: 2,
})
fs.writeFileSync(`./translations/${language}.json`, data)
})
projectName: string
languageCode: string
term: string
value: string
Translation of a single term to a single language.
apiToken: string
projectNames: string[]
options: Object
languageCodes: string[]
Promise<Translation[]>
Gets translations for multiple projects. Gets translations for all the project languages or only languages specified with options.languageCodes
.
translations: Translation[]
grouper: (translation: Translation) => string
Map<string, Translation[]>
Groups translations by keys produced by grouper
.
translations: Translation[]
options: Object
indent: number | string
string
Formats translations to string as stable sorted JSON.
apiToken: string
- POEditor API tokenExposes the poeditor-client Client
. See their docs for more.
apiToken: string
- POEditor API tokenprojectName: string
- POEditor project nameReturns a promise which resolves with a poeditor-client Project
representation of the project. See their docs for more.
apiToken: string
- POEditor API tokenprojectName: string
- POEditor project namegetPathCallback: (translation: Translation) => string
- produces destination file path for given translationGets translations for all the project languages and writes them to files by getPathCallback
as a stable sorted JSON. Returns a promise which resolves with an array of file paths written.
utils.pullTranslations('API token', 'project name', (translation) => {
return 'translations/' + translation.languageCode + '.json'
})
.then((paths) => {
console.log(paths) // ['translations/en.json', ...]
})
FAQs
Unknown package
We found that poeditor-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.