https://github.com/privatenumber/is-fs-case-sensitive
Check whether the file-system is case-sensitive
https://github.com/privatenumber/is-fs-case-sensitive
case case-sensitive case-sensitivity fs
Last synced: 4 months ago
JSON representation
Check whether the file-system is case-sensitive
- Host: GitHub
- URL: https://github.com/privatenumber/is-fs-case-sensitive
- Owner: privatenumber
- License: mit
- Created: 2022-12-27T13:49:03.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2023-02-05T11:28:58.000Z (over 2 years ago)
- Last Synced: 2025-05-22T03:09:12.889Z (5 months ago)
- Topics: case, case-sensitive, case-sensitivity, fs
- Language: TypeScript
- Homepage:
- Size: 46.9 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-fs-case-sensitive [](https://npm.im/is-fs-case-sensitive) [](https://packagephobia.now.sh/result?p=is-fs-case-sensitive)
Detect whether the file-system has case-sensitive file paths.
## 🙋♂️ Why?
File systems can have case-sensitive or case-insensitive file paths:- [macOS is case-insensitive by default](https://support.apple.com/guide/disk-utility/file-system-formats-dsku19ed921c/mac#dsku127e6e61)
- [Windows is case-insensitive by default](https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity)
- [Linux is case-sensitive](https://stackoverflow.com/a/26300931/911407)This distinction is important for tools that navigate the file-system (e.g. whether to apply a glob case-sensitively).
## 🚀 Install
```sh
npm install is-fs-case-sensitive
```## 👨🏻🏫 Examples
```ts
import { isFsCaseSensitive } from 'is-fs-case-sensitive'console.log(isFsCaseSensitive())
// => false
```## ⚙️ API
### isFsCaseSensitive(fs)
Returns: `boolean`
#### fs
Type: `typeof fs`Default: `import('fs')`
The file-system to use to check for case-sensitivity.