Skip to content

Commit

Permalink
export an uninitialized function
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlacy committed May 5, 2016
1 parent 1ba8ea7 commit ac60746
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 41 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion examples/blink.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyboard = require('../');
var keyboard = require('../')();

keyboard.color('left', {
color: 'red',
Expand Down
2 changes: 1 addition & 1 deletion examples/blinkMulti.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyboard = require('../');
var keyboard = require('../')();

// Set colors before calling blink()
keyboard.color('left', {
Expand Down
2 changes: 1 addition & 1 deletion examples/breathe.js
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
10 changes: 5 additions & 5 deletions examples/breathe2.js
Original file line number Diff line number Diff line change
@@ -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'},
});
2 changes: 1 addition & 1 deletion examples/msi-kbd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Hal Pomeranz ([email protected]), 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
Expand Down
2 changes: 1 addition & 1 deletion examples/sample.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyboard = require('../');
var keyboard = require('../')();

keyboard.mode('breathe', {
left: {color: 'red', intensity: 'med'},
Expand Down
20 changes: 10 additions & 10 deletions examples/sample2.js
Original file line number Diff line number Diff line change
@@ -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'
}
});


Expand Down
2 changes: 1 addition & 1 deletion examples/wave.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
var keyboard = require('../');
var keyboard = require('../')();

keyboard.mode('wave', 'blue');
10 changes: 5 additions & 5 deletions examples/wave2.js
Original file line number Diff line number Diff line change
@@ -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);
10 changes: 5 additions & 5 deletions examples/wave3.js
Original file line number Diff line number Diff line change
@@ -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);
10 changes: 5 additions & 5 deletions examples/wave4.js
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
var findKeyboard = require('./lib/findKeyboard');

module.exports = findKeyboard();
module.exports = require('./lib/findKeyboard');
2 changes: 1 addition & 1 deletion test/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyboard = require('../');
var keyboard = require('../')();
var should = require('should');
require('mocha');

Expand Down

0 comments on commit ac60746

Please sign in to comment.