Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@npm-polymer/app-localize-behavior
Advanced tools
A behavior to help with internationalizating apps
Polymer.AppLocalizeBehavior
wraps the format.js library to
help you internationalize your application. Note that if you're on a browser that
does not natively support the Intl
object, you must load the polyfill yourself. An example polyfill can
be found here.
Polymer.AppLocalizeBehavior
supports the same message-syntax
of format.js, in its entirety; use the library docs as reference for the
available message formats and options.
Sample application loading resources from an external file:
<dom-module id="x-app">
<template>
<div>{{localize('hello', 'name', 'Batman')}}</div>
</template>
<script>
Polymer({
is: "x-app",
behaviors: [
Polymer.AppLocalizeBehavior
],
properties: {
language: {
value: 'en'
},
}
attached: function() {
this.loadResources(this.resolveUrl('locales.json'));
},
});
</script>
</dom-module>
Alternatively, you can also inline your resources inside the app itself:
<dom-module id="x-app">
<template>
<div>{{localize('hello', 'name', 'Batman')}}</div>
</template>
<script>
Polymer({
is: "x-app",
behaviors: [
Polymer.AppLocalizeBehavior
],
properties: {
language: {
value: 'en'
},
resources: {
value: function() {
return {
'en': { 'hello': 'My name is {name}.' },
'fr': { 'hello': 'Je m\'apelle {name}.' }
}
}
}
});
</script>
</dom-module>
FAQs
A behavior to help with internationalizating apps
The npm package @npm-polymer/app-localize-behavior receives a total of 4 weekly downloads. As such, @npm-polymer/app-localize-behavior popularity was classified as not popular.
We found that @npm-polymer/app-localize-behavior 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
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.