You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@rooks/use-sessionstorage

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rooks/use-sessionstorage - npm Package Compare versions

Comparing version

to
4.0.0-canary.14

6

lib/index.browser.cjs.js

@@ -13,2 +13,8 @@ 'use strict';

}
/**
* useSessionstorage
* Tracks a value within sessionStorage and updates it
* @param key Key of the value to be stored
* @param defaultValue Default value of the stored item
*/
function useSessionstorage(key, defaultValue = null) {

@@ -15,0 +21,0 @@ const [value, dispatch] = react.useReducer(reducer, getValueFromSessionStorage());

@@ -11,2 +11,8 @@ import { useReducer, useEffect, useCallback } from 'react';

}
/**
* useSessionstorage
* Tracks a value within sessionStorage and updates it
* @param key Key of the value to be stored
* @param defaultValue Default value of the stored item
*/
function useSessionstorage(key, defaultValue = null) {

@@ -13,0 +19,0 @@ const [value, dispatch] = useReducer(reducer, getValueFromSessionStorage());

@@ -13,2 +13,8 @@ 'use strict';

}
/**
* useSessionstorage
* Tracks a value within sessionStorage and updates it
* @param key Key of the value to be stored
* @param defaultValue Default value of the stored item
*/
function useSessionstorage(key, defaultValue = null) {

@@ -15,0 +21,0 @@ const [value, dispatch] = react.useReducer(reducer, getValueFromSessionStorage());

@@ -11,2 +11,8 @@ import { useReducer, useEffect, useCallback } from 'react';

}
/**
* useSessionstorage
* Tracks a value within sessionStorage and updates it
* @param key Key of the value to be stored
* @param defaultValue Default value of the stored item
*/
function useSessionstorage(key, defaultValue = null) {

@@ -13,0 +19,0 @@ const [value, dispatch] = useReducer(reducer, getValueFromSessionStorage());

@@ -15,2 +15,8 @@ (function (global, factory) {

}
/**
* useSessionstorage
* Tracks a value within sessionStorage and updates it
* @param key Key of the value to be stored
* @param defaultValue Default value of the stored item
*/
function useSessionstorage(key, defaultValue = null) {

@@ -17,0 +23,0 @@ const [value, dispatch] = react.useReducer(reducer, getValueFromSessionStorage());

@@ -15,4 +15,10 @@ interface StorageHandlerAsObject {

}
/**
* useSessionstorage
* Tracks a value within sessionStorage and updates it
* @param key Key of the value to be stored
* @param defaultValue Default value of the stored item
*/
declare function useSessionstorage(key: string, defaultValue?: any): StorageHandler;
export default useSessionstorage;

4

package.json

@@ -28,3 +28,3 @@ {

],
"version": "4.0.0-canary.13",
"version": "4.0.0-canary.14",
"_id": "@rooks/use-sessionstorage@",

@@ -37,3 +37,3 @@ "publishConfig": {

},
"gitHead": "1a03bfd9508cad01ae31703141966f931f7f237a"
"gitHead": "e82b49d1447d2dbd62f21c9af2c6b1c4e42b79f3"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet