UNPKG

@schemifyjs/schematics

Version:

Reusable schematics for scaffolding SchemifyJS projects.

14 lines (13 loc) 264 B
import path from 'path'; const BINARY_EXTENSIONS = new Set([ '.png', '.jpg', '.jpeg', '.gif', '.ico', '.pdf', '.zip' ]); export function isBinaryFile(filePath) { return BINARY_EXTENSIONS.has(path.extname(filePath).toLowerCase()); }