Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
angular2-locker
Advanced tools
angular2 library for managing session and locker storage, has backup for inmemory if neither are supported
Wrapper around sessionStorage and localStorage for angular2. If both are unavailable will use an in memory storage.
$ npm i --save angular2-locker
import {bootsrap, provide} from 'angular2/core'
import {Locker} from 'angular2-locker'
bootstrap(App, [Locker])
// If you need to specify more you can provide configuration
bootstrap(App, [provide(Locker, {useValue: new Locker({
driverNamespace: 'MyNamespace',
defaultDriverType: Locker.DRIVERS.LOCAL
})})])
class App {
constructor(private locker: Locker) {}
}
####get
locker.get('myKey')
####set
locker.set('myKey', 'value')
locker.set('myKey', {object: 'value'})
####key
locker.set('key', 'value')
locker.key(0) // 'key'
####has
locker.has('key')
####setNamespace
locker.setNamespace('myName')
####setDriver
locker.setDriver(Locker.DRIVERS.LOCAL) // for more info on drivers look for static methods
####remove
locker.remove('key')
####clear
locker.empty()
DRIVERS
These are the types of drivers available. If you try to set it to a driver that is unsupported it will fallback to the memory driver
Types are available under Locker.DRIVERS
or import {DRIVERS} from 'angular2-locker'
DRIVERS.SESSION
- Session CacheDRIVERS.LOCAL
- Local StorageDRIVERS.MEMORY
- Memory StorageFAQs
angular2 library for managing session and locker storage, has backup for inmemory if neither are supported
The npm package angular2-locker receives a total of 4 weekly downloads. As such, angular2-locker popularity was classified as not popular.
We found that angular2-locker 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.