{"id":19009187,"url":"https://github.com/gamtiq/neva","last_synced_at":"2026-05-14T18:34:00.251Z","repository":{"id":55975636,"uuid":"88367843","full_name":"gamtiq/neva","owner":"gamtiq","description":"Simple library to work with custom events","archived":false,"fork":false,"pushed_at":"2021-02-23T17:48:35.000Z","size":850,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-22T09:44:54.763Z","etag":null,"topics":["dispatch","emitter","event","event-handler","eventbus","eventemitter","listener","pub-sub","subscription"],"latest_commit_sha":null,"homepage":"https://gamtiq.github.io/neva/","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/gamtiq.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-15T18:51:31.000Z","updated_at":"2021-02-23T17:46:13.000Z","dependencies_parsed_at":"2022-08-15T10:40:29.433Z","dependency_job_id":null,"html_url":"https://github.com/gamtiq/neva","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gamtiq/neva","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fneva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fneva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fneva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fneva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamtiq","download_url":"https://codeload.github.com/gamtiq/neva/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamtiq%2Fneva/sbom","scorecard":{"id":418044,"data":{"date":"2025-08-11","repo":{"name":"github.com/gamtiq/neva","commit":"302fd38ffe2413e719501fc316c23636dcc457b1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE-MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"47 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-957j-59c2-j692","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-j383-35pm-c5h4","Warn: Project is vulnerable to: GHSA-rm36-94g8-835r","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-rjqq-98f6-6j3r","Warn: Project is vulnerable to: GHSA-mjxr-4v3x-q3m4","Warn: Project is vulnerable to: GHSA-cgfm-xwp7-2cvr","Warn: Project is vulnerable to: GHSA-rm97-x556-q36h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T00:25:54.204Z","repository_id":55975636,"created_at":"2025-08-19T00:25:54.204Z","updated_at":"2025-08-19T00:25:54.204Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33037894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dispatch","emitter","event","event-handler","eventbus","eventemitter","listener","pub-sub","subscription"],"created_at":"2024-11-08T19:07:04.198Z","updated_at":"2026-05-14T18:34:00.233Z","avatar_url":"https://github.com/gamtiq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# neva \u003ca name=\"start\"\u003e\u003c/a\u003e\n\nSimple library to work with custom events.\n\n[![NPM version](https://badge.fury.io/js/neva.png)](http://badge.fury.io/js/neva)\n[![Build Status](https://secure.travis-ci.org/gamtiq/neva.png?branch=master)](http://travis-ci.org/gamtiq/neva)\n[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)\n\n* Simple event emitter API: `on`, `off`, `emit`, `hasEventHandler`.\n* Event emitter API is chainable.\n* Events can be emitted with multiple attached parameters.\n* Data about emitted event are wrapped into an object with uniform structure that is passed to handlers.\n* Ability to add event handler that should be called just once.\n* Ability to enhance prototype of constructor function (class) with event emitter API (emitter methods can be mixed in `prototype`).\n* Available as ECMAScript 6/2015 module, CommonJS module or UMD.\n* Work in any ECMAScript 3+ environment (browsers, Node.js etc).\n* Small.\n\n## Table of contents\n\n* [Installation](#install)\n* [Usage](#usage)\n* [Examples](#examples)\n* [API](#api)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Installation \u003ca name=\"install\"\u003e\u003c/a\u003e [\u0026#x2191;](#start)\n\n### Node\n\n    npm install neva\n\n### [Bower](https://bower.io)\n\n    bower install neva\n\n### AMD, \u0026lt;script\u0026gt;\n\nUse `dist/neva.js` or `dist/neva.min.js` (minified version).\n\n## Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e [\u0026#x2191;](#start)\n\n### ECMAScript 6+\n\n```js\nimport getEmitter from 'neva';\n```\n\n### Node\n\n```js\nconst getEmitter = require('neva').getEmitter;\n```\n\n### AMD\n\n```js\ndefine(['path/to/dist/neva.js'], function(neva) {\n    const getEmitter = neva.getEmitter;\n});\n```\n\n### Bower, \u0026lt;script\u0026gt;\n\n```html\n\u003c!-- Use bower_components/neva/dist/neva.js if the library was installed by Bower --\u003e\n\u003cscript type=\"text/javascript\" src=\"path/to/dist/neva.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    // neva is available via neva field of window object\n    const getEmitter = neva.getEmitter;\n\u003c/script\u003e\n```\n\n### Examples \u003ca name=\"examples\"\u003e\u003c/a\u003e [\u0026#x2191;](#start)\n\n```js\nconst emitter = getEmitter();\nconst eventHandler = (event) =\u003e {\n    console.log('eventHandler: event type -', event.type, ', data -', event.data);\n};\nconst obj = {\n    name: 'obj',\n    handler(event) {\n        console.log(`${this.name}.handler: event type -`, event.type, ', params -', event.params);\n    }\n};\nfunction onceHandler(event) {\n    console.log('onceHandler: event type -', event.type, ', data -', event.data);\n}\n\nemitter.on(['event1', 'event2'], eventHandler)\n        .on('event1', obj.handler, obj)\n        .on('event2', onceHandler, null, {once: true});\n\nemitter.emit('event1', 1, 2, 3)\n        .emit({type: 'event2', data: 'some data', qty: 8});\n// The following will be printed into console:\n// eventHandler: event type - event1 , data - 1\n// obj.handler: event type - event1 , params - Array [ 1, 2, 3 ]\n// eventHandler: event type - event2 , data - some data\n// onceHandler: event type - event2 , data - some data\n\nemitter.hasEventHandler('event1', eventHandler); // true\nemitter.hasEventHandler('event2', onceHandler); // false\n\nemitter.off('event1', eventHandler);\nemitter.hasEventHandler('event1', eventHandler); // false\nemitter.hasEventHandler('event1'); // true\n\nemitter.off('event1');\nemitter.hasEventHandler('event1'); // false\nemitter.hasEventHandler(); // true\n\nemitter.off();\nemitter.hasEventHandler(); // false\n\nclass SomeClass {\n    ...\n}\n// Add event emitter methods to class\ngetEmitter(SomeClass.prototype);\n```\n\n## API \u003ca name=\"api\"\u003e\u003c/a\u003e [\u0026#x2191;](#start)\n\n### getEmitter([target: Object]): EventEmitter\n\nCreate event emitter or add methods to work with events into specified object.\n\n`target` can be prototype of some constructor function (class).\n\n### EventEmitter API\n\n#### on(type: string | string[], handler: Function, [context: Object], [settings: HandlerSettings]): EventEmitter\n\nRegister a handler for the specified event type(s).\n\n#### off(type: string, handler: Function, [context: Object]): EventEmitter\n\nRemove the specified event handler.\n\n#### off(type: string): EventEmitter\n\nRemove all handlers for the given event type.\n\n#### off(): EventEmitter\n\nRemove all registered event handlers.\n\n#### emit(type: string, [param1: any, param2: any, ...]): EventEmitter\n\nCall all handlers for the specified event type.\n\nAn object with the following fields will be passed in each handler:\n* `type: string` - the event type (value of `type` parameter).\n* `params: Array` - list of additional parameters that are passed besides the event type (`[param1, param2, ...]`).\n* `data: any` - value of the second function's parameter (value of `params[0]`).\n\n#### emit({type: string, ...}): EventEmitter\n\nCall all handlers for the specified event type and pass the given object in each handler.\n\n#### hasEventHandler(type: string, handler: Function, [context: Object]): boolean\n\nCheck whether the specified event handler is registered.\n\n#### hasEventHandler(type: string): boolean\n\nCheck whether any handler for the specified event type is registered.\n\n#### hasEventHandler(): boolean\n\nCheck whether any event handler is registered.\n\nSee [`docs`](https://gamtiq.github.io/neva/) for details.\n\n## Contributing \u003ca name=\"contributing\"\u003e\u003c/a\u003e [\u0026#x2191;](#start)\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\nAdd unit tests for any new or changed functionality.\nLint and test your code using [Grunt](http://gruntjs.com/).\n\n## License \u003ca name=\"license\"\u003e\u003c/a\u003e [\u0026#x2191;](#start)\nCopyright (c) 2017-2021 Denis Sikuler  \nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamtiq%2Fneva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamtiq%2Fneva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamtiq%2Fneva/lists"}