Don't insert an isPlainObject rule in validateOptions; this is redundant and interferes with object-or-wrapped-literal usecases
This commit is contained in:
parent
a0231a7fc3
commit
679bd40563
|
@ -16,7 +16,6 @@
|
||||||
"@validatem/annotate-errors": "^0.1.2",
|
"@validatem/annotate-errors": "^0.1.2",
|
||||||
"@validatem/any-property": "^0.1.0",
|
"@validatem/any-property": "^0.1.0",
|
||||||
"@validatem/error": "^1.0.0",
|
"@validatem/error": "^1.0.0",
|
||||||
"@validatem/is-plain-object": "^0.1.0",
|
|
||||||
"@validatem/match-validation-error": "^0.1.0",
|
"@validatem/match-validation-error": "^0.1.0",
|
||||||
"@validatem/match-versioned-special": "^0.1.0",
|
"@validatem/match-versioned-special": "^0.1.0",
|
||||||
"@validatem/match-virtual-property": "^0.1.0",
|
"@validatem/match-virtual-property": "^0.1.0",
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const assureArray = require("assure-array");
|
const assureArray = require("assure-array");
|
||||||
const isPlainObject = require("@validatem/is-plain-object");
|
|
||||||
|
|
||||||
const validateArguments = require("./validate-arguments");
|
const validateArguments = require("./validate-arguments");
|
||||||
|
|
||||||
module.exports = function (args, optionsRules) {
|
module.exports = function (args, optionsRules) {
|
||||||
let result = validateArguments(args, [
|
let result = validateArguments(args, [
|
||||||
["options", isPlainObject].concat(assureArray(optionsRules))
|
["options"].concat(assureArray(optionsRules))
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return result[0];
|
return result[0];
|
||||||
|
|
Loading…
Reference in a new issue