{"id":13536121,"url":"https://github.com/gocanto/vuemit","last_synced_at":"2025-04-07T13:08:28.660Z","repository":{"id":48000108,"uuid":"80557791","full_name":"gocanto/vuemit","owner":"gocanto","description":"The smallest Vue.js events handler.","archived":false,"fork":false,"pushed_at":"2023-04-18T04:21:32.000Z","size":621,"stargazers_count":143,"open_issues_count":6,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-18T20:46:53.214Z","etag":null,"topics":["events","javascript","vuejs"],"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/gocanto.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-01-31T20:12:35.000Z","updated_at":"2024-09-16T09:17:10.000Z","dependencies_parsed_at":"2024-01-18T04:08:05.391Z","dependency_job_id":"8d59dff4-4374-446b-82d3-0655c7e09dbb","html_url":"https://github.com/gocanto/vuemit","commit_stats":{"total_commits":48,"total_committers":7,"mean_commits":6.857142857142857,"dds":0.6041666666666667,"last_synced_commit":"94667e195216383e6d517d3eb9f1502f6d0b7860"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fvuemit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fvuemit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fvuemit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocanto%2Fvuemit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocanto","download_url":"https://codeload.github.com/gocanto/vuemit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":["events","javascript","vuejs"],"created_at":"2024-08-01T09:00:34.990Z","updated_at":"2025-04-07T13:08:28.641Z","avatar_url":"https://github.com/gocanto.png","language":"JavaScript","readme":"# Vuemit\n\n\u003ca href=\"https://github.com/gocanto/google-autocomplete/blob/master/src/js/Components/googleAutocomplete.vue#L70\"\u003e\u003cimg src=\"https://img.shields.io/badge/online-demo-green.svg\" alt=\"Demo\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/vuemit\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/vuemit.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/vuemit\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/vuemit.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/gocanto/vuemit/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/easiest-js-validator.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\nVuemit is a tiny library to work with events on Vue.js. Its aim is to keeping simple the fact of sharing information between any number of components.\n\n# Installation\n\n```js\nnpm install vuemit --save\n```\n\n# Gettings started\n\nRequire the library within your entry point or your bootstrap file.\n\n```js\nwindow.Vuemit = require('vuemit');\n```\n\nNow you will have a global ***Vuemit*** variable which you can use anywhere in your app.\n\n# Usage\n\n- all the methods take the same props as the [Original Events](https://vuejs.org/v2/api/#Instance-Methods-Events), except for the events-names which can be an array.\n\n|     Vue      |            Vuemit            |                                    Description                                    |\n|--------------|------------------------------|-----------------------------------------------------------------------------------|\n| this.$emit() | Vuemit.fire()                | ***Fire an event/s :*** takes 2 arguments ('event-name', (optional) data object)  |\n| this.$on()   | Vuemit.listen()              | ***Listen for an event/s :*** takes 2 arguments ('event-name', callback)          |\n| this.$once() | Vuemit.listenOnce()          | ***Listen once to an event/s :*** takes 2 arguments ('event-name', callback)      |\n| this.$off()  | Vuemit.remove()              | ***Remove listeners for an event/s:*** takes 2 arguments ('event-name', callback) |\n| this.$off()  | Vuemit.removeListenersFrom() | ***Remove listeners from an event/s:*** takes 1 arguments ('event-name')          |\n| this.$off()  | Vuemit.removeAll()           | ***Remove all event listeners:*** takes no arguments                              |\n\n- Vue started to support events array from **v2.2.0+** except `$emit` \u0026 `$once` but with Vuemit you can use events-names as an array with all the methods except `removeAll()` which takes no arguments.\n\n```js\n// fire multiple events with a shared payload\nVuemit.fire(['event1','event2'], {some: data})\n\n// listen once to multiple events with a shared callback\nVuemit.listenOnce(['other-event1', 'other-event2'], ()=\u003e{\n    // do something ex.\"refresh localStorage\"\n})\n```\n\n# Contributing\n\nPlease feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.\n\n# License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n# How can I thank you?\nWhy not star the github repo? Why not share the link for this repository on Twitter? Spread the word!\n\nDon't forget to [follow me on twitter](https://twitter.com/gocanto)!\n\nThanks!\n\nGustavo Ocanto.\ngustavoocanto@gmail.com\n\n","funding_links":[],"categories":["实用库","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","JavaScript"],"sub_categories":["Libraries \u0026 Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocanto%2Fvuemit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocanto%2Fvuemit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocanto%2Fvuemit/lists"}