ext-ext
Extension of the node.js path.extname method.
Last updated 12 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ext-ext 
SYNC missed versions from official npm registry.

ext-ext NPM version

Extension of the node.js path.extname method.

Install

Install with npm:

npm i ext-ext --save-dev

Usage

var ext = require('ext-ext');
var filepath = 'foo/bar/baz.min.js';

console.log(ext(filepath));
//=> '.min.js'

console.log(ext(filepath, {extDot: 'first'}));
//=> '.min'

console.log(ext(filepath, {extDot: 'last'}));
//=> '.js'

See the tests for more examples.

Tests

In the command line, run:

mocha

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on June 17, 2014.

Current Tags

  • 0.1.2                                ...           latest (12 years ago)

3 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |