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

beyo-model-validation

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beyo-model-validation - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

4

lib/validation.js

@@ -52,3 +52,3 @@

modelDef.prototype.validate = {
Object.defineProperty(modelDef.constructor.prototype, 'validate', {
enumerable: true,

@@ -60,3 +60,3 @@ configurable: false,

}
};
});
});

@@ -63,0 +63,0 @@

@@ -36,3 +36,2 @@ /*

var searchCallback = optUtil.getFunction(options, 'searchCallback', defaultSearchCallback(model));
var mapper = model.__proto__.mapper;
var filter;

@@ -64,8 +63,11 @@ var otherModel;

return function * searchCallback(filter) {
var mapper = model.__proto__.mapper;
var mapper = model.__proto__._mapper;
var found;
if (mapper && mapper.find) {
return yield mapper.find(filter);
found = yield mapper.find(filter);
return found;
}
};
}
{
"name": "beyo-model-validation",
"version": "0.0.3",
"version": "0.0.4",
"description": "Data validation for beyo models",

@@ -35,5 +35,5 @@ "author": "Yanick Rochon <yanick.rochon@gmail.com>",

"mocha": "^1.18.2",
"co-mocha": "0.0.2"
"co-mocha": "0.0.4"
},
"license": "MIT"
}

@@ -34,6 +34,4 @@

before(function () {
Model.once('define', function (options) {
options.prototype.mapper = {
value: dummyMapper()
};
Model.once('define', function (e) {
e.constructor.mapper = e.constructor.prototype._mapper = dummyMapper();
});

@@ -47,6 +45,4 @@

Model.once('define', function (options) {
options.prototype.mapper = {
value: dummyMapper({ knownValues: [ 2 ] })
};
Model.once('define', function (e) {
e.constructor.mapper = e.constructor.prototype._mapper = dummyMapper({ knownValues: [ 2 ] });
});

@@ -53,0 +49,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