1.0.1 • Published 2 years ago

tiny-tiny-storage v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

GitHub Workflow Status (branch) npm bundle size npm GitHub last commit GitHub

What is the purpose?

It's a very tiny library for local/session storage operations. There's no dependency. Written in TypeScript

Usage

Install package

# NPM
npm install tiny-tiny-storage

# Yarn
yarn add tiny-tiny-storage

set item

import storage from 'tiny-tiny-storage';
storage.set('key', value);

get item

import storage from 'tiny-tiny-storage';
storage.get('key');

remove item

import storage from 'tiny-tiny-storage';
storage.remove('key');

Clear

It clears all storage item.

import storage from 'tiny-tiny-storage';
storage.clear();

clear without

import storage from 'tiny-tiny-storage';
storage.clearWithout(['key']);

session storage

import storage from 'tiny-tiny-storage';

storage.session.set('key', value);
storage.session.get('key');

Licence

MIT