Skip to content
Browse files

Stop using multiline variable declarations.

  • Loading branch information...
1 parent f19cb95 commit df09daca86a65ed28b9de2dc84275feff6db45f1 @MathieuTurcotte committed May 6, 2013
View
4 examples/all-functionnal.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
-var ewait = require('../index'),
- Delay = require('./delay');
+var Delay = require('./delay');
+var ewait = require('../index');
var delays = [
new Delay(200),
View
6 examples/all-timeout.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
-var WaitForAll = require('../index').WaitForAll,
- Delay = require('./delay');
+var Delay = require('./delay');
+var ewait = require('../index');
var delays = [
new Delay(200),
@@ -10,7 +10,7 @@ var delays = [
];
// Only two delays will fire before timeout.
-var all = new WaitForAll({
+var all = new ewait.WaitForAll({
timeout: 800,
event: 'done'
});
View
6 examples/all.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
-var WaitForAll = require('../index').WaitForAll,
- Delay = require('./delay');
+var Delay = require('./delay');
+var ewait = require('../index');
var delays = [
new Delay(200),
@@ -10,7 +10,7 @@ var delays = [
];
// All delays will fire before timeout.
-var all = new WaitForAll({
+var all = new ewait.WaitForAll({
timeout: 2000,
event: 'done'
});
View
4 examples/any-functionnal.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
-var ewait = require('../index'),
- Delay = require('./delay');
+var Delay = require('./delay');
+var ewait = require('../index');
var delays = [
new Delay(200),
View
6 examples/any-timeout.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
-var WaitForAny = require('../index').WaitForAny,
- Delay = require('./delay');
+var Delay = require('./delay');
+var ewait = require('../index');
var delays = [
new Delay(200),
@@ -10,7 +10,7 @@ var delays = [
];
// No delay will fire before timeout.
-var any = new WaitForAny({
+var any = new ewait.WaitForAny({
timeout: 100,
event: 'done'
});
View
6 examples/any.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
-var WaitForAny = require('../index').WaitForAny,
- Delay = require('./delay');
+var Delay = require('./delay');
+var ewait = require('../index');
var delays = [
new Delay(200),
@@ -10,7 +10,7 @@ var delays = [
];
// First delay will fire before timeout.
-var any = new WaitForAny({
+var any = new ewait.WaitForAny({
timeout: 300,
event: 'done'
});
View
4 examples/delay.js
@@ -1,5 +1,5 @@
-var util = require('util'),
- events = require('events');
+var events = require('events');
+var util = require('util');
function Delay(delay) {
events.EventEmitter.call(this);
View
6 index.js
@@ -3,9 +3,9 @@
* Licensed under the MIT license.
*/
-var waitFn = require('./lib/waitfn'),
- WaitForAny = require('./lib/any'),
- WaitForAll = require('./lib/all');
+var WaitForAll = require('./lib/all');
+var WaitForAny = require('./lib/any');
+var waitFn = require('./lib/waitfn');
module.exports = {
WaitForAny: WaitForAny,
View
4 lib/all.js
@@ -3,8 +3,8 @@
* Licensed under the MIT license.
*/
-var util = require('util'),
- events = require('events');
+var events = require('events');
+var util = require('util');
var WaitForMultiple = require('./multiple');
View
4 lib/any.js
@@ -3,8 +3,8 @@
* Licensed under the MIT license.
*/
-var util = require('util'),
- events = require('events');
+var events = require('events');
+var util = require('util');
var WaitForMultiple = require('./multiple');
View
4 lib/multiple.js
@@ -3,8 +3,8 @@
* Licensed under the MIT license.
*/
-var util = require('util'),
- events = require('events');
+var events = require('events');
+var util = require('util');
function WaitForMultiple(opts) {
events.EventEmitter.call(this);
View
6 lib/waitfn.js
@@ -24,9 +24,9 @@ function parseTimeoutAndEventName(args) {
function makeWaitFunction(Waiter) {
return function(emitters, callback) {
- var extraArgs = Array.prototype.slice.call(arguments),
- parsedArgs = parseTimeoutAndEventName(extraArgs),
- waiter = new Waiter(parsedArgs);
+ var extraArgs = Array.prototype.slice.call(arguments);
+ var parsedArgs = parseTimeoutAndEventName(extraArgs);
+ var waiter = new Waiter(parsedArgs);
waiter.once('done', function() {
var args = Array.prototype.slice.call(arguments, 0);
View
4 tests/all.js
@@ -3,8 +3,8 @@
* Licensed under the MIT license.
*/
-var events = require('events'),
- sinon = require('sinon');
+var events = require('events');
+var sinon = require('sinon');
var WaitForAll = require('../lib/all');
View
4 tests/any.js
@@ -3,8 +3,8 @@
* Licensed under the MIT license.
*/
-var events = require('events'),
- sinon = require('sinon');
+var events = require('events');
+var sinon = require('sinon');
var WaitForAny = require('../lib/any');
View
6 tests/multiple.js
@@ -3,9 +3,9 @@
* Licensed under the MIT license.
*/
-var events = require('events'),
- sinon = require('sinon'),
- util = require('util');
+var events = require('events');
+var sinon = require('sinon');
+var util = require('util');
var WaitForMultiple = require('../lib/multiple');

0 comments on commit df09dac

Please sign in to comment.
Something went wrong with that request. Please try again.