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

limitless-pushbullet

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

limitless-pushbullet - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

28

index.js

@@ -16,2 +16,3 @@ var Pushbullet = require('pushbullet');

.alias('r', 'grace-period')
.alias('c', 'color')
.describe('p', 'Pushbullet API key')

@@ -24,2 +25,3 @@ .describe('m', 'Milight IP address')

.describe('r', 'How many seconds to wait after one blink')
.describe('c', 'Color (0-256) 0 is purple, 27 is red, 186 is blue. Counter-clockwise of the color pallete on your remote')
.argv;

@@ -76,3 +78,3 @@

if (gracePeriod && +new Date() - lastTime <= gracePeriod * 1000) {
if (enabled && gracePeriod && +new Date() - lastTime <= gracePeriod * 1000) {
enabled = false;

@@ -83,3 +85,3 @@ } else {

if (fileLocation) {
if (enabled && fileLocation) {
promise = promise.then(function () { return readFile(fileLocation, { encoding: 'utf-8' }) }).then(function (data) {

@@ -94,6 +96,24 @@ enabled = !parseInt(data.replace(/(\r\n|\n|\r)/gm,'').trim());

var color = argv.c; // white
if (color && data.application_name) {
var lcAppName = data.application_name.toLowerCase();
if (lcAppName.indexOf('inbox') >= 0) {
color -= 30;
color += color < 0 ? 256 : 0;
} else if (lcAppName.indexOf('whatsapp') >= 0) {
color = (color + 30) % 255;
}
}
milight.sendCommands(Commands.rgbw.on(group), Commands.rgbw.brightness(20));
milight.pause(500);
milight.sendCommands(Commands.rgbw.on(group), Commands.rgbw.brightness(100));
color && milight.pause(500);
color && milight.sendCommands(Commands.rgbw.hue(color));
color && milight.sendCommands(Commands.rgbw.brightness(10));
color && milight.sendCommands(Commands.rgbw.brightness(100));
milight.pause(250);
color && milight.sendCommands(Commands.rgbw.brightness(10));
color && milight.pause(500);
color && milight.sendCommands(Commands.rgbw.whiteMode(group));
milight.sendCommands(Commands.rgbw.brightness(100));
});
});

2

package.json
{
"name": "limitless-pushbullet",
"version": "1.0.1",
"version": "1.1.0",
"description": "Use this app to make your LimitlessLED / MiLight blink when you receive a pushbullet notification",

@@ -5,0 +5,0 @@ "main": "index.js",

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