You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
252 B

7 years ago
  1. module.exports = isBuf;
  2. /**
  3. * Returns true if obj is a buffer or an arraybuffer.
  4. *
  5. * @api private
  6. */
  7. function isBuf(obj) {
  8. return (global.Buffer && global.Buffer.isBuffer(obj)) ||
  9. (global.ArrayBuffer && obj instanceof ArrayBuffer);
  10. }