if (firstline) {
// require buffer explicitly
var preamble = 'var Buffer = require(\'../../\').Buffer;\n' +
- 'if (Buffer.TYPED_ARRAY_SUPPORT) {'
+ 'if (Buffer.TYPED_ARRAY_SUPPORT) return;'
if (/use strict/.test(line)) line += '\n' + preamble
else line + preamble + '\n' + line
firstline = false
}
cb(null, line + '\n')
- }, function (cb) {
- // flush function
- this.push('\n}')
})
}
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var common = {};
var assert = require('assert');
assert(ubuf.buffer);
assert.equal(ubuf.buffer.byteLength, 10);
-
-
-}
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
});
}
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
if (input.charCodeAt(i) > 127) ++i;
}
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
Buffer.from('deadbeaf', 'hex');
});
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
assert.equal(24, Buffer.byteLength('Il était tué', encoding));
});
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
assert.throws(() => a.compare(b, -Infinity, Infinity), oor);
assert.throws(() => a.compare(), /Argument must be a Buffer/);
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
});
}
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
writeToFill.apply(null, arguments));
}
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
b.includes([]);
});
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
b.indexOf([]);
});
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
t.toString();
});
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
assert.strictEqual(util.inspect(s), expected);
});
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
[4, 5]
]);
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
Buffer.allocUnsafe(10);
assert(isZeroFilled(Buffer.alloc(10)));
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
SlowBuffer(buffer.kMaxLength + 1);
}, 'invalid Buffer length');
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
assert.throws(() => buf3.slice(1, 3).swap32(), re32);
assert.throws(() => Buffer.alloc(1025).swap32(), re32);
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
// Flags: --zero-fill-buffers
// when using --zero-fill-buffers, every Buffer and SlowBuffer
}
}
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var assert = require('assert');
assert.ok(testUint8Array(ui), 'Uint8Array is not zero-filled');
}
-
-
-}
\ No newline at end of file
'use strict';
var Buffer = require('../../').Buffer;
-if (Buffer.TYPED_ARRAY_SUPPORT) {
+if (Buffer.TYPED_ARRAY_SUPPORT) return;
var common = {};
var assert = require('assert');
assert.equal(SlowBuffer.prototype.parent, undefined);
assert.equal(SlowBuffer.prototype.offset, undefined);
-
-
-}