file-type
Advanced tools
Comparing version 10.3.0 to 10.4.0
@@ -19,2 +19,6 @@ 'use strict'; | ||
module.exports = input => { | ||
if (!(input instanceof Uint8Array || Buffer.isBuffer(input))) { | ||
throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\`, got \`${typeof input}\``); | ||
} | ||
const buf = input instanceof Uint8Array ? input : new Uint8Array(input); | ||
@@ -21,0 +25,0 @@ |
{ | ||
"name": "file-type", | ||
"version": "10.3.0", | ||
"version": "10.4.0", | ||
"description": "Detect the file type of a Buffer/Uint8Array", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
28497
771