JSPM

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

Check if the file path are equal

Package Exports

  • path-equal

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

Readme

path-equal

unstable NPM version NPM downloads

Circle CI Travis CI Codecov Coveralls Status

Greenkeeper Semantic Release

Visual Studio Code Wallaby.js

File paths in Unix and Windows are different. During test, sometimes we want to compare if the file paths are the same.

Doing this comparison can get unwieldy. But not doing it would means the project can only be develop in specific platform.

This library provides this comparison to check if the two paths are the same, regardless of the running platform.

import { pathEqual } from 'path-equal'

pathEqual('dir/sub-dir/file.txt', 'dir\\sub-dir\\file.txt') // true

This library will not access the file system, so comparing absolute path with relative path will fail.

Contribute

# after fork and clone
npm install

# begin making changes
git checkout -b <branch>
npm run watch

# after making change(s)
git commit -m "<commit message>"
git push

# create PR