From 543fe41c1d87c52500f2026ef42ed116d36ca476 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Tue, 15 Jan 2019 14:39:02 -0500 Subject: [PATCH 1/2] Always add default property This allows to use of require or import correctly. https://github.com/chriso/validator.js/issues/957 --- .babelrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.babelrc b/.babelrc index add9d99df..318ea9718 100644 --- a/.babelrc +++ b/.babelrc @@ -3,6 +3,11 @@ ["@babel/preset-env", {"targets": {"node": "0.10"}}] ], "plugins": [ - "add-module-exports" + [ + "add-module-exports", + { + "addDefaultProperty": true + } + ] ] } From 909588e16f89631b9a32fc81fd971aafb1aa4382 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Tue, 15 Jan 2019 14:50:20 -0500 Subject: [PATCH 2/2] Updating files to use addDefaultProperty --- index.js | 3 ++- lib/blacklist.js | 3 ++- lib/contains.js | 3 ++- lib/equals.js | 3 ++- lib/escape.js | 3 ++- lib/isAfter.js | 3 ++- lib/isAscii.js | 3 ++- lib/isBase64.js | 3 ++- lib/isBefore.js | 3 ++- lib/isBoolean.js | 3 ++- lib/isByteLength.js | 3 ++- lib/isCreditCard.js | 3 ++- lib/isCurrency.js | 3 ++- lib/isDataURI.js | 3 ++- lib/isDecimal.js | 3 ++- lib/isDivisibleBy.js | 3 ++- lib/isEmail.js | 3 ++- lib/isEmpty.js | 3 ++- lib/isFQDN.js | 3 ++- lib/isHash.js | 3 ++- lib/isHexColor.js | 3 ++- lib/isHexadecimal.js | 3 ++- lib/isIP.js | 3 ++- lib/isIPRange.js | 3 ++- lib/isISBN.js | 3 ++- lib/isISIN.js | 3 ++- lib/isISO31661Alpha2.js | 3 ++- lib/isISO31661Alpha3.js | 3 ++- lib/isISO8601.js | 3 ++- lib/isISRC.js | 3 ++- lib/isISSN.js | 3 ++- lib/isIdentityCard.js | 3 ++- lib/isIn.js | 3 ++- lib/isInt.js | 3 ++- lib/isJSON.js | 3 ++- lib/isJWT.js | 3 ++- lib/isLatLong.js | 3 ++- lib/isLength.js | 3 ++- lib/isLowercase.js | 3 ++- lib/isMACAddress.js | 3 ++- lib/isMD5.js | 3 ++- lib/isMagnetURI.js | 3 ++- lib/isMimeType.js | 3 ++- lib/isMongoId.js | 3 ++- lib/isMultibyte.js | 3 ++- lib/isNumeric.js | 3 ++- lib/isPort.js | 3 ++- lib/isRFC3339.js | 3 ++- lib/isSurrogatePair.js | 3 ++- lib/isURL.js | 3 ++- lib/isUUID.js | 3 ++- lib/isUppercase.js | 3 ++- lib/isVariableWidth.js | 3 ++- lib/isWhitelisted.js | 3 ++- lib/ltrim.js | 3 ++- lib/matches.js | 3 ++- lib/normalizeEmail.js | 3 ++- lib/rtrim.js | 3 ++- lib/stripLow.js | 3 ++- lib/toBoolean.js | 3 ++- lib/toDate.js | 3 ++- lib/toFloat.js | 3 ++- lib/toInt.js | 3 ++- lib/trim.js | 3 ++- lib/unescape.js | 3 ++- lib/util/assertString.js | 3 ++- lib/util/includes.js | 3 ++- lib/util/merge.js | 3 ++- lib/util/toString.js | 3 ++- lib/whitelist.js | 3 ++- 70 files changed, 140 insertions(+), 70 deletions(-) diff --git a/index.js b/index.js index 421f7e39f..05b5e928b 100644 --- a/index.js +++ b/index.js @@ -239,4 +239,5 @@ var validator = { }; var _default = validator; exports.default = _default; -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/blacklist.js b/lib/blacklist.js index 226617c90..5dd42ed2b 100644 --- a/lib/blacklist.js +++ b/lib/blacklist.js @@ -14,4 +14,5 @@ function blacklist(str, chars) { return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), ''); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/contains.js b/lib/contains.js index a3d285f2a..b02fda2cd 100644 --- a/lib/contains.js +++ b/lib/contains.js @@ -16,4 +16,5 @@ function contains(str, elem) { return str.indexOf((0, _toString.default)(elem)) >= 0; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/equals.js b/lib/equals.js index 2f1eb6bab..a33c5ab28 100644 --- a/lib/equals.js +++ b/lib/equals.js @@ -14,4 +14,5 @@ function equals(str, comparison) { return str === comparison; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/escape.js b/lib/escape.js index e092b2c1c..05e422030 100644 --- a/lib/escape.js +++ b/lib/escape.js @@ -14,4 +14,5 @@ function escape(str) { return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isAfter.js b/lib/isAfter.js index 08fce4958..1fa18adb7 100644 --- a/lib/isAfter.js +++ b/lib/isAfter.js @@ -19,4 +19,5 @@ function isAfter(str) { return !!(original && comparison && original > comparison); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isAscii.js b/lib/isAscii.js index 0c51d6831..3c622717c 100644 --- a/lib/isAscii.js +++ b/lib/isAscii.js @@ -18,4 +18,5 @@ function isAscii(str) { return ascii.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isBase64.js b/lib/isBase64.js index 365c8e3c7..283daecbe 100644 --- a/lib/isBase64.js +++ b/lib/isBase64.js @@ -23,4 +23,5 @@ function isBase64(str) { return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isBefore.js b/lib/isBefore.js index 4fb745f0f..a54eda8f9 100644 --- a/lib/isBefore.js +++ b/lib/isBefore.js @@ -19,4 +19,5 @@ function isBefore(str) { return !!(original && comparison && original < comparison); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isBoolean.js b/lib/isBoolean.js index e56f81cec..79d0eb0f2 100644 --- a/lib/isBoolean.js +++ b/lib/isBoolean.js @@ -14,4 +14,5 @@ function isBoolean(str) { return ['true', 'false', '1', '0'].indexOf(str) >= 0; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isByteLength.js b/lib/isByteLength.js index e867667f3..bbf12eeb6 100644 --- a/lib/isByteLength.js +++ b/lib/isByteLength.js @@ -30,4 +30,5 @@ function isByteLength(str, options) { return len >= min && (typeof max === 'undefined' || len <= max); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isCreditCard.js b/lib/isCreditCard.js index 8cc31f1c8..6f77f5652 100644 --- a/lib/isCreditCard.js +++ b/lib/isCreditCard.js @@ -48,4 +48,5 @@ function isCreditCard(str) { return !!(sum % 10 === 0 ? sanitized : false); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isCurrency.js b/lib/isCurrency.js index 47d8638a0..743b2e886 100644 --- a/lib/isCurrency.js +++ b/lib/isCurrency.js @@ -85,4 +85,5 @@ function isCurrency(str, options) { return currencyRegex(options).test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isDataURI.js b/lib/isDataURI.js index ef7649206..e88296606 100644 --- a/lib/isDataURI.js +++ b/lib/isDataURI.js @@ -50,4 +50,5 @@ function isDataURI(str) { return true; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isDecimal.js b/lib/isDecimal.js index 9972f125a..d45b05f6f 100644 --- a/lib/isDecimal.js +++ b/lib/isDecimal.js @@ -38,4 +38,5 @@ function isDecimal(str, options) { throw new Error("Invalid locale '".concat(options.locale, "'")); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isDivisibleBy.js b/lib/isDivisibleBy.js index 50b645f5a..02408b370 100644 --- a/lib/isDivisibleBy.js +++ b/lib/isDivisibleBy.js @@ -16,4 +16,5 @@ function isDivisibleBy(str, num) { return (0, _toFloat.default)(str) % parseInt(num, 10) === 0; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isEmail.js b/lib/isEmail.js index c7b65dae5..ab897f773 100644 --- a/lib/isEmail.js +++ b/lib/isEmail.js @@ -129,4 +129,5 @@ function isEmail(str, options) { return true; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isEmpty.js b/lib/isEmpty.js index 7a4395b84..26766d5e2 100644 --- a/lib/isEmpty.js +++ b/lib/isEmpty.js @@ -21,4 +21,5 @@ function isEmpty(str, options) { return (options.ignore_whitespace ? str.trim().length : str.length) === 0; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isFQDN.js b/lib/isFQDN.js index 2f2d69582..b5c769dba 100644 --- a/lib/isFQDN.js +++ b/lib/isFQDN.js @@ -71,4 +71,5 @@ function isFQDN(str, options) { return true; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isHash.js b/lib/isHash.js index c841c0180..30e90ac1b 100644 --- a/lib/isHash.js +++ b/lib/isHash.js @@ -31,4 +31,5 @@ function isHash(str, algorithm) { return hash.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isHexColor.js b/lib/isHexColor.js index f13956e92..08bdfe452 100644 --- a/lib/isHexColor.js +++ b/lib/isHexColor.js @@ -16,4 +16,5 @@ function isHexColor(str) { return hexcolor.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isHexadecimal.js b/lib/isHexadecimal.js index 8fe9a57f0..fd894f860 100644 --- a/lib/isHexadecimal.js +++ b/lib/isHexadecimal.js @@ -16,4 +16,5 @@ function isHexadecimal(str) { return hexadecimal.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isIP.js b/lib/isIP.js index 8072fbf88..dc7f95447 100644 --- a/lib/isIP.js +++ b/lib/isIP.js @@ -82,4 +82,5 @@ function isIP(str) { return false; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isIPRange.js b/lib/isIPRange.js index b638e34e6..8c6cbb5cf 100644 --- a/lib/isIPRange.js +++ b/lib/isIPRange.js @@ -33,4 +33,5 @@ function isIPRange(str) { return (0, _isIP.default)(parts[0], 4) && parts[1] <= 32 && parts[1] >= 0; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISBN.js b/lib/isISBN.js index 28be33ad5..f00bb7a9e 100644 --- a/lib/isISBN.js +++ b/lib/isISBN.js @@ -61,4 +61,5 @@ function isISBN(str) { return false; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISIN.js b/lib/isISIN.js index 01cbc0197..cadcc9266 100644 --- a/lib/isISIN.js +++ b/lib/isISIN.js @@ -48,4 +48,5 @@ function isISIN(str) { return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISO31661Alpha2.js b/lib/isISO31661Alpha2.js index bcc458d6d..44748a7e7 100644 --- a/lib/isISO31661Alpha2.js +++ b/lib/isISO31661Alpha2.js @@ -19,4 +19,5 @@ function isISO31661Alpha2(str) { return (0, _includes.default)(validISO31661Alpha2CountriesCodes, str.toUpperCase()); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISO31661Alpha3.js b/lib/isISO31661Alpha3.js index ef16660b2..8dcaabd07 100644 --- a/lib/isISO31661Alpha3.js +++ b/lib/isISO31661Alpha3.js @@ -19,4 +19,5 @@ function isISO31661Alpha3(str) { return (0, _includes.default)(validISO31661Alpha3CountriesCodes, str.toUpperCase()); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISO8601.js b/lib/isISO8601.js index 110114356..e29eebb29 100644 --- a/lib/isISO8601.js +++ b/lib/isISO8601.js @@ -54,4 +54,5 @@ function isISO8601(str, options) { return check; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISRC.js b/lib/isISRC.js index fef9dedb5..c5ce1e21f 100644 --- a/lib/isISRC.js +++ b/lib/isISRC.js @@ -17,4 +17,5 @@ function isISRC(str) { return isrc.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isISSN.js b/lib/isISSN.js index 3ab4bc19d..eee87b351 100644 --- a/lib/isISSN.js +++ b/lib/isISSN.js @@ -33,4 +33,5 @@ function isISSN(str) { return checksum % 11 === 0; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isIdentityCard.js b/lib/isIdentityCard.js index 0892ec17f..5ead773f3 100644 --- a/lib/isIdentityCard.js +++ b/lib/isIdentityCard.js @@ -57,4 +57,5 @@ function isIdentityCard(str) { throw new Error("Invalid locale '".concat(locale, "'")); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isIn.js b/lib/isIn.js index 3d8cafe6e..e24f7cb8c 100644 --- a/lib/isIn.js +++ b/lib/isIn.js @@ -36,4 +36,5 @@ function isIn(str, options) { return false; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isInt.js b/lib/isInt.js index 911e6a99f..40f776c3c 100644 --- a/lib/isInt.js +++ b/lib/isInt.js @@ -26,4 +26,5 @@ function isInt(str, options) { return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isJSON.js b/lib/isJSON.js index d21463d32..b0e43c20e 100644 --- a/lib/isJSON.js +++ b/lib/isJSON.js @@ -24,4 +24,5 @@ function isJSON(str) { return false; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isJWT.js b/lib/isJWT.js index a957bc8a1..9dfb7cfb7 100644 --- a/lib/isJWT.js +++ b/lib/isJWT.js @@ -16,4 +16,5 @@ function isJWT(str) { return jwt.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isLatLong.js b/lib/isLatLong.js index c658714b8..88da0c25f 100644 --- a/lib/isLatLong.js +++ b/lib/isLatLong.js @@ -19,4 +19,5 @@ function _default(str) { return lat.test(pair[0]) && long.test(pair[1]); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isLength.js b/lib/isLength.js index e5f8ff8b3..b70e40dad 100644 --- a/lib/isLength.js +++ b/lib/isLength.js @@ -31,4 +31,5 @@ function isLength(str, options) { return len >= min && (typeof max === 'undefined' || len <= max); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isLowercase.js b/lib/isLowercase.js index 708a9b7e7..7f412d900 100644 --- a/lib/isLowercase.js +++ b/lib/isLowercase.js @@ -14,4 +14,5 @@ function isLowercase(str) { return str === str.toLowerCase(); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isMACAddress.js b/lib/isMACAddress.js index 759e004d7..7d5cc20c2 100644 --- a/lib/isMACAddress.js +++ b/lib/isMACAddress.js @@ -22,4 +22,5 @@ function isMACAddress(str, options) { return macAddress.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isMD5.js b/lib/isMD5.js index fcafab992..57f2b0e46 100644 --- a/lib/isMD5.js +++ b/lib/isMD5.js @@ -16,4 +16,5 @@ function isMD5(str) { return md5.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isMagnetURI.js b/lib/isMagnetURI.js index 39d6f2466..79aab333f 100644 --- a/lib/isMagnetURI.js +++ b/lib/isMagnetURI.js @@ -16,4 +16,5 @@ function isMagnetURI(url) { return magnetURI.test(url.trim()); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isMimeType.js b/lib/isMimeType.js index 4c1ff92c0..917aef2c4 100644 --- a/lib/isMimeType.js +++ b/lib/isMimeType.js @@ -47,4 +47,5 @@ function isMimeType(str) { return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isMongoId.js b/lib/isMongoId.js index 6119c1bf1..2e9884de0 100644 --- a/lib/isMongoId.js +++ b/lib/isMongoId.js @@ -16,4 +16,5 @@ function isMongoId(str) { return (0, _isHexadecimal.default)(str) && str.length === 24; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isMultibyte.js b/lib/isMultibyte.js index 43e329f64..3b4477e97 100644 --- a/lib/isMultibyte.js +++ b/lib/isMultibyte.js @@ -18,4 +18,5 @@ function isMultibyte(str) { return multibyte.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isNumeric.js b/lib/isNumeric.js index 84f01588d..8c1bc44f9 100644 --- a/lib/isNumeric.js +++ b/lib/isNumeric.js @@ -22,4 +22,5 @@ function isNumeric(str, options) { return numeric.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isPort.js b/lib/isPort.js index 8a2dd56cd..9274a4c09 100644 --- a/lib/isPort.js +++ b/lib/isPort.js @@ -16,4 +16,5 @@ function isPort(str) { }); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isRFC3339.js b/lib/isRFC3339.js index 871856a1b..61e4582a0 100644 --- a/lib/isRFC3339.js +++ b/lib/isRFC3339.js @@ -29,4 +29,5 @@ function isRFC3339(str) { return rfc3339.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isSurrogatePair.js b/lib/isSurrogatePair.js index e9c7af973..ee5678bc8 100644 --- a/lib/isSurrogatePair.js +++ b/lib/isSurrogatePair.js @@ -16,4 +16,5 @@ function isSurrogatePair(str) { return surrogatePair.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isURL.js b/lib/isURL.js index 7025bb331..f9586ee77 100644 --- a/lib/isURL.js +++ b/lib/isURL.js @@ -148,4 +148,5 @@ function isURL(url, options) { return true; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isUUID.js b/lib/isUUID.js index b82cc34dd..08ec27e6e 100644 --- a/lib/isUUID.js +++ b/lib/isUUID.js @@ -23,4 +23,5 @@ function isUUID(str) { return pattern && pattern.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isUppercase.js b/lib/isUppercase.js index 918421040..c1c02f9f0 100644 --- a/lib/isUppercase.js +++ b/lib/isUppercase.js @@ -14,4 +14,5 @@ function isUppercase(str) { return str === str.toUpperCase(); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isVariableWidth.js b/lib/isVariableWidth.js index c412a8f1c..6bf226e61 100644 --- a/lib/isVariableWidth.js +++ b/lib/isVariableWidth.js @@ -18,4 +18,5 @@ function isVariableWidth(str) { return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/isWhitelisted.js b/lib/isWhitelisted.js index 2ef9065d4..5a80a1b7f 100644 --- a/lib/isWhitelisted.js +++ b/lib/isWhitelisted.js @@ -21,4 +21,5 @@ function isWhitelisted(str, chars) { return true; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/ltrim.js b/lib/ltrim.js index eef529694..b7159fd07 100644 --- a/lib/ltrim.js +++ b/lib/ltrim.js @@ -15,4 +15,5 @@ function ltrim(str, chars) { return str.replace(pattern, ''); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/matches.js b/lib/matches.js index 060208663..ea01ac16f 100644 --- a/lib/matches.js +++ b/lib/matches.js @@ -19,4 +19,5 @@ function matches(str, pattern, modifiers) { return pattern.test(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/normalizeEmail.js b/lib/normalizeEmail.js index b4717b37a..dcab4b97a 100644 --- a/lib/normalizeEmail.js +++ b/lib/normalizeEmail.js @@ -147,4 +147,5 @@ function normalizeEmail(email, options) { return parts.join('@'); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/rtrim.js b/lib/rtrim.js index ffea669cd..6b24d69e4 100644 --- a/lib/rtrim.js +++ b/lib/rtrim.js @@ -21,4 +21,5 @@ function rtrim(str, chars) { return idx < str.length ? str.substr(0, idx + 1) : str; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/stripLow.js b/lib/stripLow.js index 2f82949d1..aec2e0b57 100644 --- a/lib/stripLow.js +++ b/lib/stripLow.js @@ -17,4 +17,5 @@ function stripLow(str, keep_new_lines) { return (0, _blacklist.default)(str, chars); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/toBoolean.js b/lib/toBoolean.js index 206584e48..d55d8f09f 100644 --- a/lib/toBoolean.js +++ b/lib/toBoolean.js @@ -19,4 +19,5 @@ function toBoolean(str, strict) { return str !== '0' && str !== 'false' && str !== ''; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/toDate.js b/lib/toDate.js index 61e80a19e..cb0756ca9 100644 --- a/lib/toDate.js +++ b/lib/toDate.js @@ -15,4 +15,5 @@ function toDate(date) { return !isNaN(date) ? new Date(date) : null; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/toFloat.js b/lib/toFloat.js index 7974dcdd9..fbf6c2e2c 100644 --- a/lib/toFloat.js +++ b/lib/toFloat.js @@ -14,4 +14,5 @@ function toFloat(str) { return parseFloat(str); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/toInt.js b/lib/toInt.js index 40fc5ef09..4c0e7addb 100644 --- a/lib/toInt.js +++ b/lib/toInt.js @@ -14,4 +14,5 @@ function toInt(str, radix) { return parseInt(str, radix || 10); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/trim.js b/lib/trim.js index af459d063..497e3c3d8 100644 --- a/lib/trim.js +++ b/lib/trim.js @@ -15,4 +15,5 @@ function trim(str, chars) { return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/unescape.js b/lib/unescape.js index 6ac73822f..ab5dbbfad 100644 --- a/lib/unescape.js +++ b/lib/unescape.js @@ -14,4 +14,5 @@ function unescape(str) { return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\').replace(/`/g, '`'); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/util/assertString.js b/lib/util/assertString.js index 19bb844e7..ba67de6be 100644 --- a/lib/util/assertString.js +++ b/lib/util/assertString.js @@ -29,4 +29,5 @@ function assertString(input) { } } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/util/includes.js b/lib/util/includes.js index 292ff4d77..e0618288e 100644 --- a/lib/util/includes.js +++ b/lib/util/includes.js @@ -13,4 +13,5 @@ var includes = function includes(arr, val) { var _default = includes; exports.default = _default; -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/util/merge.js b/lib/util/merge.js index f30aebdd2..a96c7393e 100644 --- a/lib/util/merge.js +++ b/lib/util/merge.js @@ -18,4 +18,5 @@ function merge() { return obj; } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/util/toString.js b/lib/util/toString.js index e367fadcb..966585789 100644 --- a/lib/util/toString.js +++ b/lib/util/toString.js @@ -21,4 +21,5 @@ function toString(input) { return String(input); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/lib/whitelist.js b/lib/whitelist.js index 9769e57cd..7ae624e97 100644 --- a/lib/whitelist.js +++ b/lib/whitelist.js @@ -14,4 +14,5 @@ function whitelist(str, chars) { return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), ''); } -module.exports = exports.default; \ No newline at end of file +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file