true-case-path

WebJar for true-case-path

Лицензия

Лицензия

Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

true-case-path
Последняя версия

Последняя версия

1.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

true-case-path
WebJar for true-case-path
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/barsh/true-case-path

Скачать true-case-path

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/true-case-path/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>true-case-path</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/true-case-path/
implementation 'org.webjars.npm:true-case-path:1.0.3'
// https://jarcasting.com/artifacts/org.webjars.npm/true-case-path/
implementation ("org.webjars.npm:true-case-path:1.0.3")
'org.webjars.npm:true-case-path:jar:1.0.3'
<dependency org="org.webjars.npm" name="true-case-path" rev="1.0.3">
  <artifact name="true-case-path" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='true-case-path', version='1.0.3')
)
libraryDependencies += "org.webjars.npm" % "true-case-path" % "1.0.3"
[org.webjars.npm/true-case-path "1.0.3"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : glob jar [7.1.2,8)

Модули Проекта

Данный проект не имеет модулей.

true-case-path

Usage

trueCasePathSync(<fileSystemPath>)

Description

Given a possibly case-variant version of an existing filesystem path, returns the case-exact, normalized version as stored in the filesystem.

If the input path is a globbing pattern as defined by the 'glob' npm package, only the 1st match, if any, is returned. Only a literal input path guarantees an unambiguous result.

If no matching path exists, undefined is returned. On case-SENSITIVE filesystems, a match will also be found, but if case variations of a given path exist, it is undefined which match is returned.

Platforms

Windows, OSX, and Linux (though note the limitations with case-insensitive filesystems).

Limitations

  • Paths starting with './' are acceptable, but paths starting with '../' are not - when in doubt, resolve with fs.realPathSync() first. An initial '.' and interior '..' instances are normalized, but a relative input path still results in a relative output path. If you want to ensure an absolute output path, apply fs.realPathSync() to the result.
  • On Windows, no attempt is made to case-correct the drive letter or UNC-share component of the path.
  • Unicode support:
    • Be sure to use UTF8 source-code files (with a BOM on Windows)
    • On OSX, the input path is automatically converted to NFD Unicode form to match how the filesystem stores names, but note that the result will invariably be NFD too (which makes no difference for ASCII-characters-only names).

Examples

const trueCasePathSync = require('true-case-path')

trueCasePathSync('/users/guest') // OSX: -> '/Users/Guest'

trueCasePathSync('c:\\users\\all users') // Windows: -> 'c:\Users\All Users'

Attribution

The code for this project was sourced from http://stackoverflow.com/a/33139702/45375

Версии библиотеки

Версия
1.0.3