*/
/* eslint-disable no-proto */
+'use strict'
+
var base64 = require('base64-js')
var ieee754 = require('ieee754')
var isArray = require('isarray')
return new Buffer(arg)
}
- this.length = 0
- this.parent = undefined
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ this.length = 0
+ this.parent = undefined
+ }
// Common case.
if (typeof arg === 'number') {
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
+} else {
+ // pre-set for values that may exist in the future
+ Buffer.prototype.length = undefined
+ Buffer.prototype.parent = undefined
}
function allocate (that, length) {
}
Buffer.byteLength = byteLength
-// pre-set for values that may exist in the future
-Buffer.prototype.length = undefined
-Buffer.prototype.parent = undefined
-
function slowToString (encoding, start, end) {
var loweredCase = false