
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
angular-storage
Advanced tools
A Storage done right for AngularJS.
localStorage
by default but if it's not available, it uses ngCookies
.Number
, you get an Number
, not a StringYou have several options:
bower install angular-storage
npm install angular-storage
<script type="text/javascript" src="https://rawgit.com/auth0/angular-storage/master/dist/angular-storage.js"></script>
angular.module('app', [])
.controller('Controller', function(store) {
var myObj = {
name: 'mgonto'
};
store.set('obj', myObj);
var myNewObject = store.get('obj');
angular.equals(myNewObject, myObj); // return true
store.remove('obj');
store.set('number', 2);
typeof(store.get('number')) === 'number'
});
Sets a new value
to the storage with the key name
. It can be any object.
Returns the saved value
with they key name
. If you saved an object, you get an object.
Deletes the saved value
with the key name
Just clone the repo, run npm install
, bower install
and then gulp
to work :).
MIT
Auth0 helps you to:
FAQs
A Storage done right for AngularJS.
The npm package angular-storage receives a total of 1,928 weekly downloads. As such, angular-storage popularity was classified as popular.
We found that angular-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.