uuid-generator

WebJar for uuid-generator

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

org.webjars.bowergithub.advanced-rest-client
Идентификатор

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

uuid-generator
Последняя версия

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

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

uuid-generator
WebJar for uuid-generator
Ссылка на сайт

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

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

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

https://github.com/advanced-rest-client/uuid-generator

Скачать uuid-generator

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

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/uuid-generator/ -->
<dependency>
    <groupId>org.webjars.bowergithub.advanced-rest-client</groupId>
    <artifactId>uuid-generator</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/uuid-generator/
implementation 'org.webjars.bowergithub.advanced-rest-client:uuid-generator:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/uuid-generator/
implementation ("org.webjars.bowergithub.advanced-rest-client:uuid-generator:2.0.0")
'org.webjars.bowergithub.advanced-rest-client:uuid-generator:jar:2.0.0'
<dependency org="org.webjars.bowergithub.advanced-rest-client" name="uuid-generator" rev="2.0.0">
  <artifact name="uuid-generator" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.advanced-rest-client', module='uuid-generator', version='2.0.0')
)
libraryDependencies += "org.webjars.bowergithub.advanced-rest-client" % "uuid-generator" % "2.0.0"
[org.webjars.bowergithub.advanced-rest-client/uuid-generator "2.0.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)

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

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

uuid-generator

An UUID v4 generator as a plain web component and an ES module. Made for a web browser.

Published on NPM

Build Status

Published on webcomponents.org

Usage

Installation

npm install --save @advanced-rest-client/uuid-generator

As a module

  import { v4 } from '@advanced-rest-client/uuid-generator';
  console.log(v4());

In an html file (web component)

<html>
  <head>
    <script type="module">
      import '@advanced-rest-client/uuid-generator';
    </script>
  </head>
  <body>
    <uuid-generator id="uuid"></uuid-generator>
    <script>
    console.log(uuid.generate());
    </script>
  </body>
</html>

In a LitElement

import { LitElement, html } from 'lit-element';
import { v4 } from '@advanced-rest-client/uuid-generator';

class SampleElement extends LitElement {
  render() {
    return html`my component`;
  }

  _someOperation() {
    const uuid = v4();
  }
}
customElements.define('sample-element', SampleElement);

Browser or a web worker

For historic reasons the index.js file contains an export for both the v4 function but also the web component. When using this module in a web worker or in Node this would cause an error. Instead import the module with the main.js file. For compatibility this file is not set as the module in the package.json file.

import { v4 } from '@advanced-rest-client/uuid-generator/main.js';

Development

git clone https://github.com/advanced-rest-client/uuid-generator
cd uuid-generator
npm install

Running the demo locally

npm start

Running the tests

npm test
org.webjars.bowergithub.advanced-rest-client

ARC

A set of repositories related to the Advanced REST Client and API console (by Mulesoft)

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

Версия
2.0.0