Sha256: 5bf8978a3583ed2a0fd37636c2d342891a34aec44b76053daf56fb0945004a0a
Contents?: true
Size: 364 Bytes
Versions: 41
Compression:
Stored size: 364 Bytes
Contents
var MIN_SIZE = 16 * 1024; var SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array; // fallback on Array when TypedArray is not supported module.exports = function adoptBuffer(buffer, size) { if (buffer === null || buffer.length < size) { return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE)); } return buffer; };
Version data entries
41 entries across 31 versions & 9 rubygems