fix(core): update

This commit is contained in:
Philipp Kunz 2024-05-28 12:42:25 +02:00
parent a384a6ac0a
commit e453ba9a79
2 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartmime', name: '@push.rocks/smartmime',
version: '2.0.1', version: '2.0.2',
description: 'A module for detecting MIME types with support for binary and text file distinctions.' description: 'A module for detecting MIME types with support for binary and text file distinctions.'
} }

View File

@ -43,7 +43,7 @@ export const getEncoding = async (optionsArg: {
/** /**
* Synchronous version to get encoding based on the file extension * Synchronous version to get encoding based on the file extension
*/ */
export const getPathEncodingSync = (path: string): 'binary' | 'utf8' => { export const getEncodingForPathSync = (path: string): 'binary' | 'utf8' => {
const mimeType = plugins.mime.getType(path); const mimeType = plugins.mime.getType(path);
return binaryMimeTypes.includes(mimeType) ? 'binary' : 'utf8'; return binaryMimeTypes.includes(mimeType) ? 'binary' : 'utf8';
}; };