Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glob-events

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-events - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

5

CHANGES.md
# Changes
## v0.2.0
- Added 'on'
- Added 'removeAllListeners'
## v0.1.0
- Initial release

@@ -55,2 +55,6 @@ /*

removeAllListeners: function (name) {
this._store.removeAll(name);
},
listeners: function (name, opts) {

@@ -62,2 +66,4 @@ return this._store.iterator(name, opts).toArray();

Emitter.prototype.on = Emitter.prototype.addListener;
exports.Emitter = Emitter;

2

package.json
{
"name" : "glob-events",
"version" : "0.1.0",
"version" : "0.2.0",
"description" : "Event emitter with glob support on event names",

@@ -5,0 +5,0 @@ "keywords" : ["event", "emitter", "glob", "listener"],

@@ -9,2 +9,9 @@ # glob-events.js [![Build Status](https://travis-ci.org/mantoni/glob-events.js.png?branch=master)](http://travis-ci.org/mantoni/glob-events.js)

## Features
- Node.js EventEmitter compatible API
- Register listeners with glob event names (`*` and `**`)
- Emit events with glob event names (`*` and `**`)
- 100% test coverage
## Install with npm

@@ -29,9 +36,27 @@

- `emit(event[, ...])`
- `addListener(event, fn)`
- `removeListener(event, fn)`
- `listeners([event][, options])`
- `emit(event[, ...])`: Invokes all listeners registered for the given event
with the optional arguments. Matching rules are applied on the event name as
descibed in the [glob-tree match expressions][].
- `addListener(event, fn)` / `on(event, fn)`: Registers a listener for an event
- `removeListener(event, fn)`: Unregisteres a listener for an event
- `removeAllListeners([event])`: Unregisters all listeners, or all listeners
for the given event. Matching rules are not applied.
- `listeners([event][, options])`: Returns all listeners, or all listeners
for the given event. Matching rules are applied on the event name as
described in the [glob-tree match expressions][]. The options are passed on
to the [glob-tree iterarator][].
## TODO
- once(event, fn)
- setMaxListeners(n)
- listenerCount()
- emit newListener events
- emit removeListener events
## License
MIT
[glob-tree match expressions]: https://github.com/mantoni/glob-tree.js#match-expressions
[glob-tree iterator]: https://github.com/mantoni/glob-tree.js#node-api
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc