From 8fd0bb54fcdd0a11dcca331de3016df80e7e01b9 Mon Sep 17 00:00:00 2001 From: Moo Date: Sun, 7 Jun 2020 01:53:50 +0100 Subject: [PATCH] BUG FIXED : made isString() available to upperCase() scope (#106) --- src/common-utils/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common-utils/index.js b/src/common-utils/index.js index cd517af..d293867 100644 --- a/src/common-utils/index.js +++ b/src/common-utils/index.js @@ -6,6 +6,10 @@ const base64Encode = (encodeData) => { return buff.toString('base64'); }; +const isString = (value)=>{ + return typeof value === 'string' || value instanceof String; +} + /** * Constructs query param based on some logic to support filter and aspect_filter params. * output will be keywords=iphone&itemFilter(0).name=Condition&itemFilter(0).value=3000&itemFilter(1).name=FreeShippingOnly&itemFilter(1).value=true&itemFilter(2).name=SoldItemsOnly&itemFilter(2).value=true @@ -71,9 +75,7 @@ module.exports = { }, // Returns if a value is a string - isString(value) { - return typeof value === 'string' || value instanceof String; - }, + isString, // Returns if object is empty or not isEmptyObj(obj) {