1.0.4 • Published 4 years ago
file-infos v1.0.4
file-infos
Get file informations
How to install
yarn add file-infos
or
npm install --save file-infos
Sample
const fileInfos = require('file-infos');
console.log(fileInfos('./test.jpg'));
/*
Output =>
{
mimetype: 'image/jpeg',
filename: 'test.jpg',
fileType: 'image',
path: './test.jpg',
size: 180596,
createdAt: 2019-05-03T22:55:49.000Z,
ext: 'jpg',
sizeStr: '176.36KB',
basename: 'test'
}
*/