* Check if a value is a primitive (string, number, boolean, null, undefined) * Primitives can use Set for fast lookups
(value: any)
| 1119 | * Primitives can use Set for fast lookups |
| 1120 | */ |
| 1121 | function isPrimitive(value: any): boolean { |
| 1122 | return ( |
| 1123 | value === null || |
| 1124 | value === undefined || |
| 1125 | typeof value === `string` || |
| 1126 | typeof value === `number` || |
| 1127 | typeof value === `boolean` |
| 1128 | ) |
| 1129 | } |
| 1130 | |
| 1131 | /** |
| 1132 | * Check if all values in an array are primitives |
no outgoing calls
no test coverage detected