directory-index

0.1.0 • Public • Published

directory-index

Convert directory url path to it's index file path

Install

npm install directory-index --save

Usage

var index = require('directory-index');
 
console.log(index('/some-dir')) // OUTPUTS: /some-dir/index.html'

Options

index(path [, indexFile, extension])

  • path - the path the convert (or not)
  • indexFile - the name of the index file. Defaults to index.html
  • extension - the extension to compare path to. Defaults to .html

Run Tests

npm install
npm test`

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1,131
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1,131

Package Sidebar

Install

npm i directory-index

Weekly Downloads

349

Version

0.1.0

License

MIT

Last publish

Collaborators

  • scottcorgan