From ac6074609375b3e7cf2e644822e1182f29861323 Mon Sep 17 00:00:00 2001 From: Steve Lacy Date: Thu, 5 May 2016 12:42:50 -0700 Subject: [PATCH] export an uninitialized function --- README.md | 2 +- examples/blink.js | 2 +- examples/blinkMulti.js | 2 +- examples/breathe.js | 2 +- examples/breathe2.js | 10 +++++----- examples/msi-kbd.js | 2 +- examples/sample.js | 2 +- examples/sample2.js | 20 ++++++++++---------- examples/wave.js | 2 +- examples/wave2.js | 10 +++++----- examples/wave3.js | 10 +++++----- examples/wave4.js | 10 +++++----- index.js | 4 +--- test/main.js | 2 +- 14 files changed, 39 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index c985b09..5b4c3f2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Platform tests appreciated ```javascript // require the LED module -var keyboard = require('msi-keyboard'); +var keyboard = require('msi-keyboard')(); // Set left region to high intensity, color red keyboard.color('left', { diff --git a/examples/blink.js b/examples/blink.js index 3b63c3d..78640ac 100644 --- a/examples/blink.js +++ b/examples/blink.js @@ -1,4 +1,4 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.color('left', { color: 'red', diff --git a/examples/blinkMulti.js b/examples/blinkMulti.js index d1dce25..36b84b9 100644 --- a/examples/blinkMulti.js +++ b/examples/blinkMulti.js @@ -1,4 +1,4 @@ -var keyboard = require('../'); +var keyboard = require('../')(); // Set colors before calling blink() keyboard.color('left', { diff --git a/examples/breathe.js b/examples/breathe.js index 36e0ac2..43642f5 100644 --- a/examples/breathe.js +++ b/examples/breathe.js @@ -1,4 +1,4 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('breathe', 'green', 'red', 'yellow'); //Keyboard will pulse from green, red, and yellow (in the left, middle, and right areas, respectively) high intensity to off (which is the default secondary color). diff --git a/examples/breathe2.js b/examples/breathe2.js index f277aa5..4568bd8 100644 --- a/examples/breathe2.js +++ b/examples/breathe2.js @@ -1,7 +1,7 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('breathe', { - left: {color:'blue',secondary:'red'}, - midle: {color:'blue', secondary:'red'}, - right: {color:'blue', secondary:'red'}, - }); + left: {color:'blue',secondary:'red'}, + midle: {color:'blue', secondary:'red'}, + right: {color:'blue', secondary:'red'}, +}); diff --git a/examples/msi-kbd.js b/examples/msi-kbd.js index 53cfe97..8ab11e6 100755 --- a/examples/msi-kbd.js +++ b/examples/msi-kbd.js @@ -4,7 +4,7 @@ // Hal Pomeranz (hal@deer-run.com), Deer Run Associates, 2015-04-08 // This code released under Creative Commons Attribution license (CC BY) -var keyboard = require('msi-keyboard'); +var keyboard = require('msi-keyboard')(); var argv = require('minimist')(process.argv.slice(2), { string: 'clmrM'.split(''), unknown: Usage diff --git a/examples/sample.js b/examples/sample.js index 665dc60..bd4db07 100644 --- a/examples/sample.js +++ b/examples/sample.js @@ -1,4 +1,4 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('breathe', { left: {color: 'red', intensity: 'med'}, diff --git a/examples/sample2.js b/examples/sample2.js index 02fe4b3..25d6852 100644 --- a/examples/sample2.js +++ b/examples/sample2.js @@ -1,15 +1,15 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('breathe', { - left: { - color: 'red', - intensity: 'high', - secondary:'green' - }, - right: { - color:'green', - intensity:'med' - } + left: { + color: 'red', + intensity: 'high', + secondary:'green' + }, + right: { + color:'green', + intensity:'med' + } }); diff --git a/examples/wave.js b/examples/wave.js index 56ddb46..6f7f4fb 100644 --- a/examples/wave.js +++ b/examples/wave.js @@ -1,3 +1,3 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('wave', 'blue'); diff --git a/examples/wave2.js b/examples/wave2.js index 5a216a9..6a18e54 100644 --- a/examples/wave2.js +++ b/examples/wave2.js @@ -1,7 +1,7 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('wave', { - left: 'red', - middle: 'green', - right: 'blue' - }, 5); + left: 'red', + middle: 'green', + right: 'blue' +}, 5); diff --git a/examples/wave3.js b/examples/wave3.js index e4eedab..7c88e26 100644 --- a/examples/wave3.js +++ b/examples/wave3.js @@ -1,7 +1,7 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('wave', { - left: {color:'green',secondary:'blue'}, - middle: {color:'blue', secondary:'green'}, - right: {color:'green', secondary:'blue'} - }, 2); + left: {color:'green',secondary:'blue'}, + middle: {color:'blue', secondary:'green'}, + right: {color:'green', secondary:'blue'} +}, 2); diff --git a/examples/wave4.js b/examples/wave4.js index 4b00e0e..3f457ae 100644 --- a/examples/wave4.js +++ b/examples/wave4.js @@ -1,7 +1,7 @@ -var keyboard = require('../'); +var keyboard = require('../')(); keyboard.mode('wave', { - left: {color:'blue',secondary:'red'}, - middle: {color:'blue', secondary:'red'}, - right: {color:'blue', secondary:'red'}, - }, 2); + left: {color:'blue',secondary:'red'}, + middle: {color:'blue', secondary:'red'}, + right: {color:'blue', secondary:'red'}, +}, 2); diff --git a/index.js b/index.js index 2002fd8..8aec660 100644 --- a/index.js +++ b/index.js @@ -1,3 +1 @@ -var findKeyboard = require('./lib/findKeyboard'); - -module.exports = findKeyboard(); +module.exports = require('./lib/findKeyboard'); diff --git a/test/main.js b/test/main.js index 6d17fb2..5ba1ca1 100644 --- a/test/main.js +++ b/test/main.js @@ -1,4 +1,4 @@ -var keyboard = require('../'); +var keyboard = require('../')(); var should = require('should'); require('mocha');