Skip to content

Commit 8fd0bb5

Browse files
authored
BUG FIXED : made isString() available to upperCase() scope (#106)
1 parent 09a4bd7 commit 8fd0bb5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/common-utils/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ const base64Encode = (encodeData) => {
66
return buff.toString('base64');
77
};
88

9+
const isString = (value)=>{
10+
return typeof value === 'string' || value instanceof String;
11+
}
12+
913
/**
1014
* Constructs query param based on some logic to support filter and aspect_filter params.
1115
* 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 = {
7175
},
7276

7377
// Returns if a value is a string
74-
isString(value) {
75-
return typeof value === 'string' || value instanceof String;
76-
},
78+
isString,
7779

7880
// Returns if object is empty or not
7981
isEmptyObj(obj) {

0 commit comments

Comments
 (0)