Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
angular-marshall.storage
Advanced tools
This service provides a simple a eloquent interface to the localStorage
API.
angular
.module('example', ['marshall.storage'])
.run(function (storageService) {
var storage = storageService('example.');
storage.set('foobar', 'Hello World!');
console.log(storage.get('foobar')); // 'Hello World!'
});
angular
.module('example', ['marshall.storage'])
.run(function (storageService) {
var storage = storageService('example.');
var watcher = storage.watch('foobar', function (key, value) {
console.log('%s => %s', key, value); // 'foobar => Hello World!'
});
storage.set('foobar', 'Hello World!');
console.log(storage.keys()); // ['foobar']
});
Creates a new StorageService instance, with an optional prefix.
The prefix is used to isolate local storage items to a specific key. All methods on the StorageService look at this prefix. For example; with a StorageService of ‘foobar.’, the StorageService#clear
method will only remove all items that start with ‘foobar.’.
Returns the string value of an item within local storage.
Sets an item in local storage.
Returns whether there is an item in local storage with the given key.
Removes a specific item in local storage, by key.
Removes all the items in local storage.
Gets or sets an item in local storage; automatically stringifying them, and parsing them out.
Watches local storage for any changes to specific items. The callback is fired whenever a piece of code (within the same tab, or another tab) sets/removes/changes the value of a local storage item.
The pattern argument is a string that can optionally include regular expression code. For simplicity, the *
key will automatically be translated into (.*)
which matches anything. This allows you to pass in a string, such as; ‘example.foo.*.id’, which will match ‘example.foo.andrew.id’, ‘example.foo.max.id’ (etc).
An optional third argument can be passed through to invoke the callback for all the existing items with their current values.
Returns an array of keys within local storage.
Spawns a child StorageService which is prefixed with the prefix the parent has.
FAQs
A simple localStorage service for angular.
The npm package angular-marshall.storage receives a total of 99 weekly downloads. As such, angular-marshall.storage popularity was classified as not popular.
We found that angular-marshall.storage 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.