{"_id":"@edraghiciu-vks/jquery-pubsub","_rev":"4-58b3d57f8b0c0be49fa4835a14aca685","name":"@edraghiciu-vks/jquery-pubsub","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@edraghiciu-vks/jquery-pubsub","version":"1.0.0","keywords":["jquery","pubsub","publish","subscribe","event-bus","vks"],"author":{"name":"edraghiciu-vks","email":"edraghiciu@vksapp.com"},"license":"MIT","_id":"@edraghiciu-vks/jquery-pubsub@1.0.0","maintainers":[{"name":"edraghiciu-vks","email":"edraghiciu@vksapp.com"}],"homepage":"https://github.com/cmp-ams/vks#readme","bugs":{"url":"https://github.com/cmp-ams/vks/issues"},"dist":{"shasum":"7a816990ca0ef3c4ab0d33ff773a071387e4c2a3","tarball":"https://registry.npmjs.org/@edraghiciu-vks/jquery-pubsub/-/jquery-pubsub-1.0.0.tgz","fileCount":3,"integrity":"sha512-3QMNvOvzq3U/hK/r3woQ83b7yEeWG97KYQA/Tusya41ziZbAP0SC3fchiV4w+ZHapUbg0+n5CvXc0WA7ZnFZaA==","signatures":[{"sig":"MEUCIGgXS2Va4nf++ekiwHbxDrK6SBvLudwTRtFE2j51KVqvAiEAm/DhX1vwMNVuLz2STSekrZEgs95UBvG4827o6AN+I4U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4807},"main":"index.js","gitHead":"dbd89fb7ebcb4c3526281b177fa50158b18c5a91","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"edraghiciu-vks","email":"edraghiciu@vksapp.com"},"repository":{"url":"git+https://github.com/cmp-ams/vks.git","type":"git"},"_npmVersion":"10.9.2","description":"jQuery Publish/Subscribe - A global event bus to decouple event senders from receivers - VKS package","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"peerDependencies":{"jquery":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jquery-pubsub_1.0.0_1760440234804_0.2774240521972371","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@edraghiciu-vks/jquery-pubsub","version":"1.0.2","description":"jQuery Publish/Subscribe - A global event bus to decouple event senders from receivers - VKS package","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["jquery","pubsub","publish","subscribe","event-bus","vks"],"author":{"name":"edraghiciu-vks","email":"edraghiciu@vksapp.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cmp-ams/vks.git"},"peerDependencies":{"jquery":"^3.0.0"},"_id":"@edraghiciu-vks/jquery-pubsub@1.0.2","bugs":{"url":"https://github.com/cmp-ams/vks/issues"},"homepage":"https://github.com/cmp-ams/vks#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-4/iBRD9ppT4+/p++vcTGys1/SWGYqdaaYBHKHBKrov33etzYNWW7oPOs2AQxk2Rcqe4XOw9qKJ+jXDWacqElNA==","shasum":"ffcdec69d9dbffb0f08e61f76d98583ce5115b07","tarball":"https://registry.npmjs.org/@edraghiciu-vks/jquery-pubsub/-/jquery-pubsub-1.0.2.tgz","fileCount":3,"unpackedSize":4809,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFA9tjMcEAyxCWWkEkOQ8WmJ0nDMy1XXPStufsqa7lnTAiAAmqiqry3ajSVKA1ulGEHYfXPB5C8Bxf1xrsQOVMIZRg=="}]},"_npmUser":{"name":"vks-dev","email":"edraghiciu@vksapp.com"},"directories":{},"maintainers":[{"name":"vks-dev","email":"edraghiciu@vksapp.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jquery-pubsub_1.0.2_1773918754092_0.2556650113547865"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-14T11:10:34.692Z","modified":"2026-03-19T11:12:34.357Z","1.0.0":"2025-10-14T11:10:34.989Z","1.0.2":"2026-03-19T11:12:34.234Z"},"bugs":{"url":"https://github.com/cmp-ams/vks/issues"},"author":{"name":"edraghiciu-vks","email":"edraghiciu@vksapp.com"},"license":"MIT","homepage":"https://github.com/cmp-ams/vks#readme","keywords":["jquery","pubsub","publish","subscribe","event-bus","vks"],"repository":{"type":"git","url":"git+https://github.com/cmp-ams/vks.git"},"description":"jQuery Publish/Subscribe - A global event bus to decouple event senders from receivers - VKS package","maintainers":[{"name":"vks-dev","email":"edraghiciu@vksapp.com"}],"readme":"# edraghiciu-vks-jquery-pubsub\n\njQuery Publish/Subscribe - A global event bus to decouple event senders from receivers.\n\nThis is a VKS-specific package providing a publish/subscribe pattern for jQuery.\n\n## Installation\n\n```bash\nnpm install edraghiciu-vks-jquery-pubsub\n```\n\n## Usage\n\n```javascript\nimport 'edraghiciu-vks-jquery-pubsub';\nimport $ from 'jquery';\n\n// Subscribe to an event\n$(window).subscribe('my-event', (ev, data) => {\n  console.log('Event received:', data);\n});\n\n// Publish an event\n$(window).publish('my-event', { message: 'Hello!' });\n\n// Unsubscribe from an event\n$(window).unsubscribe('my-event');\n\n// Subscribe to multiple events\n$(window).subscribe({\n  'event1': callback1,\n  'event2': callback2\n});\n\n// Unsubscribe from all events with a namespace\n$(window).unsubscribe('.namespace');\n```\n\n## API\n\n### Methods\n\n- `subscribe(event, callback)` - Register an observer for the given event\n- `subscribe(eventsObject)` - Register multiple observers at once\n- `publish(event, data)` - Broadcast an event to all registered observers\n- `unsubscribe(event)` - Remove an observer for the given event\n- `unsubscribe()` - Remove all observers\n\n### Features\n\n- Global event bus pattern\n- Namespace support for event management\n- Decouples event senders from receivers\n- Works with any jQuery object, typically used with `$(window)`\n\n## License\n\nMIT\n\n## Copyright\n\nCopyright (c) 2010-2015 Visual Knowledge Share Ltd, All rights reserved.\n","readmeFilename":"README.md"}