(obj)
| 46 | * @returns {String} String representation of given object |
| 47 | */ |
| 48 | const toString = function (obj) { |
| 49 | if (obj === null) return 'null' |
| 50 | if (typeof obj === 'boolean' || typeof obj === 'number') { |
| 51 | return obj.toString() |
| 52 | } |
| 53 | if (typeof obj === 'string') return obj |
| 54 | if (typeof obj === 'symbol') throw new TypeError() |
| 55 | return obj.toString() |
| 56 | } |
| 57 | /** |
| 58 | * Checks if the value passed is an array |
| 59 | * or not |
no test coverage detected