Great Efue Web Storage
A package that handles LocalStorage, SessionStorage encryption and decryption.
Table of Contents
Installation
$ yarn add greatefue-webstorage
$ npm i greatefue-webstorage
Usage
In your .ts or .js file,
- import the package
import { LS_Save, LS_Get } from 'greatefue-webstorage';
- Call the function
LS_Save("key", "data"); //O8tT%PnlxR%M2#dwcuA7Qmzv+sbCk={(-=_!uV@oPHCjX>N{oT@ms+)*(%%^f'I@Dm*(Ym!ER9CpQ3VOGIXV4+G2Ol1iYZj@#$_&
console.log(LS_Get("key")); //data
Complete Usage Table
Functions | Return Data type | Description | Example |
---|---|---|---|
LS_Save | void | Encrypt and save string value to local storage | LS_Save("key", "data"); |
LS_Get | string | Get and decrypt string value from local storage | LS_Get("key") |
LS_SaveObject | void | Encrypt and save object value to local storage | LS_SaveObject("key", {}); |
LS_GetObject | object | Get and decrypt object value from local storage | LS_GetObject("key") |
LS_SaveArray | void | Encrypt and save array value to local storage | LS_SaveArray("key", []); |
LS_GetArray | array | Get and decrypt array value from local storage | LS_SaveArray("key") |
SS_Save | void | Encrypt and save string value to session storage | SS_Save("key", "data"); |
SS_Get | string | Get and decrypt string value from session storage | SS_Get("key") |
SS_SaveObject | void | Encrypt and save object value to session storage | SS_SaveObject("key", {}); |
SS_GetObject | object | Get and decrypt object value from session storage | SS_GetObject("key") |
SS_SaveArray | void | Encrypt and save array value to session storage | SS_SaveArray("key", []); |
SS_GetArray | array | Get and decrypt array value from session storage | SS_SaveArray("key") |
Author
Great Efue
Please consider supporting me on Patreon. Become a Patron of Great Efue!
License
Team
These are folks that keep the project moving and are resources for help.
Technical Steering Committee (TSC)
The people who manage releases, review feature requests, and meet regularly to ensure GreatEfue-webstorage is properly maintained.
Great Efue |
Reviewers
The people who review and implement new features.
Great Efue |
Committers
The people who review and fix bugs and help triage issues.
Great Efue |