From f51515317fd14a2d752eb4d1cb9339ef40cf38a3 Mon Sep 17 00:00:00 2001 From: Jas- Date: Sat, 15 Sep 2018 14:15:53 +0000 Subject: [PATCH] v0.4.14: Fix for use of .match() --- lib/classes/validation.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/classes/validation.js b/lib/classes/validation.js index 55043dd..de24fbe 100644 --- a/lib/classes/validation.js +++ b/lib/classes/validation.js @@ -131,7 +131,7 @@ class validation { errors.push(new Error(scope.messages.port)); if (opts.ports) { - result = opts.ports.match(scope.patterns.ports).join(","); + result = scope.patterns.ports.match(opts.ports).join(","); if (result == "") return cb(scope.messages.port); } @@ -180,20 +180,6 @@ class validation { } - /** - * @function match - * Match specified regex test on string and return array of results - * - * @param {Object} regex - Regex test case - * @param {String} str - String to perform test on - * - * @returns {String} - */ - match(regex, str) { - return regex.match(str); - } - - /** * @function exists * Binary file tests