is-darkmode
Advanced tools
Comparing version 0.0.1 to 0.0.2
10
index.js
@@ -1,5 +0,9 @@ | ||
function isDarkMode() { | ||
return "Nothing to see here"; | ||
function isDarkmode() { | ||
if (window.matchMedia("(prefers-color-scheme: dark)").matches) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
module.exports = isDarkMode; | ||
module.exports.isDarkmode = isDarkmode; |
{ | ||
"name": "is-darkmode", | ||
"version": "0.0.1", | ||
"description": "Reserved for future use", | ||
"version": "0.0.2", | ||
"description": "A simple utility to find whether darkmode is enabled", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "node test.js" | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
@@ -14,7 +14,16 @@ "repository": { | ||
"author": "mcnaveen <me@mcnaveen.com>", | ||
"license": "ISC", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/mcnaveen/is-darkmode/issues" | ||
}, | ||
"homepage": "https://github.com/mcnaveen/is-darkmode#readme" | ||
"homepage": "https://github.com/mcnaveen/is-darkmode#readme", | ||
"keywords": [ | ||
"darkmode", | ||
"is-darkmode", | ||
"color-scheme", | ||
"prefers-color-scheme", | ||
"display-theme", | ||
"lightmode", | ||
"is-lightmode" | ||
] | ||
} |
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
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
3326
5
9
1
73