Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solid-primitives/storage

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/storage - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

dist/chunk-2WVZGT66.js

2

dist/cookies.d.ts
import * as solid_js from 'solid-js';
import { S as StorageWithOptions, d as StorageProps, e as StorageObject, f as StorageSetter, l as StorageActions, k as StorageSignalProps } from './types-ccd8ee35';
import { S as StorageWithOptions, d as StorageProps, e as StorageObject, f as StorageSetter, l as StorageActions, k as StorageSignalProps } from './types-d16b1c57';

@@ -4,0 +4,0 @@ declare type CookieOptions = {

@@ -5,4 +5,4 @@ import {

createCookieStorageSignal
} from "./chunk-F7GMIMY5.js";
import "./chunk-KCTTCEBZ.js";
} from "./chunk-P74J3DHA.js";
import "./chunk-2WVZGT66.js";
import "./chunk-UHHZE4FR.js";

@@ -9,0 +9,0 @@ import "./chunk-JUWXSDKJ.js";

@@ -1,2 +0,2 @@

export { A as AnyStorageProps, g as AsyncStorage, i as AsyncStorageObject, j as AsyncStorageSetter, h as AsyncStorageWithOptions, a as StorageDeserializer, e as StorageObject, d as StorageProps, b as StorageSerializer, f as StorageSetter, k as StorageSignalProps, S as StorageWithOptions, c as StringStorageProps } from './types-ccd8ee35';
export { A as AnyStorageProps, g as AsyncStorage, i as AsyncStorageObject, j as AsyncStorageSetter, h as AsyncStorageWithOptions, a as StorageDeserializer, e as StorageObject, d as StorageProps, b as StorageSerializer, f as StorageSetter, k as StorageSignalProps, S as StorageWithOptions, c as StringStorageProps } from './types-d16b1c57';
export { createAsyncStorage, createLocalStorage, createSessionStorage, createStorage, createStorageSignal } from './storage';

@@ -3,0 +3,0 @@ export { CookieOptions, cookieStorage, createCookieStorage } from './cookies';

import {
cookieStorage,
createCookieStorage
} from "./chunk-F7GMIMY5.js";
} from "./chunk-P74J3DHA.js";
import {

@@ -11,3 +11,3 @@ createAsyncStorage,

createStorageSignal
} from "./chunk-KCTTCEBZ.js";
} from "./chunk-2WVZGT66.js";
import {

@@ -14,0 +14,0 @@ addClearMethod

import { Accessor, Setter } from 'solid-js';
import { c as StringStorageProps, S as StorageWithOptions, e as StorageObject, f as StorageSetter, l as StorageActions, A as AnyStorageProps, g as AsyncStorage, h as AsyncStorageWithOptions, i as AsyncStorageObject, j as AsyncStorageSetter, m as AsyncStorageActions, k as StorageSignalProps, d as StorageProps } from './types-ccd8ee35';
import { c as StringStorageProps, S as StorageWithOptions, e as StorageObject, f as StorageSetter, l as StorageActions, A as AnyStorageProps, g as AsyncStorage, h as AsyncStorageWithOptions, i as AsyncStorageObject, j as AsyncStorageSetter, m as AsyncStorageActions, k as StorageSignalProps, d as StorageProps } from './types-d16b1c57';

@@ -4,0 +4,0 @@ /**

@@ -7,3 +7,3 @@ import {

createStorageSignal
} from "./chunk-KCTTCEBZ.js";
} from "./chunk-2WVZGT66.js";
import "./chunk-JUWXSDKJ.js";

@@ -10,0 +10,0 @@ export {

@@ -1,2 +0,2 @@

import { S as StorageWithOptions } from './types-ccd8ee35';
import { S as StorageWithOptions } from './types-d16b1c57';

@@ -3,0 +3,0 @@ /**

{
"name": "@solid-primitives/storage",
"version": "1.1.1",
"version": "1.1.2",
"description": "Primitive that provides reactive wrappers for storage access",
"author": "Alex Lohr <alex.lohr@logmein.com>",
"license": "MIT",
"homepage": "https://github.com/davedbase/solid-primitives/tree/main/packages/storage",
"homepage": "https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage",
"repository": {
"type": "git",
"url": "git+https://github.com/davedbase/solid-primitives.git"
"url": "git+https://github.com/solidjs-community/solid-primitives.git"
},

@@ -46,5 +46,5 @@ "primitive": {

"devDependencies": {
"jsdom": "18.1.1",
"jsdom": "^19.0.0",
"prettier": "^2.0.5",
"solid-register": "0.1.5",
"solid-register": "^0.1.5",
"tsup": "^5.10.1",

@@ -51,0 +51,0 @@ "typescript": "^4.5.2",

@@ -0,1 +1,5 @@

<p>
<img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Storage" alt="Solid Primitives Storage">
</p>
# @solid-primitives/storage

@@ -6,3 +10,3 @@

[![size](https://img.shields.io/npm/v/@solid-primitives/storage?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/storage)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fdavedbase%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/davedbase/solid-primitives#contribution-process)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

@@ -100,3 +104,3 @@ Creates a primitive to reactively access both synchronous and asynchronous persistent storage APIs similar to localStorage.

toJSON: () => ({ [key: string]: string });
}] = createAsyncStorage({ api: CookieStoreAPI, prefix: 'my-app' });
}] = createAsyncStorage({ api: CookieStoreAPI, prefix: 'my-app', sync: false });

@@ -146,2 +150,13 @@ await setStore('key', 'value');

### Options
The properties of your `createStorage`/`createAsyncStorage`/`createStorageSignal` props are:
* `api`: the (sync or async) [Storage-like API](https://developer.mozilla.org/de/docs/Web/API/Web_Storage_API), default is localStorage
* `deserializer` (optional): a deserializer or parser for the stored data
* `serializer` (optional): a serializer or string converter for the stored data
* `options` (optional): default options for the set-call of Storage-like API, if supported
* `prefix` (optional): a prefix for the Storage keys
* `sync` (optional): if set to false, [event synchronization](https://developer.mozilla.org/en-US/docs/Web/API/StorageEvent) is disabled
### Tools

@@ -188,2 +203,5 @@

1.1.2
Added sync option to disable event synching
</details>

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc