@nanostores/solid
Advanced tools
Comparing version 0.4.2 to 0.5.0
@@ -1,1 +0,1 @@ | ||
import{createStore as s,reconcile as a,unwrap as u}from"solid-js/store";import{onCleanup as c}from"solid-js";function p(o){let t=o.get(),[r,e]=i(t),n=o.subscribe(e);return c(()=>n()),r}function i(o){let[t,r]=s({value:o});return[()=>t.value,e=>{let n=u(t.value);return typeof e=="function"&&(e=e(n)),r("value",a(e)),t.value}]}export{p as useStore}; | ||
import{createStore as u,reconcile as c}from"solid-js/store";import{onCleanup as a}from"solid-js";function l(e){let t=e.listen(()=>{}),[o,r]=u({value:e.get()}),s=e.subscribe(n=>{r("value",c(n))});return a(()=>s()),t(),()=>o.value}export{l as useStore}; |
{ | ||
"name": "@nanostores/solid", | ||
"type": "module", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"packageManager": "pnpm@9.11.0", | ||
"description": "Solid integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores.", | ||
"publishConfig": { | ||
"directory": "package" | ||
}, | ||
"author": "Robert Soriano <sorianorobertc@gmail.com>", | ||
@@ -22,17 +20,53 @@ "license": "MIT", | ||
], | ||
"exports": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsup", | ||
"test": "vitest run", | ||
"test:watch": "vitest watch", | ||
"release": "bumpp --commit --tag --push", | ||
"prepublishOnly": "pnpm build", | ||
"format": "prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\"", | ||
"lint": "concurrently pnpm:lint:*", | ||
"lint:code": "eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{ts,tsx}", | ||
"lint:types": "tsc --noEmit" | ||
}, | ||
"peerDependencies": { | ||
"nanostores": ">=0.8.0", | ||
"nanostores": "^0.9.0 || ^0.10.0 || ^0.11.0", | ||
"solid-js": "^1.6.0" | ||
}, | ||
"scripts": {} | ||
} | ||
"devDependencies": { | ||
"@solidjs/testing-library": "^0.8.10", | ||
"@testing-library/jest-dom": "^6.5.0", | ||
"@typescript-eslint/eslint-plugin": "^7.9.0", | ||
"@typescript-eslint/parser": "^7.9.0", | ||
"bumpp": "^9.5.2", | ||
"concurrently": "^9.0.1", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-no-only-tests": "^3.1.0", | ||
"jsdom": "^22.0.0", | ||
"nanodelay": "^2.0.2", | ||
"nanostores": "^0.11.3", | ||
"prettier": "3.0.0", | ||
"solid-js": "^1.9.1", | ||
"tsup": "^8.0.2", | ||
"typescript": "^5.4.5", | ||
"vite-plugin-solid": "^2.10.2", | ||
"vitest": "^2.1.1" | ||
} | ||
} |
@@ -41,3 +41,3 @@ # Nano Store Solid | ||
// Use computed stores to create chains of reactive computations. | ||
export const doubled = computed(counter, current => current.count * 2); | ||
export const doubled = computed(counter, current => current * 2); | ||
``` | ||
@@ -44,0 +44,0 @@ |
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
7909
2
18
14