(arr)
| 84 | } |
| 85 | |
| 86 | function allocBufferFromArrayDeprecated(arr) { |
| 87 | if (!Array.isArray(arr)) { |
| 88 | throw new TypeError('Expected Array, obtained ' + util.inspect(arr)); |
| 89 | } |
| 90 | // eslint-disable-next-line |
| 91 | return new Buffer(arr); |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * @returns {Function} Returns a wrapper function that invokes the underlying callback only once. |