Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
org.webjars.bower:iron-localstorage
Advanced tools
Element access to Web Storage API (window.localStorage).
Keeps value
property in sync with localStorage.
Value is saved as json by default.
ls-sample
will automatically save changes to its value.
<dom-module id="ls-sample">
<iron-localstorage name="my-app-storage"
value="{{cartoon}}"
on-iron-localstorage-load-empty="initializeDefaultCartoon"
></iron-localstorage>
</dom-module>
<script>
Polymer({
is: 'ls-sample',
properties: {
cartoon: {
type: Object
}
},
// initializes default if nothing has been stored
initializeDefaultCartoon: function() {
this.cartoon = {
name: "Mickey",
hasEars: true
}
},
// use path set api to propagate changes to localstorage
makeModifications: function() {
this.set('cartoon.name', "Minions");
this.set('cartoon.hasEars', false);
}
});
</script>
value.*
is observed, and saved on modifications. You must use
path change notification methods such as set()
to modify value
for changes to be observed.
Set auto-save-disabled
to prevent automatic saving.
Value is saved as JSON by default.
To delete a key, set value to null
Element listens to StorageAPI storage
event, and will reload upon receiving it.
Warning: do not bind value to sub-properties until Polymer
bug 1550
is resolved. Local storage will be blown away.
<iron-localstorage value="{{foo.bar}}"
will cause data loss.
FAQs
WebJar for iron-localstorage
We found that org.webjars.bower:iron-localstorage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.