{"id":15019537,"url":"https://github.com/vitorluizc/vue-uuid","last_synced_at":"2025-04-09T22:13:09.432Z","repository":{"id":26365895,"uuid":"108312713","full_name":"VitorLuizC/vue-uuid","owner":"VitorLuizC","description":"Add UUID to Vue instance.","archived":false,"fork":false,"pushed_at":"2023-03-07T07:21:28.000Z","size":1045,"stargazers_count":75,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T22:13:03.632Z","etag":null,"topics":["javascript","uuid","vue","vue-plugin","vue-uuid"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VitorLuizC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-25T18:56:44.000Z","updated_at":"2024-11-29T13:10:37.000Z","dependencies_parsed_at":"2024-01-08T08:58:16.374Z","dependency_job_id":null,"html_url":"https://github.com/VitorLuizC/vue-uuid","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":"0.024390243902439046","last_synced_commit":"6a241a12b8bcca578fec8d2317dadceaba71e7ee"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fvue-uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fvue-uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fvue-uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitorLuizC%2Fvue-uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitorLuizC","download_url":"https://codeload.github.com/VitorLuizC/vue-uuid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119292,"owners_count":21050755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","uuid","vue","vue-plugin","vue-uuid"],"created_at":"2024-09-24T19:53:39.865Z","updated_at":"2025-04-09T22:13:09.397Z","avatar_url":"https://github.com/VitorLuizC.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue UUID\n\nAdd UUID to Vue instance.\n\n[![Build Status](https://travis-ci.org/VitorLuizC/vue-uuid.svg?branch=master)](https://travis-ci.org/VitorLuizC/vue-uuid)\n\n## Install\n\nInstallation is very easy, you just need to install using NPM or Yarn.\n\n```sh\nnpm i vue-uuid\n```\n\nVue's `use` method will do the trick adding to Vue.\n\n```js\nimport { createApp } from \"vue\";\nimport withUUID from \"vue-uuid\";\n\nconst app = withUUID(\n  createApp({\n    // ...\n  }),\n);\n```\n\n## Usage\n\nAfter installation `$uuid` is available on instance, so you can use inside\ncomponents **template** and script, like the example below.\n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv class=\"uuid-panel\"\u003e\n    \u003ch3 class=\"uuid\"\u003e{{ uuid }}\u003c/h3\u003e\n    \u003cbutton\n      class=\"button\"\n      @click=\"uuid = $uuid.v1()\"\n    \u003eGenerate V1\u003c/button\u003e\n    \u003cbutton\n      class=\"button\"\n      @click=\"uuid = $uuid.v3()\"\n    \u003eGenerate V3\u003c/button\u003e\n    \u003cbutton\n      class=\"button\"\n      @click=\"uuid = $uuid.v4()\"\n    \u003eGenerate V4\u003c/button\u003e\n    \u003cbutton\n      class=\"button\"\n      @click=\"uuid = $uuid.v5(\"Name 1\", NAMESPACE)\"\n    \u003eGenerate V5\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  import { uuid } from 'vue-uuid'; // uuid object is also exported to things\n                                   // outside Vue instance.\n\n  const NAMESPACE = \"65f9af5d-f23f-4065-ac85-da725569fdcd\";\n\n  export default {\n    data () {\n      return {\n        NAMESPACE,\n        uuid: uuid.v1(),\n        v1: this.$uuid.v1(),\n        v3: this.$uuid.v3(),\n        v4: this.$uuid.v4(),\n        v5: this.$uuid.v5(\"Name 2\", NAMESPACE)\n      };\n    }\n  };\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorluizc%2Fvue-uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitorluizc%2Fvue-uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorluizc%2Fvue-uuid/lists"}