File: isBufferBrowser.js

package info (click to toggle)
node-util 0.12.5%2B~1.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 444 kB
  • sloc: javascript: 2,698; makefile: 14
file content (6 lines) | stat: -rw-r--r-- 203 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
module.exports = function isBuffer(arg) {
  return arg && typeof arg === 'object'
    && typeof arg.copy === 'function'
    && typeof arg.fill === 'function'
    && typeof arg.readUInt8 === 'function';
}