nanoleafy-js
Version:
An API client & command-line tool for the Nanoleaf Aurora light.
33 lines (26 loc) • 572 B
JavaScript
;
const
API = require('../index'),
chalk = require('chalk');
function builder(yargs) {}
function handler(argv)
{
const aurora = new API();
if (argv.number)
{
return aurora.setSaturation(argv.number).then(() =>
{
console.log(`saturation ➜ ${chalk.bold.magenta(argv.number)}`);
});
}
aurora.saturation().then(v =>
{
console.log(`saturation == ${chalk.bold.magenta(v)}`);
});
}
module.exports = {
command : 'saturation [number]',
describe: 'get or set the overall saturation',
builder,
handler
};