Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@urbandoor/storage
Advanced tools
A library for returning a localStorage compatible API, regardless of browser
The type checked localStorage API you might have always been looking for.
The land of localStorage polyfill and replacements is a crowded place. Most of these are fantastic libraries, but none satisfied all the requirements that I wanted.
sessionStorage
and localStorage
Along the way I also noticed that polyfills for document.cookie
were
missing a few key features for cookies, such as cookies in the past not
being removed.
This library is far from perfect, but it meets all the criteria I need.
Installing through npm is done as one would normally expect:
$ npm install --save @urbandoor/storage
Usage in webpack/typescript works as follows:
import Storage from '@urbandoor/storage';
const storage = new Storage();
storage.setItem('potato', 'true');
storage.getItem('potato'); // 'true'
storage.length; // 1
storage.keys(0); // potato
storage.removeItem('potato');
storage.setItem('potato1', 'true');
storage.setItem('potato2', 'true');
storage.setItem('potato3', 'true');
storage.setItem('potato4', 'true');
storage.clear();
storage.getItem('potato1'); // null
FAQs
A library for returning a localStorage compatible API, regardless of browser
The npm package @urbandoor/storage receives a total of 2 weekly downloads. As such, @urbandoor/storage popularity was classified as not popular.
We found that @urbandoor/storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.