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

@jill64/svelte-device-theme

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jill64/svelte-device-theme - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

9

dist/index.js

@@ -1,7 +0,8 @@

import { BROWSER } from 'esm-env';
import { readable } from 'svelte/store';
export const isDark = readable(BROWSER ? matchMedia('(prefers-color-scheme: dark)').matches : undefined, (set) => {
if (BROWSER) {
matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => set(e.matches));
export var isDark = readable(typeof window !== 'undefined'
? matchMedia('(prefers-color-scheme: dark)').matches
: undefined, function (set) {
if (typeof window !== 'undefined') {
matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function (e) { return set(e.matches); });
}
});
{
"name": "@jill64/svelte-device-theme",
"description": "A simple store that syncs with your device's theme settings",
"version": "0.1.0",
"version": "0.1.1",
"main": "dist/index.js",

@@ -29,2 +29,5 @@ "type": "module",

},
"publishConfig": {
"access": "public"
},
"scripts": {

@@ -39,9 +42,8 @@ "build": "tsc && publint",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"eslint": "^8.48.0",
"esm-env": "^1.0.0",
"prettier": "^3.0.3",
"publint": "^0.2.2",
"typescript": "^5.2.2"
"@typescript-eslint/eslint-plugin": "6.7.0",
"@typescript-eslint/parser": "6.7.0",
"eslint": "8.49.0",
"prettier": "3.0.3",
"publint": "0.2.2",
"typescript": "5.2.2"
},

@@ -48,0 +50,0 @@ "dependencies": {

# svelte-device-theme
![github-actions-ci](https://github.com/jill64/svelte-device-theme/actions/workflows/ci.yml/badge.svg)
A simple store that syncs with your device's theme settings

@@ -4,0 +6,0 @@

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