@berlysia/remote-switch
Advanced tools
Comparing version 0.0.2 to 0.0.4
@@ -6,3 +6,2 @@ "use strict"; | ||
}); | ||
var _bind = Function.prototype.bind; | ||
@@ -19,8 +18,9 @@ var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
this._resolve; | ||
this._reject; | ||
this.current = new Promise(function (resolve, reject) { | ||
_this._resolve = resolve; | ||
_this._reject = reject; | ||
this.resolve; | ||
this.reject; | ||
this.promise = new Promise(function (resolve, reject) { | ||
_this.resolve = resolve; | ||
_this.reject = reject; | ||
}); | ||
this.current = this.promise; | ||
} | ||
@@ -45,28 +45,5 @@ | ||
}, { | ||
key: "resolve", | ||
value: function resolve() { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
this._resolve.apply(this, args); | ||
return this; | ||
} | ||
}, { | ||
key: "fire", | ||
value: function fire() { | ||
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
} | ||
return this.resolve.apply(this, args); | ||
} | ||
}, { | ||
key: "reject", | ||
value: function reject() { | ||
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
this._reject.apply(this, args); | ||
value: function fire(arg) { | ||
this.resolve(arg); | ||
return this; | ||
@@ -76,17 +53,9 @@ } | ||
key: "resolve", | ||
value: function resolve() { | ||
for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { | ||
args[_key4] = arguments[_key4]; | ||
} | ||
return new (_bind.apply(RemoteSwitch.resolve, [null].concat(args)))(); | ||
value: function resolve(arg) { | ||
return new RemoteSwitch.resolve(arg); | ||
} | ||
}, { | ||
key: "reject", | ||
value: function reject() { | ||
for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { | ||
args[_key5] = arguments[_key5]; | ||
} | ||
return new (_bind.apply(RemoteSwitch.reject, [null].concat(args)))(); | ||
value: function reject(arg) { | ||
return new RemoteSwitch.reject(arg); | ||
} | ||
@@ -93,0 +62,0 @@ }]); |
{ | ||
"name": "@berlysia/remote-switch", | ||
"version": "0.0.2", | ||
"version": "0.0.4", | ||
"main": "main.js", | ||
@@ -5,0 +5,0 @@ "author": "berlysia", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
6
1
66
5067
90