【文件属性】:
文件名称:promisify-file:承诺读取文件
文件大小:222KB
文件格式:ZIP
更新时间:2021-04-09 05:06:20
JavaScript
承诺文件
用法
基本语法
import PromisifyFile from 'promisify-file'
; ( async ( ) => {
const testFile = new File (
[ 'hello from promisify-file.txt' ] ,
'promisify-file.txt' ,
{
type : 'text/plain' ,
lastModified : Date . now ( ) ,
}
)
const promisifyFile = new PromisifyFile ( file )
try {
console . log ( await promisifyFile . text ( ) ) // print `hello from promisify-f
【文件预览】:
promisify-file-master
----.gitignore(1KB)
----.huskyrc.js(223B)
----package.json(3KB)
----.npmrc(34B)
----commitlint.config.js(184B)
----src()
--------core()
--------index.js(180B)
--------utils()
--------constants.js(610B)
--------supports.js(831B)
----jest.config.js(298B)
----dist()
--------test.e98b79dd.map(234KB)
--------index.js(11KB)
--------index.map(3KB)
--------index.html(699B)
--------fixture()
--------test.e98b79dd.js(308KB)
----.github()
--------workflows()
--------dependabot.yml(950B)
--------funding.yml(64B)
----rollup.config.js(973B)
----.prettierignore(402B)
----__tests__()
--------from.js(1KB)
--------.eslintrc.js(386B)
--------constructor.js(2KB)
--------shared()
--------prototype.js(5KB)
----.browserslistrc(16B)
----.eslintrc.js(417B)
----lint-staged.config.js(199B)
----license(1KB)
----prettier.config.js(207B)
----.eslintignore(374B)
----readme.md(8KB)
----babel.config.js(643B)
----.circleci()
--------config.yml(577B)
----.markdownlint.json(46B)
----.gitattributes(19B)
----.yarnrc(15B)
----renovate.json(62B)
----.editorconfig(666B)