fix(core): update

This commit is contained in:
2021-08-10 11:49:39 +02:00
parent 75394aaf8b
commit 1907d253be
9 changed files with 24570 additions and 563 deletions

View File

@ -1,19 +1,8 @@
import * as plugins from './smartmime.plugins';
export const binaryFileTypes = [
'jpg',
'png',
'pdf'
];
export const binaryFileTypes = ['jpg', 'png', 'pdf'];
export const supportedFileTypes = [
'json',
'html',
'svg',
'jpg',
'ts',
'js',
];
export const supportedFileTypes = ['json', 'html', 'svg', 'jpg', 'ts', 'js'];
export type TMimeTypes = 'image/jpeg' | 'image/svg+xml' | 'application/json' | 'text/html';
@ -30,8 +19,8 @@ export const isBinary = (pathArg: string) => {
isBinary = pathArg.endsWith(`.${binaryFileType}`);
}
return isBinary;
}
};
export const getEncoding = (pathArg: string) => {
return isBinary(pathArg) ? 'binary' : 'utf8';
}
};

View File

@ -1,13 +1,9 @@
// node native scope
import * as path from 'path';
export {
path
};
export { path };
// thirdparty scope
import mimeTypes from 'mime-types';
export {
mimeTypes
};
export { mimeTypes };