(that, size)
| 789 | } |
| 790 | |
| 791 | function allocUnsafe (that, size) { |
| 792 | assertSize(size) |
| 793 | that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) |
| 794 | if (!Buffer.TYPED_ARRAY_SUPPORT) { |
| 795 | for (var i = 0; i < size; ++i) { |
| 796 | that[i] = 0 |
| 797 | } |
| 798 | } |
| 799 | return that |
| 800 | } |
| 801 | |
| 802 | /** |
| 803 | * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. |
no test coverage detected