constantinople

WebJar for constantinople

Лицензия

Лицензия

MIT
Категории

Категории

Ant Компиляция и сборка
Группа

Группа

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

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

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

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

3.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

constantinople
WebJar for constantinople
Ссылка на сайт

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

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

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

https://github.com/pugjs/constantinople

Скачать constantinople

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

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.webjars.npm : types__babel-types jar [7.0.0,8)
org.webjars.npm : types__babylon jar [6.16.2,7)
org.webjars.npm : babel-types jar [6.26.0,7)
org.webjars.npm : babylon jar [6.18.0,7)

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

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

constantinople

Determine whether a JavaScript expression evaluates to a constant (using Babylon). Here it is assumed to be safe to underestimate how constant something is.

Build Status Dependency Status NPM version

Installation

npm install constantinople

Usage

var isConstant = require('constantinople');

if (isConstant('"foo" + 5')) {
  console.dir(isConstant.toConstant('"foo" + 5'));
}
if (isConstant('Math.floor(10.5)', {Math: Math})) {
  console.dir(isConstant.toConstant('Math.floor(10.5)', {Math: Math}));
}

API

isConstant(src, [constants, [options]])

Returns true if src evaluates to a constant, false otherwise. It will also return false if there is a syntax error, which makes it safe to use on potentially ES6 code.

Constants is an object mapping strings to values, where those values should be treated as constants. Note that this makes it a pretty bad idea to have Math in there if the user might make use of Math.random and a pretty bad idea to have Date in there.

Options are directly passed-through to Babylon.

toConstant(src, [constants, [options]])

Returns the value resulting from evaluating src. This method throws an error if the expression is not constant. e.g. toConstant("Math.random()") would throw an error.

Constants is an object mapping strings to values, where those values should be treated as constants. Note that this makes it a pretty bad idea to have Math in there if the user might make use of Math.random and a pretty bad idea to have Date in there.

Options are directly passed-through to Babylon.

License

MIT

org.webjars.npm

Pug

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

Версия
3.1.2
3.0.2