-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d6c4d4
commit f3d2da5
Showing
5 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare const _exports: typeof import("./lib/validator"); | ||
export = _exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
export const AVIF: any; | ||
export const BMP: any; | ||
export const DIB_0: any; | ||
export const DIB_1: any; | ||
export const GIF: any; | ||
export const TIFF: any; | ||
export const MP3: any; | ||
export const MPG_0: any; | ||
export const MPG_1: any; | ||
export const FLV: any; | ||
export const APK: any; | ||
export const MS_OFFICE: any; | ||
export const JAR: any; | ||
export const SWF_0: any; | ||
export const SWF_1: any; | ||
export const PNG: any; | ||
export const JPEG: any; | ||
export const MP4_0: any; | ||
export const MP4_1: any; | ||
export const MP4_2: any; | ||
export const THREE_GP_0: any; | ||
export const THREE_GP_1: any; | ||
export const THREE_GP_2: any; | ||
export const MKV: any; | ||
export const PDF: any; | ||
export const RAR: any; | ||
export const GZIP: any; | ||
export const ZIP_0: any; | ||
export const ZIP_1: any; | ||
export const ZIP_2: any; | ||
export const WEBP: any; | ||
export const SVG: any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Check if buffer is one of the predefined file types function | ||
* @param buffer {Buffer} | ||
* @param fns {Array<function>} | ||
* @returns {boolean|Error} | ||
*/ | ||
export function oneOf(buffer: Buffer, ...fns: Array<Function>): boolean | Error; | ||
export function isPng(buffer: any): boolean | Error; | ||
export function isAvif(buffer: any): boolean | Error; | ||
export function isBmp(buffer: any): boolean | Error; | ||
export function isDib(buffer: any): boolean; | ||
export function isGif(buffer: any): boolean | Error; | ||
export function isTiff(buffer: any): boolean | Error; | ||
export function isMp3(buffer: any): boolean | Error; | ||
export function isMpg(buffer: any): boolean; | ||
export function isFlv(buffer: any): boolean | Error; | ||
export function isApk(buffer: any): boolean | Error; | ||
export function isMsOffice(buffer: any): boolean | Error; | ||
export function isJar(buffer: any): boolean | Error; | ||
export function isSwf(buffer: any): boolean; | ||
export function isJpeg(buffer: any): boolean | Error; | ||
export function isMp4(buffer: any): boolean; | ||
export function is3gp(buffer: any): boolean; | ||
export function isMkv(buffer: any): boolean | Error; | ||
export function isPdf(buffer: any): boolean | Error; | ||
export function isRar(buffer: any): boolean | Error; | ||
export function isGzip(buffer: any): boolean | Error; | ||
export function isZip(buffer: any): boolean; | ||
export function isWebp(buffer: any): boolean | Error; | ||
export function isSvg(buffer: any): boolean | Error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// Change this to match your project | ||
"include": ["lib/**/*", "index.js"], | ||
|
||
"compilerOptions": { | ||
// Tells TypeScript to read JS files, as | ||
// normally they are ignored as source files | ||
"allowJs": true, | ||
// Generate d.ts files | ||
"declaration": true, | ||
// This compiler run should | ||
// only output d.ts files | ||
"emitDeclarationOnly": true, | ||
// Types should go into this directory. | ||
// Removing this would place the .d.ts files | ||
// next to the .js files | ||
"outDir": "dist", | ||
}, | ||
} |