svelte-mq-store
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -1,2 +0,2 @@ | ||
/// <reference types="svelte" /> | ||
export declare const listen: <T = undefined>(key: string, fallback?: T | undefined) => import("svelte/store").Readable<boolean | T>; | ||
import { Listen } from './types/Listen.js'; | ||
export declare const listen: Listen; |
@@ -1,7 +0,1 @@ | ||
import { BROWSER } from 'esm-env'; | ||
import { readable } from 'svelte/store'; | ||
export const listen = (key, fallback) => readable(BROWSER ? matchMedia(key).matches : fallback, (set) => { | ||
if (BROWSER) { | ||
matchMedia(key).addEventListener('change', (e) => set(e.matches)); | ||
} | ||
}); | ||
export {}; |
{ | ||
"name": "svelte-mq-store", | ||
"description": "📱 Create any media-query store in Svelte", | ||
"version": "1.0.0", | ||
"main": "dist/index.js", | ||
"version": "2.0.0", | ||
"type": "module", | ||
@@ -10,9 +9,9 @@ "exports": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
"worker": "./dist/fallback.js", | ||
"browser": "./dist/browser.js", | ||
"default": "./dist/fallback.js" | ||
} | ||
}, | ||
"files": [ | ||
"dist", | ||
"!*.test.*", | ||
"!*.spec.*" | ||
"dist" | ||
], | ||
@@ -39,3 +38,3 @@ "license": "MIT", | ||
"lint": "npx eslint . && npx depcheck", | ||
"format": "npx prettier --write ." | ||
"format": "npx prettier -w ." | ||
}, | ||
@@ -45,12 +44,9 @@ "peerDependencies": { | ||
}, | ||
"prettier": "@jill64/prettier-config", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "6.13.1", | ||
"@typescript-eslint/parser": "6.13.1", | ||
"eslint-plugin-deprecation": "2.0.0", | ||
"svelte": "4.2.7", | ||
"@jill64/eslint-config-ts": "1.0.0", | ||
"@jill64/prettier-config": "1.0.0", | ||
"svelte": "4.2.8", | ||
"typescript": "5.3.2" | ||
}, | ||
"dependencies": { | ||
"esm-env": "1.0.0" | ||
} | ||
} |
@@ -9,2 +9,4 @@ <!----- BEGIN GHOST DOCS HEADER -----> | ||
<!----- END GHOST DOCS HEADER -----> | ||
## Installation | ||
@@ -16,4 +18,2 @@ | ||
<!----- END GHOST DOCS HEADER -----> | ||
## Usage | ||
@@ -20,0 +20,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3853
1
4
11
17
0
- Removedesm-env@1.0.0
- Removedesm-env@1.0.0(transitive)