tiny-localstorage

1.1.6 • Public • Published

What is that?

Tiny "TLS" Local Storage it's just a HTML5/JS Local Storage "things" to store and get stuff!

Installing

Be sure you have Node JS installed.
npm i tiny-localstorage

Usage

First thing is import TLS
import TLS from 'tiny-localstorage'

Now, you can save TLS into a variable (optional, you can use directly)
let tls = TLS

You can be happy with these methods()

SET
Insert one item like a json object or some variable passing its name as string type and the object itself as parameter
tls.set("itemName", itemContent)

GET
Get one item passing its name as string parameter
tls.get("itemName")

DELETE
Delete one item passing its name in string format as parameter
tls.del("itemName")

CHECK
Return true if exist a item passing its name as string parameter
tls.chk("itemName")

CLEAR
...and all storage is gone! Forever...
tls.clr()

Package Sidebar

Install

npm i tiny-localstorage

Weekly Downloads

6

Version

1.1.6

License

ISC

Unpacked Size

2.67 kB

Total Files

3

Last publish

Collaborators

  • joaocarlosalves