(n: number)
| 688 | * @since 2.0.0 |
| 689 | */ |
| 690 | export const nextPow2 = (n: number): number => { |
| 691 | const nextPow = Math.ceil(Math.log(n) / Math.log(2)) |
| 692 | return Math.max(Math.pow(2, nextPow), 2) |
| 693 | } |
| 694 | |
| 695 | /** |
| 696 | * Parses a `number` from a `string` safely using the `Number()` function. |
no test coverage detected