JSPM

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

A helper class for working with paths

Package Exports

  • @wessberg/pathutil

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

Readme

PathUtil

NPM version License-mit

A helper class for working with paths.

Installation

Simply do: npm install @wessberg/pathutil.

Usage

const pathUtil = new PathUtil();
pathUtil.hasExtension("foo/bar.ts"); // true
pathUtil.clearExtension("foo/bar.ts"); // foo/bar
pathUtil.isLib("path"); // true
pathUtil.makeRelative("./foo/bar/baz.ts", "./foo/bar.ts"); // "../bar.ts"