UNPKG

mili

Version:

Scaffolding with continuous control over the development of the project.

13 lines (12 loc) 420 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.inferEncoding = void 0; const path = require("path"); const binaryFileExtensitions = ['.jpeg', '.jpg', '.png', '.ico', '.webp']; function inferEncoding(filepath) { const ext = path.extname(filepath); if (binaryFileExtensitions.includes(ext)) return 'binary'; return 'utf8'; } exports.inferEncoding = inferEncoding;