bare-events 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -289,13 +289,8 @@ exports.once = function once (emitter, name, opts = {}) {
289
289
  })
290
290
  }
291
291
 
292
- exports.forward = function forward (from, to, ...names) {
293
- let opts = names.pop()
294
-
295
- if (typeof opts === 'string') {
296
- names.push(opts)
297
- opts = {}
298
- }
292
+ exports.forward = function forward (from, to, names, opts = {}) {
293
+ if (typeof names === 'string') names = [names]
299
294
 
300
295
  const {
301
296
  emit = to.emit.bind(to)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-events",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Event emitters for JavaScript",
5
5
  "main": "index.js",
6
6
  "files": [