Comparing version 0.1.5 to 0.2.0
@@ -104,4 +104,4 @@ 'use strict'; | ||
}, { | ||
key: 'off', | ||
value: function off() { | ||
key: 'once', | ||
value: function once() { | ||
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
@@ -111,2 +111,23 @@ args[_key2] = arguments[_key2]; | ||
var arg = args[0]; | ||
if ((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object' && arg.constructor === Object) { | ||
for (var key in arg) { | ||
if (arg.hasOwnProperty(key)) { | ||
this.emitter.once(key, arg[key]); | ||
} | ||
} | ||
} else { | ||
this.emitter.once.apply(this.emitter, args); | ||
} | ||
return this; | ||
} | ||
}, { | ||
key: 'off', | ||
value: function off() { | ||
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
if (args.length === 0) { | ||
@@ -150,3 +171,3 @@ this.emitter.removeAllListeners(); | ||
_this.status.stop(); | ||
_this.emitter.emit('ended'); | ||
_this.emitter.emit('done'); | ||
return; | ||
@@ -153,0 +174,0 @@ } |
{ | ||
"name": "stepperjs", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "A tiny requestAnimationFrame wrapper to improve usability.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -84,3 +84,3 @@ # StepperJS | ||
```html | ||
<script type="text/javascript" src="stepperjs.browser-0.1.5.min.js"></script> | ||
<script type="text/javascript" src="stepperjs.browser-0.2.0.min.js"></script> | ||
``` | ||
@@ -87,0 +87,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
147320
41
1947