Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
vue-uuid
Advanced tools
Weekly downloads
Readme
Add UUID to Vue instance.
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({
// ...
}),
);
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>
FAQs
Add UUID to Vue instance.
The npm package vue-uuid receives a total of 33,171 weekly downloads. As such, vue-uuid popularity was classified as popular.
We found that vue-uuid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.