extname
Get the file extension and MIME type from a file
Last updated 12 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install extname 
SYNC missed versions from official npm registry.

ext-name Build Status

Get the file extension and MIME type from a file

Install

$ npm install --save ext-name

Usage

var extname = require('ext-name');

extname('foobar.tar', function (err, res) {
    if (err) {
        throw err;
    }

    console.log(res);
    // => { 'ext': 'tar', 'mime': 'application/x-tar' }
});

CLI

$ npm install --global ext-name
$ extname --help

Usage
  $ extname <file>

Example
  $ extname file.tar.gz

License

MIT © Kevin Mårtensson

Current Tags

  • 0.1.5                                ...           latest (12 years ago)

1 Versions

  • 0.1.5                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |