This project provides a set of utility functions for interacting with the browser's session storage. The Sessions
class offers methods to set, get, update, remove, and clear session storage items, as well as retrieve all session storage keys.
You can install the package via npm:
npm install @sophat/sessions
Or using yarn:
yarn add @sophat/sessions
Or using local via github
cd project_dir/packages && git clone https://github.com/pphatdev/sessions.git && npm link @sophat/sessions
import { Sessions } from '@sophat/sessions';
Sessions.setItem('key', 'value');
const value = Sessions.getItem('key');
Sessions.updateItem('key', 'newValue');
Sessions.removeItem('key');
Sessions.clear();
const keys = Sessions.getKeys();
This project is licensed under the MIT License.