
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
ng7-storage
Advanced tools
Share Data among multiple components in angular using browser session storage
see Stackblitz Demo here
Angular compatibility
Angular Version | package version |
---|---|
angular 8 and below | 1.1.4 and below |
angular 9 and above(ivy version) | 1.1.5 and above |
npm i ng-storage --save
in command prompt from root of your project folderimport { StorageModule } from 'ng7-storage';
BrowserModule,
StorageModule
],
import { NgStorageService } from 'ng7-storage';
in the components that you would like to useconstructor(private StorageService: NgStorageService) {
}
follow below methods to set and retrieve data to storage
this.StorageService.setData({ key: 'key_of_data', value: res ,encrypt:optional|boolean})
Pass key value pairs to store data , and key should be valid string
NB: data format that accepted by setData
method is
export interface dataFormat {
key: string;
value?: any;
encrypt?: Boolean;
decrypt?: Boolean;
}
NB:encrypt
is a development onprogress feature and may have issues when setting data that has special characters
eg:this.StorageService.getData({key: 'key_of_data',decrypt:optional|boolean})
Use getData
method to retrieve data, pass key
of the item
For removing data, we can either remove by a single key or we can remove all data at once
removeData
method is used remove single item based on keyremoveAll
method remove all data storedExamples :
removeData : this.StorageService.removeData('key_of_data')
removeAll : this.StorageService.removeAll()
setData()
getData()
removeData()
removeAll()
![]() IE / Edge | ![]() Firefox | ![]() Chrome | ![]() Vivaldi |
---|---|---|---|
IE11, Edge | last 8 versions | last 8 versions | last 5 versions |
npm install
within the directory that you cloned (probably ng-storage
).ng serve --o
.![]() Edison Augusthy 💻 |
FAQs
An Angular service for browser session storage management with optional base64 encryption/decryption.
We found that ng7-storage demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.