Skip to content

Commit 208870e

Browse files
feat: add convertArrayToString function
1 parent 90b5212 commit 208870e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/utils/convertValues.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,10 @@ export const convertObjectToString = (e) => (Object.prototype.toString.call(e) =
9595
* @returns {string} String
9696
*/
9797
export const convertNumberToString = (e) => (typeof e === "number" ? e.toString() : e);
98+
99+
/**
100+
* @description Convert array to string
101+
* @param {array} e
102+
* @returns {string} String
103+
*/
104+
export const convertArrayToString = (e) => (Array.isArray(e) ? e.toString() : e);

0 commit comments

Comments
 (0)