JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7741611
  • Score
    100M100P100Q210847F

Parse a filepath and return an object of path parts. Tiny lib, no dependencies.

Package Exports

  • parse-filepath

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-filepath) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

parse-filepath NPM version

Parse a filepath and return an object of path parts. Tiny lib, no dependencies.

Install

Install with npm:

npm i parse-filepath --save-dev

Usage

var obj = require('filepath-object');
var file = obj('foo/bar/baz.html');
console.log(file);

Returns:

{
  filepath: 'foo/index.html',
  dir: 'foo',
  dirname: 'foo',
  filename: 'index.html',
  basename: 'index.html',
  name: 'index',
  ext: '.html',
  extname: '.html',
  fn: ''
}

Author

Jon Schlinkert

License

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


This file was generated by verb-cli on April 29, 2014.