1.0.1 • Published 4 years ago
is-night-mode v1.0.1
is-night-mode
Check if is night mode
Install
$ npm install is-night-mode
# or
$ yarn add is-night-mode
Usage
const isNightMode = require("is-night-mode");
// default options
const options = {
day: 6,
night: 20,
checkLocalStorage: false,
itemName: "night-mode",
checkOSTheme: false
};
isNightMode(); // without passing options default options are defined
//=> true || false
isNightMode(options); // with passing custom options
//=> true || false
License
MIT © Abdessalam BENHARIRA