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.
ClientStorage
Advanced tools
Bulletproof persistent browser storage, works with disabled Cookies and/or localStorage
localStorage
with fall-back to cookies
;localStorage
and cookies
;npm install --save ClientStorage
# Via Atmosphere
meteor add ostrio:cstorage
# Via NPM
meteor npm install --save ClientStorage
var ClientStorage = require('ClientStorage').ClientStorage;
import { ClientStorage } from 'meteor/ostrio:cstorage';
ClientStorage.get('key')
- Read a record. If the key doesn't exist a null value will be returned.ClientStorage.set('key', value)
- Create/overwrite a value in storageClientStorage.remove('key')
- Remove a recordClientStorage.has('key')
- Check whether a record exists, returns boolean valueClientStorage.keys()
- Returns an array of all storage keysClientStorage.empty()
- Empty storage (remove all key/value pairs). Use with caution! (May remove cookies which was set not by you)cookies
onlyTo use cookies
as a driver for ClientStorage
create new instance of clientStorage
(camel-case, first letter lower-case)
var clientStorage = require('ClientStorage').clientStorage;
var csCookies = new clientStorage('cookies');
or in ES6 (Meteor):
import { clientStorage } from 'meteor/ostrio:cstorage';
let csLocalStorage = new clientStorage('cookies');
localStorage
onlyTo use localStorage
as a driver for ClientStorage
create new instance of clientStorage
(camel-case, first letter lower-case):
var clientStorage = require('ClientStorage').clientStorage;
var csLocalStorage = new clientStorage('localStorage');
or in ES6 (Meteor):
import { clientStorage } from 'meteor/ostrio:cstorage';
let csLocalStorage = new clientStorage('localStorage');
Note: All instances shares same cookies and localStorage records!
ClientStorage.set('locale', 'en'); // true
ClientStorage.set('country', 'usa'); // true
ClientStorage.set('gender', 'male'); // true
ClientStorage.get('gender'); // male
ClientStorage.has('locale'); // true
ClientStorage.has('city'); // false
ClientStorage.keys(); // ['locale', 'country', 'gender']
ClientStorage.remove('locale'); // true
ClientStorage.get('locale'); // undefined
ClientStorage.keys(); // ['country', 'gender']
ClientStorage.empty(); // true
ClientStorage.keys(); // []
ClientStorage.empty(); // false
FAQs
Bulletproof persistent browser storage, works with disabled Cookies and/or localStorage
The npm package ClientStorage receives a total of 127 weekly downloads. As such, ClientStorage popularity was classified as not popular.
We found that ClientStorage 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.