From 3a9f5c35005301874923a960e11e29210f00913d Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Wed, 27 Jan 2016 18:08:46 +1300 Subject: [PATCH] wrap entry point to prepareValue to only accept 1 arg --- lib/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index e28c26af..d102d635 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -103,6 +103,10 @@ function normalizeQueryConfig (config, values, callback) { } module.exports = { - prepareValue: prepareValue, + prepareValue: function prepareValueWrapper (value) { + //this ensures that extra arguments do not get passed into prepareValue + //by accident, eg: from calling values.map(utils.prepareValue) + return prepareValue(value); + }, normalizeQueryConfig: normalizeQueryConfig };