JSPM

path-directories

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 129
  • Score
    100M100P100Q75843F
  • License MIT

Get all directories contained in a string file path

Package Exports

  • path-directories

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 (path-directories) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

path-directories

Get all directories contained in a string file path

Install

$ npm install --save path-directories

Usage

const dirnames = require('path-directories');
// Windows path - gives [ 'D:', 'DDL', 'ANIME', 'les chevaliers du zodiaques' ]
dirnames("D:\\DDL\\ANIME\\les chevaliers du zodiaques\\whateverFile.avi");
// POSIX path - gives [ 'D:', 'DDL', 'EBOOK' ]
dirnames("D:/DDL/EBOOK/whatEverFile.pub");

API

path-directories(filePath)

Returns all the directories in this string file path.

License

MIT