From 679bd4056360ccdb371adce436a6d4690bf5922f Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 20 Jul 2020 22:17:18 +0200 Subject: [PATCH] Don't insert an isPlainObject rule in validateOptions; this is redundant and interferes with object-or-wrapped-literal usecases --- package.json | 1 - src/api/validate-options.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 97ed1bd..70f9074 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "@validatem/annotate-errors": "^0.1.2", "@validatem/any-property": "^0.1.0", "@validatem/error": "^1.0.0", - "@validatem/is-plain-object": "^0.1.0", "@validatem/match-validation-error": "^0.1.0", "@validatem/match-versioned-special": "^0.1.0", "@validatem/match-virtual-property": "^0.1.0", diff --git a/src/api/validate-options.js b/src/api/validate-options.js index cf44514..30eeb19 100644 --- a/src/api/validate-options.js +++ b/src/api/validate-options.js @@ -1,13 +1,12 @@ "use strict"; const assureArray = require("assure-array"); -const isPlainObject = require("@validatem/is-plain-object"); const validateArguments = require("./validate-arguments"); module.exports = function (args, optionsRules) { let result = validateArguments(args, [ - ["options", isPlainObject].concat(assureArray(optionsRules)) + ["options"].concat(assureArray(optionsRules)) ]); return result[0];