normalize-path
npmv3.0.0Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.
Overview
normalize-path is an npm package that normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. The latest version is 3.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of normalize-path.
Dependencies
Dev (3)
Used by
Popular packages that depend on normalize-path.
Alternatives to normalize-path
Convert Windows backslash paths to slash paths
Get paths for storing things like data, config, cache, etc
Bindings for the Watchman file watching service
Make a directory and its parents if needed - Think `mkdir -p`
Find a file or directory by walking up parent directories — Zero dependencies
Minimal and efficient cross-platform file watching library
Find the root directory of a Node.js project or npm package
Find a file or directory by walking up parent directories
Get the first path that exists on disk of multiple paths
Matches strings against configurable strings, globs, regular expressions, and/or functions
Node.js path.parse() ponyfill
Resolve the path of a module like `require.resolve()` but from a given path
Frequently installed together
Version history
| Version | Published | License |
|---|---|---|
| 3.0.0latest | 8 years ago | MIT |
| 2.1.1 | 9 years ago | MIT |
| 2.1.0 | 9 years ago | MIT |
| 2.0.1 | 10 years ago | MIT |
| 2.0.0 | 10 years ago | MIT |
| 1.0.0 | 11 years ago | MIT |
| 0.3.0 | 11 years ago | MIT |
| 0.2.1 | 11 years ago | MIT |
| 0.2.0 | 11 years ago | MIT |
| 0.1.1 | 12 years ago | MIT |
| 0.1.0 | 12 years ago | MIT |
Maintainers
Frequently asked questions
How do I install normalize-path?
Run `npm install normalize-path` to add normalize-path to your npm project.
What license is normalize-path released under?
normalize-path is distributed under the MIT license.
How popular is normalize-path?
normalize-path has approximately 0 downloads per week and 1 known dependent packages.