Skip to content

Commit

Permalink
style: Fix various other linting style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Mar 11, 2016
1 parent 22eb682 commit 4737e70
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 43 deletions.
28 changes: 14 additions & 14 deletions benchmarks/mongodb.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference path="../typings/DefinitelyTyped/tsd.d.ts" />
import Iridium = require('../index');
import Bluebird = require('bluebird');
import MongoDB = require('mongodb');
import _ = require('lodash');
import crypto = require('crypto');
import Iridium = require("../index");
import Bluebird = require("bluebird");
import MongoDB = require("mongodb");
import _ = require("lodash");
import crypto = require("crypto");

var intensity = 1000;
var samples = 3;
Expand All @@ -29,7 +29,7 @@ class WrappedUser extends Iridium.Instance<UserDocument, WrappedUser> {

class IridiumDB extends Iridium.Core {
constructor() {
super({ database: 'test' });
super({ database: "test" });
}

User = new Iridium.Model<UserDocument, User>(this, User);
Expand All @@ -43,7 +43,7 @@ function benchmark(name: string, prepare: (objects: UserDocument[]) => Bluebird<
return Bluebird.resolve(new Array(samples)).map(() => {
var objects: UserDocument[] = new Array(intensity);
for (var i = 0; i < objects.length; i++)
objects[i] = { _id: crypto.pseudoRandomBytes(16).toString('hex') };
objects[i] = { _id: crypto.pseudoRandomBytes(16).toString("hex") };

return Bluebird.resolve().then(() => prepare(objects)).then(() => {
var start = new Date();
Expand Down Expand Up @@ -71,22 +71,22 @@ iDB.connect()
.then(() => iDB.UserWrapped.remove())
.then(() => {
return new Bluebird<any>((resolve, reject) => {
iDB.connection.collection('mongodb').remove((err) => {
iDB.connection.collection("mongodb").remove((err) => {
if (err) return reject(err);
return resolve(null);
});
});
})
.then(() => benchmark("MongoDB insert()",() => {
return new Bluebird((resolve, reject) => {
iDB.connection.collection('mongodb').remove({},(err) => {
iDB.connection.collection("mongodb").remove({},(err) => {
if (err) return reject(err);
return resolve(null);
});
});
},(objects) => {
return new Bluebird<any>((resolve, reject) => {
iDB.connection.collection('mongodb').insert(objects,(err, objects) => {
iDB.connection.collection("mongodb").insert(objects,(err, objects) => {
if (err) return reject(err);
return resolve(objects);
});
Expand All @@ -97,7 +97,7 @@ iDB.connect()

.then(() => benchmark("MongoDB find()",() => null,() => {
return new Bluebird<any>((resolve, reject) => {
iDB.connection.collection('mongodb').find().toArray((err, objects: any) => {
iDB.connection.collection("mongodb").find().toArray((err, objects: any) => {
if (err) return reject(err);
return resolve(objects);
});
Expand All @@ -108,22 +108,22 @@ iDB.connect()

.then(() => {
return new Bluebird<any>((resolve, reject) => {
iDB.connection.collection('mongodb').remove((err, objects: any) => {
iDB.connection.collection("mongodb").remove((err, objects: any) => {
if (err) return reject(err);
return resolve(objects);
});
});
})
.then(() => benchmark("MongoDB remove()",(objects) => {
return new Bluebird<any>((resolve, reject) => {
iDB.connection.collection('mongodb').insert(objects,(err, objects) => {
iDB.connection.collection("mongodb").insert(objects,(err, objects) => {
if (err) return reject(err);
return resolve(objects);
});
});
},() => {
return new Bluebird<any>((resolve, reject) => {
iDB.connection.collection('mongodb').remove((err, objects: any) => {
iDB.connection.collection("mongodb").remove((err, objects: any) => {
if (err) return reject(err);
return resolve(objects);
});
Expand Down
18 changes: 9 additions & 9 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './index';
export * from "./index";
32 changes: 16 additions & 16 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
export * from './lib/Core';
export * from './lib/Model';
export * from './lib/Instance';
export * from "./lib/Core";
export * from "./lib/Model";
export * from "./lib/Instance";

export * from './lib/Decorators';
export * from "./lib/Decorators";

export * from './lib/Plugins';
export * from './lib/Schema';
export * from './lib/Cache';
export * from './lib/CacheDirector';
export * from './lib/ModelOptions';
export * from './lib/Configuration';
export * from './lib/Hooks';
export * from './lib/Transforms';
export * from "./lib/Plugins";
export * from "./lib/Schema";
export * from "./lib/Cache";
export * from "./lib/CacheDirector";
export * from "./lib/ModelOptions";
export * from "./lib/Configuration";
export * from "./lib/Hooks";
export * from "./lib/Transforms";

export * from './lib/caches/MemoryCache';
export * from './lib/caches/NoOpCache';
export * from "./lib/caches/MemoryCache";
export * from "./lib/caches/NoOpCache";

export * from './lib/cacheControllers/IDDirector';
export * from "./lib/cacheControllers/IDDirector";

export * from './lib/utils/ObjectID';
export * from "./lib/utils/ObjectID";
4 changes: 2 additions & 2 deletions iridium.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference path="index.ts" />
declare module 'iridium' {
import Iridium = require('iridium/index');
declare module "iridium" {
import Iridium = require("iridium/index");
export = Iridium;
}

0 comments on commit 4737e70

Please sign in to comment.