(n)
| 121 | * @returns {0 | 1 | 2} type of number for serialization |
| 122 | */ |
| 123 | const identifyNumber = (n) => { |
| 124 | if (n === (n | 0)) { |
| 125 | if (n <= 127 && n >= -128) return 0; |
| 126 | if (n <= 2147483647 && n >= -2147483648) return 1; |
| 127 | } |
| 128 | return 2; |
| 129 | }; |
| 130 | |
| 131 | /** |
| 132 | * Returns type of bigint for serialization. |