Socket
Book a DemoInstallSign in
Socket

new-large-localstorage

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

new-large-localstorage

Safe local storage for large data.

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

large-localstorage

Safe local storage wrapper for large data. What is the max size of localStorage values?

Build Status Coverage Status npm Version npm Download npm License

Usage

  • Install

npm i --save large-localstorage

  • API

API is same with window.localstorage.

import lls from 'large-localstorage';

lls.setItem('string', 'hello world!');
// 50 Mb content
const data = new Array(50 * 1024 * 1024).fill('a').join('');
lls.setItem('large', data);

// will throw
// localStorage.setItem('large-data', data);

lls.getItem('large');

lls.removeItem('string');

lls.clear();

License

MIT@hustcc.

FAQs

Package last updated on 18 Dec 2020

Did you know?

Socket

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.

Install

Related posts