Comparing version 1.0.0 to 1.0.1
## 2016-03-09 | ||
Bump v1.0.0 | ||
update readme & test, bump v1.0.1 | ||
## 2016-03-09 | ||
bump v1.0.0 |
{ | ||
"name": "mongolass", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Elegant MongoDB driver for Node.js.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -70,15 +70,15 @@ ## Mongolass | ||
** mongodb ** | ||
**mongodb** | ||
``` | ||
MongoClient.connect(..., function(err, db) { | ||
db.listCollections() | ||
}) | ||
``` | ||
** Mongolass ** | ||
``` | ||
MongoClient.connect(..., function(err, db) { | ||
db.listCollections() | ||
}) | ||
``` | ||
**Mongolass** | ||
``` | ||
mongolass.connect(...) | ||
mongolass.listCollections() | ||
``` | ||
``` | ||
mongolass.connect(...) | ||
mongolass.listCollections() | ||
``` | ||
@@ -159,3 +159,3 @@ 2. Optional schema, only used for parameter validation before insert document to mongodb. | ||
** NOTE**: Different order of calling plugins will output different results. | ||
**NOTE**: Different order of calling plugins will output different results. | ||
@@ -162,0 +162,0 @@ ## Test |
'use strict'; | ||
const MONGODB = process.env.MONGODB || 'mongodb://localhost:27017/test'; | ||
let assert = require('assert'); | ||
@@ -8,3 +10,3 @@ let Mongolass = require('..'); | ||
let Model = Mongolass.Model; | ||
let mongolass = new Mongolass(); | ||
let mongolass = new Mongolass(MONGODB); | ||
@@ -33,2 +35,3 @@ describe('index.js', function () { | ||
let mongolass2 = new Mongolass(); | ||
yield mongolass2.connect(MONGODB); | ||
mongolass2.disconnect(); | ||
@@ -38,3 +41,3 @@ assert.deepEqual(mongolass2._db, null); | ||
let mongolass3 = new Mongolass(); | ||
let mongolass3 = new Mongolass(MONGODB); | ||
yield mongolass3.connect(); | ||
@@ -44,2 +47,5 @@ mongolass3.disconnect(); | ||
assert.deepEqual(mongolass3._conn, null); | ||
let mongolass4 = new Mongolass(MONGODB); | ||
mongolass4.disconnect(); | ||
}); | ||
@@ -46,0 +52,0 @@ |
'use strict'; | ||
const MONGODB = process.env.MONGODB || 'mongodb://localhost:27017/test'; | ||
let assert = require('assert'); | ||
@@ -7,3 +9,3 @@ let Mongolass = require('..'); | ||
let Model = Mongolass.Model; | ||
let mongolass = new Mongolass(); | ||
let mongolass = new Mongolass(MONGODB); | ||
@@ -10,0 +12,0 @@ describe('index.js', function () { |
'use strict'; | ||
const MONGODB = process.env.MONGODB || 'mongodb://localhost:27017/test'; | ||
let assert = require('assert'); | ||
let Mongolass = require('..'); | ||
let mongolass = new Mongolass(); | ||
let mongolass = new Mongolass(MONGODB); | ||
@@ -7,0 +9,0 @@ let User = mongolass.model('User'); |
'use strict'; | ||
const MONGODB = process.env.MONGODB || 'mongodb://localhost:27017/test'; | ||
let assert = require('assert'); | ||
let Mongolass = require('..'); | ||
let mongolass = new Mongolass(); | ||
let mongolass = new Mongolass(MONGODB); | ||
@@ -7,0 +9,0 @@ let User = mongolass.model('User'); |
'use strict'; | ||
const MONGODB = process.env.MONGODB || 'mongodb://localhost:27017/test'; | ||
let assert = require('assert'); | ||
let Mongolass = require('..'); | ||
let Schema = Mongolass.Schema; | ||
let mongolass = new Mongolass('mongodb://localhost:27017/test'); | ||
let mongolass = new Mongolass(MONGODB); | ||
@@ -8,0 +10,0 @@ let UserSchema = new Schema('User', { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41245
1074
5