buffer-type

WebJar for buffer-type

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

buffer-type
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

buffer-type
WebJar for buffer-type
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/node-modules/buffer-type

Download buffer-type

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/buffer-type/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>buffer-type</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-type/
implementation 'org.webjars.npm:buffer-type:0.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-type/
implementation ("org.webjars.npm:buffer-type:0.0.2")
'org.webjars.npm:buffer-type:jar:0.0.2'
<dependency org="org.webjars.npm" name="buffer-type" rev="0.0.2">
  <artifact name="buffer-type" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='buffer-type', version='0.0.2')
)
libraryDependencies += "org.webjars.npm" % "buffer-type" % "0.0.2"
[org.webjars.npm/buffer-type "0.0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

buffer-type

NPM version NPM quality build status Test coverage David deps Known Vulnerabilities NPM download

Detect content-type from Buffer data.

Install

$ npm install buffer-type

Usage

const bt = require('buffer-type');
const fs = require('fs');

const info = bt(fs.readFileSync(__dirname + '/logo.png'));
console.log(info);
// {
//   type: 'image/png',
//    extension: '.png',
//    width: 618,
//    height: 96,
//    bit: 8, // bit depth
//    color: 6,
//    compression: 0,
//    filter: 0,
//    interlace: 0
// }

References

TODO

  • Image
    • [√] .png
    • [√] .jpg
    • [√] .bmp
    • [√] .gif
    • [√] .webp
    • .svg
    • .tif
    • .psd
  • Tar
    • .tar
    • .gzip
    • .zip
    • .rar
  • PE file
    • .exe
    • .msi
    • .apk
    • .ipa
  • Text
    • .xml
    • .html
    • .json
  • Media
    • .mp3
    • .mp4
    • .avi

License

MIT

org.webjars.npm

node_modules

All about node.js modules like your project 'node_modules' dir

Versions

Version
0.0.2