is-rpm
Check if a Buffer/Uint8Array is a RPM package.
Install
$ npm install --save is-rpm
Usage
Node.js
var readChunk = ; // npm install read-chunkvar isRpm = ;var buffer = readChunk; ;//=> true
Browser
var xhr = ;xhr;xhrresponseType = 'arraybuffer'; xhr { ; //=> true}; xhr;
API
isRpm(buffer)
Accepts a Buffer (Node.js) or Uint8Array.
It only needs the first 4 bytes.
License
MIT © t1st3