is-buffer.js 281 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 module.exports = isBuf; /** * Returns true if obj is a buffer or an arraybuffer. * * @api private */ function isBuf(obj) { return (global.Buffer && global.Buffer.isBuffer(obj)) || (global.ArrayBuffer && (obj instanceof ArrayBuffer || ArrayBuffer.isView(obj))); }