code: function isBuffer(val) {
    if (val.constructor && typeof val.constructor.isBuffer === 'function') {
      return val.constructor.isBuffer(val);
    }
    return false;
  }
docs: If you need to support Safari 5-7 (8-10 yr-old browser),
  take a look at https://github.com/feross/is-buffer