strip-extension
Strip extension from a path. Also works when query parameters are involved
Last updated 12 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install strip-extension 
SYNC missed versions from official npm registry.

strip-extension

Strip extension from a path. Also works when query parameters are involved.

Install

npm install strip-extension --save

Usage

var stripExtension = require('strip-extension');

var pathname = '/some/path/to/file.html?param=test';

console.log(stripExtension(pathname)); // OUTPUT: /some/path/to/file?param=test

Run Tests

npm install
npm test

Current Tags

  • 1.1.0                                ...           latest (12 years ago)

3 Versions

  • 1.1.0                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 3
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE