isBuffer.js 209 B

1234567
  1. var buf = require('buffer');
  2. var Buffer = buf.Buffer;
  3. // could use Buffer.isBuffer but this is the same exact thing...
  4. module.exports = function(o) {
  5. return typeof o === 'object' && o instanceof Buffer;
  6. };