(n: number)
| 350 | * @since 2.0.0 |
| 351 | */ |
| 352 | export const number = (n: number) => { |
| 353 | const h = n | 0 |
| 354 | if (h === n) { |
| 355 | return optimize(h) |
| 356 | } |
| 357 | float64.setFloat64(0, n !== n ? NaN : n) |
| 358 | return optimize(combineDataFirst(float64.getInt32(0), float64.getInt32(4))) |
| 359 | } |
| 360 | |
| 361 | /** |
| 362 | * Computes a hash value for a string using the djb2 algorithm. |