Socket
Socket
Sign inDemoInstall

ext-name

Package Overview
Dependencies
4
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ext-name

Get the file extension and MIME type from a file


Version published
Maintainers
1
Install size
538 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 31 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc