Skip to content

Commit

Permalink
BUG FIXED : made isString() available to upperCase() scope (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
mooSylla authored Jun 7, 2020
1 parent 09a4bd7 commit 8fd0bb5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/common-utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8fd0bb5

Please sign in to comment.