{"id":15354951,"url":"https://github.com/capaj/weakee","last_synced_at":"2025-04-15T06:23:48.833Z","repository":{"id":66342295,"uuid":"43034936","full_name":"capaj/weakee","owner":"capaj","description":"Weakmaps powered lightweight event emitter(this one should not leak)","archived":false,"fork":false,"pushed_at":"2016-01-23T20:17:38.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-09T21:10:37.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/capaj.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}},"created_at":"2015-09-24T00:29:15.000Z","updated_at":"2018-11-20T22:05:53.000Z","dependencies_parsed_at":"2023-02-24T23:00:19.563Z","dependency_job_id":null,"html_url":"https://github.com/capaj/weakee","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"ba74534f5d6f6ea1974992c562b60d3332baacc4"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fweakee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fweakee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fweakee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fweakee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capaj","download_url":"https://codeload.github.com/capaj/weakee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280933,"owners_count":19776415,"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":[],"created_at":"2024-10-01T12:21:47.972Z","updated_at":"2025-02-27T02:30:32.953Z","avatar_url":"https://github.com/capaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# weakee\nWeakmaps powered lightweight event emitter(this one should not leak)\nWritten in ES6.\nTests have a babel hook, but in order to use this in your node.js app, you will have to use babel register hook.\nOn the frontend, JSPM handles it for you.\n## Install\n```shell\nnpm i weakee -S\n#or on the frontend\njspm i npm:weakee\n```\n\n### Usage\n```javascript\nimport Emitter from 'weakee'\nclass UserClass extends Emitter {\n  constructor() {\n\tsuper()\n  }\n}\n\nvar inst = new UserClass()\n\ninst.emit('myEvent', whatever, params)\ninst.on('myEvent', (whatever, params)=\u003e{\n  //runs until you call .off()\n})\ninst.once('myEvent', (whatever, params)=\u003e{\n  //runs once\n})\ninst.off('myEvent', handlerFunction)\t//removes the even handler\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fweakee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapaj%2Fweakee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fweakee/lists"}