Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via pnpm

upath 1.2.0

A proxy to `path`, replacing `\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.
Package summary
Share
0
issues
1
license
1
MIT
Package created
29 Oct 2014
Version published
2 Sep 2019
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
upath@1.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of upath 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does upath do?

uPath is a reputable npm package that garners immense popularity for its nodejs path proxy feature. This fantastic utility seamlessly replaces the Windows backslash (\) with the universally accepted Unix slash (/) in all string parameters and results. Additionally, it supports UNC paths and introduces new method capabilities that can normalize and join, maintain a leading ./, and add, trim, modify, default, and remove file extensions.

How do you use upath?

To leverage the impressive functionality of uPath, you initiate with its installation via npm. You can use the following command in your terminal: npm install upath. Once installed, you may import it into your JavaScript file and employ its methods according to your requirements.

Below is a brief demonstration of how to use some of uPath's main methods:

var upath = require('upath');

var newPath = upath.normalize('c:\\windows\\nodejs\\path');
console.log(newPath); 
// Expected output: 'c:/windows/nodejs/path'

var joinedPath = upath.join('some\\windows\\only', '..\\path');
console.log(joinedPath); 
// Expected output: 'some/windows/path'

var parsedPath = upath.parse('c:\Windows\Directory\somefile.ext');
console.log(parsedPath); 
// Expected output: { root: '', dir: 'c:/Windows/Directory', base: 'somefile.ext', ext: '.ext', name: 'somefile' }

var fileWithNewExt = upath.addExt('myfile/addExt', 'txt');
console.log(fileWithNewExt); 
// Expected output: 'myfile/addExt.txt'

Where are the upath docs?

In terms of documentation, uPath presents a comprehensive guide in its GitHub repository. These in-depth documents cover all aspects of the package, including full method specifications, examples, and even results to expect from its use. Reference to these documents is provided automatically as they are auto-generated from the package's specs while running on Linux. This approach ensures the most accurate and up-to-date documentation for its users.