1.0.3-alpha.2 • Published 5 years ago
@neewbee/processor v1.0.3-alpha.2
文件处理函数
API
Classes
Functions
FileReaderPromise
Kind: global class
- FileReaderPromise
- .readAsText(file) ⇒ Promise.<string>
- .readAsDataURL(file) ⇒ Promise.<string>
- .readAsArrayBuffer(file) ⇒ Promise.<string>
- .readAsBinaryString(file) ⇒ Promise.<string>
fileReaderPromise.readAsText(file) ⇒ Promise.<string>
Kind: instance method of FileReaderPromise
Param | Type |
---|---|
file | Blob |
fileReaderPromise.readAsDataURL(file) ⇒ Promise.<string>
Kind: instance method of FileReaderPromise
Param | Type |
---|---|
file | Blob |
fileReaderPromise.readAsArrayBuffer(file) ⇒ Promise.<string>
Kind: instance method of FileReaderPromise
Param | Type |
---|---|
file | Blob |
fileReaderPromise.readAsBinaryString(file) ⇒ Promise.<string>
Kind: instance method of FileReaderPromise
Param | Type |
---|---|
file | Blob |
processFile()
Kind: global function
Param | Description |
---|---|
opts.chunkSize | size of chunk |
opts.file | File |
opts.debug | debug mode |
sliceFile()
Kind: global function
Param | Description |
---|---|
opts.chunkSize | size of a chunk |
opts.file | File |
md5(blob, extra)
Kind: global function
Param | Description |
---|---|
blob | Blob |
extra | options |
extra.threshold | use incrementallyHashFile if blob size is bigger than threshold |
extra.debug | debug mode |
hashFile(blob)
Kind: global function
Param | Description |
---|---|
blob | Blob |
incrementallyHashFile(blob, opts)
Kind: global function
Param | Description |
---|---|
blob | Blob |
opts | opts options |
opts.debug | debug mode |
opts.chunkSize | size of a chunk |
1.0.3-alpha.2
5 years ago
1.0.3-alpha.1
5 years ago
1.0.3-alpha.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago