Skip to content
Permalink
Browse files

💀 I am the VAR destroyer 💀

  • Loading branch information
dkordik committed Sep 11, 2015
1 parent f2696e9 commit 2fda9953057cc051f97913ab1bc33276e04025d4
@@ -1,5 +1,5 @@
import ButtonRegistrar from './lib/button-registrar.js';
var buttonRegistrar = new ButtonRegistrar();
const buttonRegistrar = new ButtonRegistrar();

import { toggleLights } from './lib/lights';

@@ -6,7 +6,7 @@ export default class ButtonRegistrar {
}

add(address, logName, handler) {
var button = nodeDashButton(address);
const button = nodeDashButton(address);

button.on("detected", () => {
console.log(`${logName} pressed.`, new Date());
@@ -10,7 +10,7 @@ export function toggleLights(lightGroupNum = 1) {

const GROUP_URL = `${API_URL}/groups/${lightGroupNum}`;

var updateLights = function (payload) {
const updateLights = function (payload) {
return request({
url: `${GROUP_URL}/action`,
method: "PUT",
@@ -4,7 +4,7 @@ import { exec } from 'child_process';

const LIGHTS_SCRIPTS_LOCATION = `${__dirname}/../../../lights/`;

var sys = function (command) {
const sys = function (command) {
exec(command, function (error, stdout, stderr) {
if (stdout) { console.log('stdout: ' + stdout); }
if (stderr) { console.log('stderr: ' + stderr); }
@@ -15,7 +15,7 @@ var sys = function (command) {
});
}

var lightsScript = function (command) {
const lightsScript = function (command) {
sys(LIGHTS_SCRIPTS_LOCATION + command)
};

@@ -7,7 +7,7 @@ import fsevents from 'fsevents';
const TRANSPORT_FILE=`${__dirname}/.transport`;

export function subscribe(handler) {
var watcher = fsevents(TRANSPORT_FILE);
const watcher = fsevents(TRANSPORT_FILE);

watcher.on('change', (path, info) => {
readFile(path, "utf-8", (err, data) => {
@@ -10,7 +10,7 @@ if (process.getuid() === 0) {
process.exit(1);
}

var lastSource = "";
let lastSource = "";

nowplaying.on("playing", ({ source }) => {
if (lastSource != source) {

0 comments on commit 2fda995

Please sign in to comment.
You can’t perform that action at this time.