Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pfrazee/pull-identify-filetype
Identify the type of file passing through the stream
https://github.com/pfrazee/pull-identify-filetype
Last synced: 2 months ago
JSON representation
Identify the type of file passing through the stream
- Host: GitHub
- URL: https://github.com/pfrazee/pull-identify-filetype
- Owner: pfrazee
- Created: 2015-09-10T02:52:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T23:37:10.000Z (almost 9 years ago)
- Last Synced: 2024-10-17T17:35:01.797Z (2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pull-identify-filetype
Identifies the file-type passing through the stream using the [magic-number signatures at the start of the file](http://en.wikipedia.org/wiki/list_of_file_signatures).
```js
var pull = require('pull-stream')
var identify = require('pull-identify-filetype')pull(
/* source */
identify(function (type) {
console.log(type) // => string | false
}),
/* sink */
)
```**Supported types:**
jpg
png
gif
bmp
tif
tif
nif
ico
psd
rar
zip
gz
tar
msi
iso
rtf
avi
mov
wmv
wma
swf
flv
mid
doc
docx
mp3
svg
html**Tested:**
tif
psd
gif
jpg
png
bmp
tif
ico
rar
docx
gz
tar
doc
rtf
mov
svg
html