expand-template

WebJar for expand-template

Лицензия

Лицензия

MIT
Группа

Группа

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

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

expand-template
Последняя версия

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

2.0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

expand-template
WebJar for expand-template
Ссылка на сайт

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

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

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

https://github.com/ralphtheninja/expand-template

Скачать expand-template

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

expand-template

Expand placeholders in a template string.

npm Node version Build Status JavaScript Style Guide

Install

$ npm i expand-template -S

Usage

Default functionality expands templates using {} as separators for string placeholders.

var expand = require('expand-template')()
var template = '{foo}/{foo}/{bar}/{bar}'
console.log(expand(template, {
  foo: 'BAR',
  bar: 'FOO'
}))
// -> BAR/BAR/FOO/FOO

Custom separators:

var expand = require('expand-template')({ sep: '[]' })
var template = '[foo]/[foo]/[bar]/[bar]'
console.log(expand(template, {
  foo: 'BAR',
  bar: 'FOO'
}))
// -> BAR/BAR/FOO/FOO

License

All code, unless stated otherwise, is dual-licensed under WTFPL and MIT.

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

Версия
2.0.3
1.1.1
1.1.0