Socket
Socket
Sign inDemoInstall

pathe

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pathe - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.0.2](https://github.com/unjs/pathe/compare/v0.0.1...v0.0.2) (2021-09-22)
### Bug Fixes
* **pkg:** expose types ([77000b1](https://github.com/unjs/pathe/commit/77000b1a45780fd62c93dc71d8264f10d97af864))
### 0.0.1 (2021-09-22)

3

package.json
{
"name": "pathe",
"version": "0.0.1",
"version": "0.0.2",
"description": "Normalized paths for Node.js",

@@ -15,2 +15,3 @@ "repository": "unjs/pathe",

"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"files": [

@@ -17,0 +18,0 @@ "dist"

@@ -5,2 +5,6 @@ # pathe

[![version][npm-v-src]][npm-v-href]
[![downloads][npm-d-src]][npm-d-href]
[![size][size-src]][size-href]
🧪 This package is still experimental and might not handle all cases. Please track issues.

@@ -10,12 +14,11 @@

For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MSDos and using backslash `\\` for seperating paths rather than slash `/`. While [modern versions of Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) as well as Node.js on Windows, support slash nowadays!
For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MS-DOS
and using backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, [Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) supports both Slash and Backslash for paths.
[Node.js's built in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used.
[Node.js's built in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. **This makes inconsistent code behavior between Windows and POSIX.**
This makes lots of trouble of different code behavior between Windows and Posix and it makes problems with different behaviors.
This package is a drop-in replacement of the Node.js's `path` module and ensures paths are normalized with slash `/`.
This package is a replacement based on built in `path` module and always ensures path are normalized with slash `/`.
Compared to popular [upath](https://github.com/anodynos/upath), pathe is providing **identical exports** of Node.js with normalization on **all operations** and written in modern **ESM/Typescript**.
Compared to popular [upath](https://github.com/anodynos/upath), this package tries to privide identical exports of Node.js with normalization on all operations and written in modern ESM/Typescript (upath is written with coffeescript and is not supporting native esm exports).
## 💿 Install

@@ -41,5 +44,19 @@

Read more about path utils from [Node.js documentation](https://nodejs.org/api/path.html) and rest assured behavior is ALWAYS like POSIX regardless of your input paths format and running platform!
## License
[MIT](./LICENSE)
MIT. Made with 💖
<!-- Refs -->
[npm-v-src]: https://img.shields.io/npm/v/pathe?style=flat-square
[npm-v-href]: https://npmjs.com/package/pathe
[npm-d-src]: https://img.shields.io/npm/dm/pathe?style=flat-square
[npm-d-href]: https://npmjs.com/package/pathe
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/pathe/ci/main?style=flat-square
[github-actions-href]: https://github.com/unjs/pathe/actions?query=workflow%3Aci
[size-src]: https://packagephobia.now.sh/badge?p=pathe
[size-href]: https://packagephobia.now.sh/result?p=pathe
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc