'use strict';

var _commonjsHelpers = require('../../_virtual/_commonjsHelpers.js');
require('../strtok3/lib/index.js');
var core$1 = require('./core.js');
var index = require('../../_virtual/index4.js');

const strtok3 = index.__exports;
const core = core$1.core;

async function fromFile(path) {
	const tokenizer = await strtok3.fromFile(path);
	try {
		return await core.fromTokenizer(tokenizer);
	} finally {
		await tokenizer.close();
	}
}

const fileType = {
	fromFile
};

Object.assign(fileType, core);

Object.defineProperty(fileType, 'extensions', {
	get() {
		return core.extensions;
	}
});

Object.defineProperty(fileType, 'mimeTypes', {
	get() {
		return core.mimeTypes;
	}
});

var fileType_1 = fileType;

var FileType = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(fileType_1);

module.exports = FileType;
