Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@analytics/session-storage-utils
Advanced tools
Readme
A tiny sessionStorage utility library with fallbacks in 239 bytes
.
This module will automatically fail back to global window storage if sessionStorage
is not available.
Exposes hasSessionStorage
, getItem
, setItem
, & removeItem
functions.
Install @analytics/session-storage-utils
from npm.
npm install @analytics/session-storage-utils
Below is the api for @analytics/session-storage-utils
. These utilities are tree-shakable.
hasSessionStorage
Check if sessionStorage is supported
import { hasSessionStorage } from '@analytics/session-storage-utils'
if (hasSessionStorage()) {
// Use session storage
}
getSessionItem
Get a sessionStorage value.
import { getSessionItem } from '@analytics/session-storage-utils'
const value = getItem('item-key')
setSessionItem
Set a sessionStorage value.
import { setSessionItem } from '@analytics/session-storage-utils'
setSessionItem('item-key', 'a')
removeSessionItem
Delete a sessionStorage value.
import { removeSessionItem } from '@analytics/session-storage-utils'
removeSessionItem('item-key')
FAQs
Tiny SessionStorage utility library
The npm package @analytics/session-storage-utils receives a total of 117,234 weekly downloads. As such, @analytics/session-storage-utils popularity was classified as popular.
We found that @analytics/session-storage-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.