whether:通过文件魔术数字识别文件类型

时间:2021-05-10 13:17:54
【文件属性】:
文件名称:whether:通过文件魔术数字识别文件类型
文件大小:376KB
文件格式:ZIP
更新时间:2021-05-10 13:17:54
JavaScript 无论 通过文件魔术数字识别文件类型。 关于魔术数字 幻数是文件的头几位,可唯一标识文件的类型。 。 入门指南 安装 npm install whether 检查图像是否正好是给定的类型。 var whether = require ( 'whether' ) . create ( ) ; whether ( 'path/to/image' ) . is ( 'jpg' ) ; // will return boolean // or async way whether ( 'path/to/image' ) . is ( 'jpg' , callback ) ; // check whether the file content type is matched with the file extension. whether ( 'path/to/image.
【文件预览】:
whether-master
----config.js(1KB)
----test()
--------fixtures()
--------define.js(2KB)
--------basic.js(3KB)
----README.md(3KB)
----libs()
--------whether.js(3KB)
--------utils.js(1KB)
----.gitignore(22B)
----index.js(43B)
----package.json(529B)

网友评论