New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eliumhq/elium-i18n

Package Overview
Dependencies
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eliumhq/elium-i18n - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

2

package.json

@@ -7,3 +7,3 @@ {

"license": "UNLICENSED",
"version": "2.1.1",
"version": "2.1.2",
"engines": {

@@ -10,0 +10,0 @@ "node": ">=9",

/*
From https://github.com/i18next/i18next-scanner/blob/master/src/nodes-to-string.js
Adatpted following https://github.com/i18next/react-i18next/blob/master/src/Trans.js
The MIT License (MIT)

@@ -42,3 +44,3 @@

return node.type === 'Literal' && typeof node.value === 'number'
return node.type === 'NumericLiteral' && typeof node.value === 'number'
}

@@ -51,3 +53,3 @@

return node.type === 'Literal' && typeof node.value === 'string'
return node.type === 'StringLiteral' && typeof node.value === 'string'
}

@@ -77,2 +79,15 @@

memo += value
} else if (node.children) {
/* Support with lists */
if (
node.type === 'JSXElement' &&
node.openingElement.attributes &&
node.openingElement.attributes.some(
attribute => attribute.name.type === 'JSXIdentifier' && attribute.name.name === 'i18nIsDynamicList'
)
) {
memo += `<${nodeIndex}></${nodeIndex}>`
} else {
memo += `<${nodeIndex}>${nodesToString(node.children)}</${nodeIndex}>`
}
} else if (node.type === 'JSXExpressionContainer') {

@@ -87,4 +102,4 @@ const { expression = {} } = node

memo += expression.value
} else if (isObjectExpression(expression) && _get(expression, 'properties[0].type') === 'Property') {
memo += `<${nodeIndex}>{{${expression.properties[0].key.name}}}</${nodeIndex}>`
} else if (isObjectExpression(expression) && _get(expression, 'properties[0].type') === 'ObjectProperty') {
memo += `{{${expression.properties[0].key.name}}}`
} else {

@@ -98,4 +113,2 @@ console.error(

}
} else if (node.children) {
memo += `<${nodeIndex}>${nodesToString(node.children)}</${nodeIndex}>`
}

@@ -102,0 +115,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc