Comparing version 0.2.0 to 0.2.1
@@ -59,3 +59,3 @@ ;(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){ | ||
},{"../hark.js":2,"attachmediastream":4,"bows":5,"getusermedia":3}],3:[function(require,module,exports){ | ||
},{"../hark.js":2,"attachmediastream":5,"bows":3,"getusermedia":4}],4:[function(require,module,exports){ | ||
// getUserMedia helper by @HenrikJoreteg | ||
@@ -95,3 +95,3 @@ var func = (navigator.getUserMedia || | ||
},{}],4:[function(require,module,exports){ | ||
},{}],5:[function(require,module,exports){ | ||
module.exports = function (element, stream, play) { | ||
@@ -265,3 +265,3 @@ var autoPlay = (play === false) ? false : true; | ||
var hasGroup = (arguments.length === 3), | ||
group = hasGroup ? arguments[1] : undefined, | ||
group = hasGroup ? arguments[1] : undefined, | ||
func = hasGroup ? arguments[2] : arguments[1]; | ||
@@ -278,3 +278,3 @@ func._groupName = group; | ||
hasGroup = (arguments.length === 3), | ||
group = hasGroup ? arguments[1] : undefined, | ||
group = hasGroup ? arguments[1] : undefined, | ||
func = hasGroup ? arguments[2] : arguments[1]; | ||
@@ -312,3 +312,3 @@ function on() { | ||
i; | ||
if (!callbacks) return this; | ||
@@ -328,3 +328,3 @@ | ||
// Emit `event` with the given args. | ||
/// Emit `event` with the given args. | ||
// also calls any `*` handlers | ||
@@ -337,8 +337,10 @@ WildEmitter.prototype.emit = function (event) { | ||
len, | ||
item; | ||
item, | ||
listeners; | ||
if (callbacks) { | ||
for (i = 0, len = callbacks.length; i < len; ++i) { | ||
if (callbacks[i]) { | ||
callbacks[i].apply(this, args); | ||
listeners = callbacks.slice(); | ||
for (i = 0, len = listeners.length; i < len; ++i) { | ||
if (listeners[i]) { | ||
listeners[i].apply(this, args); | ||
} else { | ||
@@ -351,5 +353,7 @@ break; | ||
if (specialCallbacks) { | ||
for (i = 0, len = specialCallbacks.length; i < len; ++i) { | ||
if (specialCallbacks[i]) { | ||
specialCallbacks[i].apply(this, [event].concat(args)); | ||
len = specialCallbacks.length; | ||
listeners = specialCallbacks.slice(); | ||
for (i = 0, len = listeners.length; i < len; ++i) { | ||
if (listeners[i]) { | ||
listeners[i].apply(this, [event].concat(args)); | ||
} else { | ||
@@ -372,3 +376,3 @@ break; | ||
split = item.split('*'); | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[1].length) === split[1])) { | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) { | ||
result = result.concat(this.callbacks[item]); | ||
@@ -380,3 +384,3 @@ } | ||
},{}],5:[function(require,module,exports){ | ||
},{}],3:[function(require,module,exports){ | ||
(function(window) { | ||
@@ -383,0 +387,0 @@ var logger = require('andlog'), |
@@ -146,3 +146,3 @@ (function(e){if("function"==typeof bootstrap)bootstrap("hark",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeHark=e}else"undefined"!=typeof window?window.hark=e():global.hark=e()})(function(){var define,ses,bootstrap,module,exports; | ||
var hasGroup = (arguments.length === 3), | ||
group = hasGroup ? arguments[1] : undefined, | ||
group = hasGroup ? arguments[1] : undefined, | ||
func = hasGroup ? arguments[2] : arguments[1]; | ||
@@ -159,3 +159,3 @@ func._groupName = group; | ||
hasGroup = (arguments.length === 3), | ||
group = hasGroup ? arguments[1] : undefined, | ||
group = hasGroup ? arguments[1] : undefined, | ||
func = hasGroup ? arguments[2] : arguments[1]; | ||
@@ -193,3 +193,3 @@ function on() { | ||
i; | ||
if (!callbacks) return this; | ||
@@ -209,3 +209,3 @@ | ||
// Emit `event` with the given args. | ||
/// Emit `event` with the given args. | ||
// also calls any `*` handlers | ||
@@ -218,8 +218,10 @@ WildEmitter.prototype.emit = function (event) { | ||
len, | ||
item; | ||
item, | ||
listeners; | ||
if (callbacks) { | ||
for (i = 0, len = callbacks.length; i < len; ++i) { | ||
if (callbacks[i]) { | ||
callbacks[i].apply(this, args); | ||
listeners = callbacks.slice(); | ||
for (i = 0, len = listeners.length; i < len; ++i) { | ||
if (listeners[i]) { | ||
listeners[i].apply(this, args); | ||
} else { | ||
@@ -232,5 +234,7 @@ break; | ||
if (specialCallbacks) { | ||
for (i = 0, len = specialCallbacks.length; i < len; ++i) { | ||
if (specialCallbacks[i]) { | ||
specialCallbacks[i].apply(this, [event].concat(args)); | ||
len = specialCallbacks.length; | ||
listeners = specialCallbacks.slice(); | ||
for (i = 0, len = listeners.length; i < len; ++i) { | ||
if (listeners[i]) { | ||
listeners[i].apply(this, [event].concat(args)); | ||
} else { | ||
@@ -253,3 +257,3 @@ break; | ||
split = item.split('*'); | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[1].length) === split[1])) { | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) { | ||
result = result.concat(this.callbacks[item]); | ||
@@ -256,0 +260,0 @@ } |
{ | ||
"name": "hark", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Converts an audio stream to speech events in the browser", | ||
@@ -17,5 +17,5 @@ "main": "hark.js", | ||
"dependencies": { | ||
"wildemitter": "0.0.5" | ||
"wildemitter": "1.0.x" | ||
}, | ||
"readmeFilename": "README.md" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2063191
718
1
+ Addedwildemitter@1.0.2(transitive)
- Removedwildemitter@0.0.5(transitive)
Updatedwildemitter@1.0.x