How to use the uuidv4.uuid function in uuidv4

To help you get started, we’ve selected a few uuidv4 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zilpay / zil-pay / tests / unit / lib / stream / message / tabs-message.spec.js View on Github external
it('test init class TabsMessage', () => {
    const msg = {
      type: uuid(),
      payload: {
        random: uuid()
      }
    }
    const message = new TabsMessage(msg)

    expect(message).toBeTruthy()
    expect(message.send).toBeTruthy()
    expect(message.type).toEqual(msg.type)
    expect(message.payload).toEqual(msg.payload)
  })
github zilpay / zil-pay / tests / unit / lib / stream / message / secure-message.spec.js View on Github external
it('test init class SecureMessage', () => {
    const msg = {
      type: uuid(),
      payload: {
        random: uuid()
      }
    }
    const message = new SecureMessage(msg)

    expect(message).toBeTruthy()
    expect(message.send).toBeTruthy()
    expect(message.type).toEqual(msg.type)
    expect(message.payload).toEqual(msg.payload)
  })
github zilpay / zil-pay / tests / unit / components / input.spec.js View on Github external
* Modified By: the developer formerly known as Rinat(lich666dead) at 
 * -----
 * Copyright (c) 2019 ZilPay
 */
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Input, { INPUT_TYPES } from 'src/components/Input.vue'
import { uuid } from 'uuidv4'
import {
  BEM_CONFIG,
  SIZE_VARIANS
} from 'src/config'

const localVue = createLocalVue()
const TEST_TITLE = uuid()
const TEST_ERROR = uuid()
const TEST_VALUE = uuid()
const TEST_PLACEHOLDER = uuid()

localVue.use(vueBemCn, { delimiters: BEM_CONFIG })

describe('components:Input', () => {
  const wrapper = shallowMount(Input, {
    localVue,
    propsData: {
      size: SIZE_VARIANS.md,
      disabled: false,
      round: true,
      block: true,
      type: INPUT_TYPES.number,
      min: 10,
      max: 20,
github zilpay / zil-pay / tests / unit / components / input.spec.js View on Github external
* -----
 * Copyright (c) 2019 ZilPay
 */
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Input, { INPUT_TYPES } from 'src/components/Input.vue'
import { uuid } from 'uuidv4'
import {
  BEM_CONFIG,
  SIZE_VARIANS
} from 'src/config'

const localVue = createLocalVue()
const TEST_TITLE = uuid()
const TEST_ERROR = uuid()
const TEST_VALUE = uuid()
const TEST_PLACEHOLDER = uuid()

localVue.use(vueBemCn, { delimiters: BEM_CONFIG })

describe('components:Input', () => {
  const wrapper = shallowMount(Input, {
    localVue,
    propsData: {
      size: SIZE_VARIANS.md,
      disabled: false,
      round: true,
      block: true,
      type: INPUT_TYPES.number,
      min: 10,
      max: 20,
      step: 1,
github zilpay / zil-pay / tests / unit / components / input.spec.js View on Github external
* -----
 * Modified By: the developer formerly known as Rinat(lich666dead) at 
 * -----
 * Copyright (c) 2019 ZilPay
 */
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Input, { INPUT_TYPES } from 'src/components/Input.vue'
import { uuid } from 'uuidv4'
import {
  BEM_CONFIG,
  SIZE_VARIANS
} from 'src/config'

const localVue = createLocalVue()
const TEST_TITLE = uuid()
const TEST_ERROR = uuid()
const TEST_VALUE = uuid()
const TEST_PLACEHOLDER = uuid()

localVue.use(vueBemCn, { delimiters: BEM_CONFIG })

describe('components:Input', () => {
  const wrapper = shallowMount(Input, {
    localVue,
    propsData: {
      size: SIZE_VARIANS.md,
      disabled: false,
      round: true,
      block: true,
      type: INPUT_TYPES.number,
      min: 10,
github zilpay / zil-pay / tests / unit / components / button.spec.js View on Github external
* -----
 * Modified By: the developer formerly known as Rinat(lich666dead) at 
 * -----
 * Copyright (c) 2019 ZilPay
 */
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Button from 'src/components/Button.vue'
import {
  BEM_CONFIG,
  SIZE_VARIANS,
  COLOR_VARIANTS
} from 'src/config'
import { uuid } from 'uuidv4'

const TEST_TEXT = uuid()
const localVue = createLocalVue()

localVue.use(vueBemCn, { delimiters: BEM_CONFIG })

describe('components:Button', () => {
  const wrapper = shallowMount(Button, {
    localVue,
    propsData: {
      size: SIZE_VARIANS.md,
      color: COLOR_VARIANTS.info,
      disabled: false,
      round: true,
      block: true
    },
    slots: {
      default: [TEST_TEXT]
github zilpay / zil-pay / tests / unit / components / bottom-bar.spec.js View on Github external
COLOR_VARIANTS,
  SIZE_VARIANS,
  BEM_CONFIG
} from 'src/config'

const localVue = createLocalVue()

const TEST = [
  {
    value: 'Send',
    event: 'send',
    icon: ICON_VARIANTS.add,
    iconType: ICON_TYPE.svg,
    variant: COLOR_VARIANTS.primary,
    size: SIZE_VARIANS.sm,
    uuid: uuid()
  },
  {
    value: 'Receive',
    event: 'receive',
    icon: ICON_VARIANTS.add,
    iconType: ICON_TYPE.svg,
    variant: COLOR_VARIANTS.primary,
    size: SIZE_VARIANS.sm,
    uuid: uuid()
  }
]

localVue.use(vueBemCn, { delimiters: BEM_CONFIG })

describe('components:BottomBar', () => {
  const wrapper = shallowMount(BottomBar, {
github lindb / lindb / web / src / config / monitoring / System.ts View on Github external
function metric(title: string, ql: string, span: number = 24, unit: UnitEnum = UnitEnum.None, chartType: string = "line"): Metric {
  return {
    span,
    id: uuid(),
    chart: { unit, title, target: { ql, db: '_internal' }, type: chartType },
  }
}
github lindb / lindb / web / src / config / monitoring / Runtime.ts View on Github external
function metric(title: string, ql: string, span: number = 24, unit: UnitEnum = UnitEnum.None): Metric {
  return {
    span,
    id: uuid(),
    chart: { unit, title, target: { ql, db: '_internal' } },
  }
}
github zilpay / zil-pay / src / pages / Receive.vue View on Github external
icon: {
      name: ICON_VARIANTS.zilliqaLogo,
      width: '38',
      height: '51'
    },
    title: 'Transfer ZIL.',
    text: 'The easiest way to get ZIL is to simply transfer it from another address.',
    button: 'SHOW ADDRESS',
    uuid: uuid()
  },
  {
    icon: false,
    title: 'Buy ZIL on CoinSwitch.',
    text: 'CoinSwitch is the one-stop destination to exchange more than 300 cryptocurrencies at the best rate.',
    button: 'BUY ZIL',
    uuid: uuid()
  }
]

export default {
  name: 'Receive',
  components: {
    TopBar,
    Alert,
    Title,
    P,
    Icon,
    Button,
    Container,
    Separator
  },
  data() {

uuidv4

uuidv4 creates v4 UUIDs.

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis