0.0.3 • Published 2 years ago

@mlynarczyk/simple-storage v0.0.3

Weekly downloads
134
License
ISC
Repository
github
Last release
2 years ago

LocalStorage

A simple localStorage wrapper, adding defaultValue and optional stringifying/parsing of passed values.

Examples

import { get, set, remove, clear } from './src/LocalStorage';

get('example_key'); // null
get('example_key', 3); // 3
set('example_key', { example: 'a' }); // true
get('example_key'); // {example: 'a'}
get('example_key', { useJSONParse: false }); // "{example: 'a'}"
remove('example_key'); // undefined
get('example_key'); // null
set('example_key', { example: 'a' }); // true
clear(); // undefined
get('example_key'); // null
0.0.3

2 years ago

0.0.2

4 years ago

0.0.1-rc

5 years ago

0.0.1

5 years ago