Skip to content

Commit 565f860

Browse files
fastArrayJoin() refactoring
1 parent 68dbfe7 commit 565f860

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uquik",
3-
"version": "1.0.52",
3+
"version": "1.0.53",
44
"description": "uQuik HTTP(S) framework",
55
"main": "index.js",
66
"scripts": {

src/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,17 @@ const fastArrayJoin = (array, separator = ',') => {
267267
return anyValue
268268
} else if (type === 'number') {
269269
return anyValue.toString()
270-
} else if (type === 'object' || type === 'function') {
270+
} else if (type === 'object') {
271271
let value = '[object Object]'
272272
if (typeof anyValue.toString === 'function') {
273273
const toStringValue = anyValue.toString()
274274
if (typeof toStringValue === 'string') value = toStringValue
275275
}
276276
return value
277+
} else if (type === 'function') {
278+
return anyValue.toString()
279+
} else {
280+
return anyValue
277281
}
278282
}
279283

0 commit comments

Comments
 (0)