ext-name

WebJar for ext-name

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

ext-name
Last Version

Last Version

5.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

ext-name
WebJar for ext-name
Project URL

Project URL

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

Source Code Management

https://github.com/kevva/ext-name

Download ext-name

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm » ext-list jar [2.0.0,3)
org.webjars.npm » sort-keys-length jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

ext-name Build Status

Get the file extension and MIME type from a file

Install

$ npm install --save ext-name

Usage

const extName = require('ext-name');

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

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

API

extName(filename)

Returns an Array with objects with the file extension and MIME type.

filename

Type: string

Get the extension and MIME type from a filename.

extName.mime(mimetype)

Returns an Array with objects with the file extension and MIME type.

mimetype

Type: string

Get the extension and MIME type from a MIME type.

Related

License

MIT © Kevin Mårtensson

Versions

Version
5.0.0