bookshelf-modelbase
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -51,2 +51,3 @@ var extend = require('xtend') | ||
findAll: function (filter, options) { | ||
filter = extend({}, filter) | ||
return this.forge().query({ where: filter }).fetchAll(options) | ||
@@ -62,3 +63,3 @@ }, | ||
findOne: function (data, options) { | ||
options = extend({ require: true }, options || {}) | ||
options = extend({ require: true }, options) | ||
return this.forge(data).fetch(options) | ||
@@ -85,3 +86,3 @@ }, | ||
update: function (data, options) { | ||
options = extend({ patch: true, require: true }, options || {}) | ||
options = extend({ patch: true, require: true }, options) | ||
return this.forge({ id: options.id }).fetch(options) | ||
@@ -99,3 +100,3 @@ .then(function (model) { | ||
destroy: function (options) { | ||
options = extend({ require: true }, options || {}) | ||
options = extend({ require: true }, options) | ||
return this.forge({ id: options.id }) | ||
@@ -112,3 +113,3 @@ .destroy(options) | ||
findOrCreate: function (data, options) { | ||
options = extend({ require: false }, options || {}) | ||
options = extend({ require: false }, options) | ||
return this.findOne(data, options) | ||
@@ -115,0 +116,0 @@ .bind(this) |
{ | ||
"name": "bookshelf-modelbase", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Extensible ModelBase for bookshelf-based model layers", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
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
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
16316
290