Package Exports
- @analytics/global-storage-utils
- @analytics/global-storage-utils/dist/analytics-util-global-storage.js
- @analytics/global-storage-utils/dist/analytics-util-global-storage.module.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@analytics/global-storage-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Global Storage Utility
A tiny window storage util library in 406 bytes
.
This will work with analytics or as a standalone import in your code.
How to install
Install @analytics/global-storage-utils
from npm.
npm install @analytics/global-storage-utils
API
Below is the api for @analytics/global-storage-utils
. These utilities are tree-shakable.
import { get, set, remove } from '@analytics/global-storage-utils'
/* Set value */
set('key', 'value')
/* Get value */
const val = get('key')
console.log(val) // 'value'
/* Remove value */
remove('key')