All Projects → VitorLuizC → vue-uuid

VitorLuizC / vue-uuid

Licence: MIT License
Add UUID to Vue instance.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-uuid

gobarber-api-gostack11
API GoBarber / NodeJS / Express / Typescript / SOLID
Stars: ✭ 39 (-29.09%)
Mutual labels:  uuid
vue-unique-id
Component and HTML unique id generation plugin for Vue.js
Stars: ✭ 46 (-16.36%)
Mutual labels:  vue-plugin
vue-web-storage
Vue.js plugin for local storage and session storage (1.8 kb min+gz) 💾
Stars: ✭ 85 (+54.55%)
Mutual labels:  vue-plugin
graphql-type-uuid
UUID scalar type for GraphQL.js
Stars: ✭ 23 (-58.18%)
Mutual labels:  uuid
eav-bundle
A Symfony bundle for basic EAV management
Stars: ✭ 19 (-65.45%)
Mutual labels:  uuid
php-tools
Some code snippets that are often used in PHP
Stars: ✭ 25 (-54.55%)
Mutual labels:  uuid
rulid.rs
Rust Universally Unique Lexicographically Sortable Identifier
Stars: ✭ 40 (-27.27%)
Mutual labels:  uuid
ulid-creator
A Java library for generating Universally Unique Lexicographically Sortable Identifiers (ULID)
Stars: ✭ 38 (-30.91%)
Mutual labels:  uuid
Xid.Net
Ported from https://github.com/rs/xid - A fast, low allocation, zero config, thread-safe 12 byte UUID generator based on the Mongo Object Id algorithm.
Stars: ✭ 17 (-69.09%)
Mutual labels:  uuid
micell
A collection of functions for front-end development
Stars: ✭ 16 (-70.91%)
Mutual labels:  uuid
vue-methods-promise
Let Vue methods support return Promise
Stars: ✭ 35 (-36.36%)
Mutual labels:  vue-plugin
godot-uuid
Unique identifier generation v4 for Godot Engine
Stars: ✭ 96 (+74.55%)
Mutual labels:  uuid
ksuid-go
K-Sortable globally Unique ID
Stars: ✭ 15 (-72.73%)
Mutual labels:  uuid
vue-shell
Component VueJS to simulate a terminal.
Stars: ✭ 36 (-34.55%)
Mutual labels:  vue-plugin
user
A domain layer providing basic user management
Stars: ✭ 14 (-74.55%)
Mutual labels:  uuid
fuuid
Functional UUIDs for Python.
Stars: ✭ 145 (+163.64%)
Mutual labels:  uuid
v-tostini
Toast plugin for Vue.js 2.x
Stars: ✭ 12 (-78.18%)
Mutual labels:  vue-plugin
uuix
A tiny (<1KB) and fast UUID (v4) generator for Crystal
Stars: ✭ 17 (-69.09%)
Mutual labels:  uuid
secrets.clj
A library designed to generate cryptographically strong random numbers.
Stars: ✭ 64 (+16.36%)
Mutual labels:  uuid
Butterfly
分布式ID生成器框架:超高性能的发号器框架。通过引入多种新的方案,彻底解决雪花算法的时间回拨等问题,并将雪花算法原生QPS提高最少十几~二十倍
Stars: ✭ 111 (+101.82%)
Mutual labels:  uuid

Vue UUID

Add UUID to Vue instance.

Build Status

Install

Installation is very easy, you just need to install using NPM or Yarn.

npm i vue-uuid

Vue's use method will do the trick adding to Vue.

import { createApp } from "vue";
import withUUID from "vue-uuid";

const app = withUUID(
  createApp({
    // ...
  }),
);

Usage

After installation $uuid is available on instance, so you can use inside components template and script, like the example below.

<template>
  <div class="uuid-panel">
    <h3 class="uuid">{{ uuid }}</h3>
    <button
      class="button"
      @click="uuid = $uuid.v1()"
    >Generate V1</button>
    <button
      class="button"
      @click="uuid = $uuid.v3()"
    >Generate V3</button>
    <button
      class="button"
      @click="uuid = $uuid.v4()"
    >Generate V4</button>
    <button
      class="button"
      @click="uuid = $uuid.v5("Name 1", NAMESPACE)"
    >Generate V5</button>
  </div>
</template>

<script>
  import { uuid } from 'vue-uuid'; // uuid object is also exported to things
                                   // outside Vue instance.

  const NAMESPACE = "65f9af5d-f23f-4065-ac85-da725569fdcd";

  export default {
    data () {
      return {
        NAMESPACE,
        uuid: uuid.v1(),
        v1: this.$uuid.v1(),
        v3: this.$uuid.v3(),
        v4: this.$uuid.v4(),
        v5: this.$uuid.v5("Name 2", NAMESPACE)
      };
    }
  };
</script>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].