Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
Borewit and sindresorhus authored Jul 14, 2021
1 parent 8f2886d commit 8657114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ If `sampleSize` is not provided, a backward-compatible sample size of 4100 bytes

Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `FileType.fromFile()`.

Very handy to put in between a stream, but it comes with a price. Internally `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type. The sample size impacts the file detection resolution. A smaller sample size will result in lower probability of the best file type detection.
This method can be handy to put in between a stream, but it comes with a price. Internally, `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type. The sample size impacts the file detection resolution. A smaller sample size will result in lower probability of the best file type detection.

*Note:* This method is only available using Node.js.

Expand Down

0 comments on commit 8657114

Please sign in to comment.