(value: Primitive)
| 1816 | } |
| 1817 | |
| 1818 | function estimatePrimitiveSizeInBytes(value: Primitive): number { |
| 1819 | if (typeof value === 'string') { |
| 1820 | return value.length * 2; |
| 1821 | } else if (typeof value === 'number') { |
| 1822 | return 8; |
| 1823 | } else if (typeof value === 'boolean') { |
| 1824 | return 4; |
| 1825 | } |
| 1826 | |
| 1827 | return 0; |
| 1828 | } |
no outgoing calls
no test coverage detected