📜  文件类型节点 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:03.188000             🧑  作者: Mango

代码示例1
const FileType = require('file-type');

(async () => {
    console.log(await FileType.fromFile('Unicorn.png'));
    //=> {ext: 'png', mime: 'image/png'}
})();