replace-homedir

WebJar for replace-homedir

Лицензия

Лицензия

MIT
Группа

Группа

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

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

replace-homedir
Последняя версия

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

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

replace-homedir
WebJar for replace-homedir
Ссылка на сайт

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

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

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

https://github.com/gulpjs/replace-homedir

Скачать replace-homedir

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

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

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm : homedir-polyfill jar [1.0.1,2)
org.webjars.npm : is-absolute jar [1.0.0,2)
org.webjars.npm : remove-trailing-separator jar [1.1.0,2)

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

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

replace-homedir

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

Replace user home in a string with another string. Useful for tildifying a path.

Usage

var replaceHomedir = require('replace-homedir');

var shortPath = replaceHomedir('/Users/phated/myProject', '~');
// shortPath === '~/myProject'

API

replaceHomedir(path, replacement)

Takes a string path as the first argument and a string or function replacement as the second argument. If the path is absolute and begins with the User's homedir, the homedir portion of the path is replaced with replacement using String#replace.

If path is not a string, the function will throw.

License

MIT

org.webjars.npm

gulp

A toolkit to automate & enhance your workflow

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

Версия
1.0.0