
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
angular-webstorage
Advanced tools
This module is destined to be used with AngularJS. It allow you to store data in the web storage of your browser.
You can use this module from 2 different ways.
You can use the methods without use the optional parameter "storageType". This way, the module manage your data between session and local storage without you need to worry about how your data are managed.
Using optional "storageType" parameters offers you more possibilites to manage your data. You can precise where to store or get your data (between session and local storage).
All methods are based on a param storage type to give you the possibility to manage your data as you want.
Get the module
$ npm install angular-webstorage
Download the repository and take the angular-webstorage.js file from dist repository.
Include the module into your angular application. Include angular-webstorage.js (or angular-webstorage.min.js) file in index.html, after the Angular import.
Add WebStorageModule to your angular modules
Get value from storage. By default, without storageType, value is took from session but if no value is find from session, the method try to find a value from local storage.
var value1 = AngularWebStorage.get('foo'); // return value corresponding to 'foo' from session or local storage
var value2 = AngularWebStorage.get('key', 'localStorage'); // return value corresponding to 'key' from local storage
Add value in web storage. By default, without keep param, value is stored in session.
AngularWebStorage.set('foo', 'toto'); // store the data in session
AngularWebStorage.set('foo', 'toto', false); // store the data in session
AngularWebStorage.set('foo', 'toto', true); // store the data in local
Remove data from web storage. By default, without storageType, data corresponding to key is removed from session and local storage.
AngularWebStorage.remove('foo1'); // remove the data from session and local storage
AngularWebStorage.remove('foo2', 'sessionStorage'); // remove the data from session storage
AngularWebStorage.remove('foo2', 'localStorage'); // remove the data from local storage
Clear all datas from local, session or both storage.
AngularWebStorage.clearAll(); // remove all data from session and local storage
AngularWebStorage.clearAll('sessionStorage'); // remove all data from session storage
AngularWebStorage.clearAll('localStorage'); // remove all data from local storage
Return all keys from local, session or both storage. By default, without storageType, all keys (from session and local) are returned (the doublon between session and local are mixed)
AngularWebStorage.keys(); // return all keys from session and local storage
AngularWebStorage.keys('sessionStorage'); // return all keys from session storage
AngularWebStorage.keys('localStorage'); // return all leys from local storage
I encourage you to propose new functionality or suggestion to improve the project.
Fork the project
Clone the projet
git clone https://github.com/<username>/angular-web-storage.git
Install dependencies
npm install
bower install
Launch test to be sure that everything work
grunt test
Minify source file
grunt dist
Check syntax
grunt jshint
Don't forget to write tests and pass jshint syntax before to pull request please.
FAQs
An Angular module that gives you access to the browsers local storage
We found that angular-webstorage 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.