(that, size)
| 9885 | } |
| 9886 | |
| 9887 | function allocUnsafe (that, size) { |
| 9888 | assertSize(size) |
| 9889 | that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) |
| 9890 | if (!Buffer.TYPED_ARRAY_SUPPORT) { |
| 9891 | for (var i = 0; i < size; ++i) { |
| 9892 | that[i] = 0 |
| 9893 | } |
| 9894 | } |
| 9895 | return that |
| 9896 | } |
| 9897 | |
| 9898 | /** |
| 9899 | * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. |
no test coverage detected