How to use the prototype function from safe-buffer
Find comprehensive JavaScript safe-buffer.prototype code examples handpicked from public code repositorys.
GitHub: thenikso/tu
751 752 753 754 755 756 757 758 759 760 761 762
if (length === 0) return '' if (arguments.length === 0) return utf8Slice(this, 0, length) return slowToString.apply(this, arguments) } Buffer.prototype.toLocaleString = Buffer.prototype.toString Buffer.prototype.equals = function equals (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true
0
4
0
+ 6 other calls in file
GitHub: WCEF/wellweb
1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440
if (length > K_MAX_LENGTH) { throw new RangeError('Invalid typed array length') } // Return an augmented `Uint8Array` instance var buf = new Uint8Array(length) buf.__proto__ = Buffer.prototype return buf } /**
0
1
5
+ 20 other calls in file
584 585 586 587 588 589 590 591 592 593 594
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) {
2
0
0
+ 4 other calls in file
5163 5164 5165 5166 5167 5168 5169 5170 5171 5172
Buffer = _require.Buffer; const _require2 = require('util'), inspect = _require2.inspect; const custom = inspect && inspect.custom || 'inspect'; function copyBuffer(src, target, offset) { Buffer.prototype.copy.call(src, target, offset); } module.exports = class BufferList { constructor() { this.head = null;
0
0
1
+ 89 other calls in file
safe-buffer.from is the most popular function in safe-buffer (2601 examples)