Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extname

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extname

Get the file extension and MIME type from a file

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
464
increased by99.14%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 09 Aug 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc