
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
true-case-path
Advanced tools
Given a possibly case-variant version of an existing filesystem path, returns the case-exact, normalized version as stored in the filesystem.
Given a possibly case-variant version of an existing filesystem path, returns the absolute, case-exact, normalized version as stored in the filesystem.
const { trueCasePath, trueCasePathSync } = require('true-case-path')
trueCasePath(<fileSystemPath>)
.then((caseCorrectPath) => {
// ...
})
const caseCorrectPath = trueCasePathSync(<fileSystemPath>)
NOTE: If no matching path exists, an error with be thrown.
Optionally takes a second argument to use as the base path to begin case-correction from. This can be particularly useful within shared hosting environments since true-case-path relies on the ability to list a directory's contents in order to check the case and attempting to list the contents of / or /home will generally result in a permissions error.
const { trueCasePath } = require('true-case-path')
trueCasePath('code/my-app/sOmE-FiLe', '/home/casey')
NOTE: When specifying a basePath, the first argument is expected to be the file path relative to that basePath. If the first argument is absolute, every path segment will be checked. basePath defaults to
process.cwd()if not specified and the first argument is relative.
Windows, OSX, and Linux
const { trueCasePathSync } = require('true-case-path')
trueCasePathSync('/users/guest') // OSX: -> '/Users/Guest'
trueCasePathSync('c:\\users\\all users') // Windows: -> 'c:\Users\All Users'
This is a Webpack plugin that enforces the entire path of all required modules to match the exact case of the actual path on disk. It is useful for avoiding module resolution issues on case-sensitive file systems or when working across different operating systems. It is similar to true-case-path in that it deals with case sensitivity issues, but it is specifically tailored for Webpack and module resolution rather than general file path usage.
The normalize-path package is used to normalize file paths, ensuring they have consistent slashes and do not include redundant segments. While it does not provide the true case of a path, it is related in the sense that it also deals with file path manipulation and normalization.
This package provides utilities for converting a string to various case formats, including path case. It does not check the file system for the true case of a path, but it can be used to manipulate strings to have a consistent case format, which can be useful in file path operations.
FAQs
Given a possibly case-variant version of an existing filesystem path, returns the case-exact, normalized version as stored in the filesystem.
The npm package true-case-path receives a total of 1,607,623 weekly downloads. As such, true-case-path popularity was classified as popular.
We found that true-case-path demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.