Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bookshelf-modelbase

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bookshelf-modelbase - npm Package Compare versions

Comparing version 2.6.8 to 2.6.9

6

lib/index.js

@@ -27,7 +27,5 @@ var extend = require('xtend')

Joi.object(this.validate).keys(baseValidation)
} else {
this.validate = Joi.any()
this.on('saving', this.validateSave)
}
this.on('saving', this.validateSave)
},

@@ -34,0 +32,0 @@

{
"name": "bookshelf-modelbase",
"version": "2.6.8",
"version": "2.6.9",
"description": "Extensible ModelBase for bookshelf-based model layers",

@@ -5,0 +5,0 @@ "main": "./lib",

@@ -40,8 +40,2 @@ /* global describe, before, beforeEach, it */

})
it('should default to any validation', function () {
specimen = new ModelBase()
expect(specimen.validate.isJoi).to.eql(true)
expect(specimen.validate._type).to.eql('any')
})
})

@@ -97,2 +91,11 @@

})
it('should not validate when Model.validate is not present', function () {
var Model = ModelBase.extend({ tableName: 'test_table' })
return Model.forge({ id: 1 })
.save('first_name', 'notYoName')
.then(function (model) {
return expect(model.get('first_name')).to.equal('notYoName')
})
})
})

@@ -99,0 +102,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc