npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

ext-ext

0.1.2

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:0
$ npm install ext-ext
DailyWeeklyMonthlyYearly

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

  • github/jonschlinkert
  • twitter/jonschlinkert

License

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


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