Permalink
Browse files

Semicolons and such.

  • Loading branch information...
brianloveswords committed Apr 23, 2013
1 parent 763203c commit 4d971ddd58894da631b5058e73f6870d96ea58ab
Showing with 9 additions and 9 deletions.
  1. +3 −3 lib/phrases/index.js
  2. +2 −2 models/badge.js
  3. +4 −4 tests/phrase.test.js
View
@@ -15,8 +15,8 @@ const NOUNS = fileToArray('nouns.txt');
const iterator = sandwich(ADVERBS, ADJECTIVES, NOUNS);
function phrases(count) {
- const matches = {}
- const results = []
+ const matches = {};
+ const results = [];
var length = 0;
var word;
while (length < count) {
@@ -29,4 +29,4 @@ function phrases(count) {
return results;
};
phrases.iterator = iterator;
-module.exports = phrases;
+module.exports = phrases;
View
@@ -247,7 +247,7 @@ Badge.prototype.addClaimCodes = function addClaimCodes(options, callback) {
this.claimCodes.push({ code: code });
}.bind(this));
- this.save(function (err, result) {
+ return this.save(function (err, result) {
if (err) return callback(err);
return callback(null, accepted, rejected);
});
@@ -544,7 +544,7 @@ Badge.prototype.makeAssertion = function makeAssertion(details, options, callbac
callback = options;
options = null;
}
- options = options || { json: true }
+ options = options || { json: true };
var salt = details.salt || util.randomString(64);
var assertion = {};
View
@@ -2,8 +2,8 @@ var test = require('./');
var phrases = require('../lib/phrases');
function dedupe(array) {
- const matches = {}
- const results = []
+ const matches = {};
+ const results = [];
var idx = array.length;
var word;
while (idx--) {
@@ -14,11 +14,11 @@ function dedupe(array) {
return results;
}
-test('phrases', function (t) {
+test('generating a whole bunch of phrases', function (t) {
var count = 100000;
test.clock.start('phrase generation');
- var words = phrases(count)
+ var words = phrases(count);
test.clock.stop();
test.clock.start('counting duplicates');

0 comments on commit 4d971dd

Please sign in to comment.