From 4737e702845c0a868d6b036382826c01896b14bd Mon Sep 17 00:00:00 2001 From: Benjamin Pannell Date: Fri, 11 Mar 2016 10:15:19 +0200 Subject: [PATCH] style: Fix various other linting style issues --- benchmarks/mongodb.ts | 28 ++++++++++++++-------------- dist/index.js | 18 +++++++++--------- dist/index.js.map | 2 +- index.d.ts | 2 +- index.ts | 32 ++++++++++++++++---------------- iridium.d.ts | 4 ++-- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/benchmarks/mongodb.ts b/benchmarks/mongodb.ts index b1dcfcb..b672e85 100644 --- a/benchmarks/mongodb.ts +++ b/benchmarks/mongodb.ts @@ -1,9 +1,9 @@ /// -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; @@ -29,7 +29,7 @@ class WrappedUser extends Iridium.Instance { class IridiumDB extends Iridium.Core { constructor() { - super({ database: 'test' }); + super({ database: "test" }); } User = new Iridium.Model(this, User); @@ -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(); @@ -71,7 +71,7 @@ iDB.connect() .then(() => iDB.UserWrapped.remove()) .then(() => { 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); }); @@ -79,14 +79,14 @@ iDB.connect() }) .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((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); }); @@ -97,7 +97,7 @@ iDB.connect() .then(() => benchmark("MongoDB find()",() => null,() => { return new Bluebird((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); }); @@ -108,7 +108,7 @@ iDB.connect() .then(() => { return new Bluebird((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); }); @@ -116,14 +116,14 @@ iDB.connect() }) .then(() => benchmark("MongoDB remove()",(objects) => { return new Bluebird((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((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); }); diff --git a/dist/index.js b/dist/index.js index 5d9d870..72e65c0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2,14 +2,14 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } -__export(require('./lib/Core')); -__export(require('./lib/Model')); -__export(require('./lib/Instance')); -__export(require('./lib/Decorators')); -__export(require('./lib/Transforms')); -__export(require('./lib/caches/MemoryCache')); -__export(require('./lib/caches/NoOpCache')); -__export(require('./lib/cacheControllers/IDDirector')); -__export(require('./lib/utils/ObjectID')); +__export(require("./lib/Core")); +__export(require("./lib/Model")); +__export(require("./lib/Instance")); +__export(require("./lib/Decorators")); +__export(require("./lib/Transforms")); +__export(require("./lib/caches/MemoryCache")); +__export(require("./lib/caches/NoOpCache")); +__export(require("./lib/cacheControllers/IDDirector")); +__export(require("./lib/utils/ObjectID")); //# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map index 7a0fe37..fb79492 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,YAAY,CAAC,EAAA;AAC3B,iBAAc,aAAa,CAAC,EAAA;AAC5B,iBAAc,gBAAgB,CAAC,EAAA;AAE/B,iBAAc,kBAAkB,CAAC,EAAA;AASjC,iBAAc,kBAAkB,CAAC,EAAA;AAEjC,iBAAc,0BAA0B,CAAC,EAAA;AACzC,iBAAc,wBAAwB,CAAC,EAAA;AAEvC,iBAAc,mCAAmC,CAAC,EAAA;AAElD,iBAAc,sBAAsB,CAAC,EAAA","file":"index.js","sourcesContent":["export * from './lib/Core';\r\nexport * from './lib/Model';\r\nexport * from './lib/Instance';\r\n\r\nexport * from './lib/Decorators';\r\n\r\nexport * from './lib/Plugins';\r\nexport * from './lib/Schema';\r\nexport * from './lib/Cache';\r\nexport * from './lib/CacheDirector';\r\nexport * from './lib/ModelOptions';\r\nexport * from './lib/Configuration';\r\nexport * from './lib/Hooks';\r\nexport * from './lib/Transforms';\r\n\r\nexport * from './lib/caches/MemoryCache';\r\nexport * from './lib/caches/NoOpCache';\r\n\r\nexport * from './lib/cacheControllers/IDDirector';\r\n\r\nexport * from './lib/utils/ObjectID';\r\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;AAAA,iBAAc,YAAY,CAAC,EAAA;AAC3B,iBAAc,aAAa,CAAC,EAAA;AAC5B,iBAAc,gBAAgB,CAAC,EAAA;AAE/B,iBAAc,kBAAkB,CAAC,EAAA;AASjC,iBAAc,kBAAkB,CAAC,EAAA;AAEjC,iBAAc,0BAA0B,CAAC,EAAA;AACzC,iBAAc,wBAAwB,CAAC,EAAA;AAEvC,iBAAc,mCAAmC,CAAC,EAAA;AAElD,iBAAc,sBAAsB,CAAC,EAAA","file":"index.js","sourcesContent":["export * from \"./lib/Core\";\r\nexport * from \"./lib/Model\";\r\nexport * from \"./lib/Instance\";\r\n\r\nexport * from \"./lib/Decorators\";\r\n\r\nexport * from \"./lib/Plugins\";\r\nexport * from \"./lib/Schema\";\r\nexport * from \"./lib/Cache\";\r\nexport * from \"./lib/CacheDirector\";\r\nexport * from \"./lib/ModelOptions\";\r\nexport * from \"./lib/Configuration\";\r\nexport * from \"./lib/Hooks\";\r\nexport * from \"./lib/Transforms\";\r\n\r\nexport * from \"./lib/caches/MemoryCache\";\r\nexport * from \"./lib/caches/NoOpCache\";\r\n\r\nexport * from \"./lib/cacheControllers/IDDirector\";\r\n\r\nexport * from \"./lib/utils/ObjectID\";\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 12dbaf5..3aa4408 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1 +1 @@ -export * from './index'; \ No newline at end of file +export * from "./index"; \ No newline at end of file diff --git a/index.ts b/index.ts index 5893e96..251c889 100644 --- a/index.ts +++ b/index.ts @@ -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"; diff --git a/iridium.d.ts b/iridium.d.ts index 2f0553d..b0cd078 100644 --- a/iridium.d.ts +++ b/iridium.d.ts @@ -1,5 +1,5 @@ /// -declare module 'iridium' { - import Iridium = require('iridium/index'); +declare module "iridium" { + import Iridium = require("iridium/index"); export = Iridium; } \ No newline at end of file