You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

use-local-storage-state

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-local-storage-state - npm Package Compare versions

Comparing version

to
19.1.0

15

package.json
{
"name": "use-local-storage-state",
"version": "19.0.4",
"version": "19.1.0",
"description": "React hook that persist data in localStorage",

@@ -35,3 +35,3 @@ "license": "MIT",

"lint": "eslint --cache --format=pretty --ext=.ts ./",
"test": "yarn run build && yarn run lint && if [[ -z $CI ]]; then jest --coverage --coverageReporters=text; else jest --coverage; fi",
"test": "yarn run build && yarn run lint && if [[ -z $CI ]]; then vitest --run --coverage.enabled --coverage.reporter=text --coverage.reporter=html --coverage.reporter=clover --coverage.provider=istanbul; else vitest --run; fi",
"release": "yarn run build && np",

@@ -55,4 +55,3 @@ "prettier": "prettier --write --config .prettierrc.yaml {*.ts,*.json}"

"@size-limit/preset-small-lib": "^8.0.0",
"@testing-library/react": "^13.3.0",
"@types/jest": "^28.1.6",
"@testing-library/react": "^14.0.0",
"@types/react": "^18.0.17",

@@ -62,2 +61,3 @@ "@types/react-dom": "^18.0.6",

"@typescript-eslint/parser": "^6.3.0",
"@vitest/coverage-istanbul": "^0.34.4",
"confusing-browser-globals": "^1.0.11",

@@ -71,4 +71,3 @@ "eslint": "^8.21.0",

"eslint-plugin-unicorn": "^43.0.2",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jsdom": "^22.1.0",
"np": "^7.6.3",

@@ -81,4 +80,4 @@ "prettier": "^2.6.2",

"superjson": "^1.9.1",
"ts-jest": "^28.0.7",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"vitest": "^0.34.4"
},

@@ -85,0 +84,0 @@ "size-limit": [

@@ -7,3 +7,2 @@ # `use-local-storage-state`

[![Gzipped Size](https://img.shields.io/bundlephobia/minzip/use-local-storage-state)](https://bundlephobia.com/result?p=use-local-storage-state)
[![Test Coverage](https://img.shields.io/codeclimate/coverage/astoilkov/use-local-storage-state)](https://codeclimate.com/github/astoilkov/use-local-storage-state/test_coverage)
[![Build Status](https://img.shields.io/github/actions/workflow/status/astoilkov/use-local-storage-state/main.yml?branch=main)](https://github.com/astoilkov/use-local-storage-state/actions/workflows/main.yml)

@@ -10,0 +9,0 @@

@@ -19,4 +19,4 @@ import type { Dispatch, SetStateAction } from 'react';

];
export default function useLocalStorageState(key: string, options?: Omit<LocalStorageOptions<unknown>, 'defaultValue'>): LocalStorageState<unknown>;
export default function useLocalStorageState(key: string, options?: LocalStorageOptions<undefined>): LocalStorageState<unknown>;
export default function useLocalStorageState<T>(key: string, options?: Omit<LocalStorageOptions<T | undefined>, 'defaultValue'>): LocalStorageState<T | undefined>;
export default function useLocalStorageState<T>(key: string, options?: LocalStorageOptions<T>): LocalStorageState<T>;