rename helper functions to be more reflective of what they do
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var _slice = Array.prototype.slice;
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -26,7 +26,7 @@ var Test = function Test() {
|
||||
Foo.prototype.test.call.apply(Foo.prototype, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
_inherits(Test, Foo);
|
||||
|
||||
Test.prototype.test = function () {
|
||||
Foo.prototype.test.call(this);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -17,4 +17,4 @@ var Test = function Test() {
|
||||
Foo.prototype.test.whatever;
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
_inherits(Test, Foo);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -17,7 +17,7 @@ var Test = function Test() {
|
||||
Foo.prototype.test.call(this);
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
_inherits(Test, Foo);
|
||||
|
||||
Test.test = function () {
|
||||
return Foo.wow.call(this);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -20,4 +20,4 @@ var Foo = function Foo() {
|
||||
this.state = "test";
|
||||
};
|
||||
|
||||
_extends(Foo, Bar);
|
||||
_inherits(Foo, Bar);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
_prototypeProperties(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
_prototypeProperties(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
_prototypeProperties(Test, null, {
|
||||
test: {
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
@@ -9,7 +9,7 @@ var A = function A() {};
|
||||
|
||||
A.a = function () {};
|
||||
|
||||
_classProps(A, {
|
||||
_prototypeProperties(A, {
|
||||
b: {
|
||||
get: function () {},
|
||||
set: function (b) {},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -18,7 +18,7 @@ var BaseController = function BaseController() {
|
||||
}
|
||||
};
|
||||
|
||||
_extends(BaseController, Chaplin.Controller);
|
||||
_inherits(BaseController, Chaplin.Controller);
|
||||
|
||||
var BaseController2 = function BaseController2() {
|
||||
if (Chaplin.Controller.Another) {
|
||||
@@ -26,4 +26,4 @@ var BaseController2 = function BaseController2() {
|
||||
}
|
||||
};
|
||||
|
||||
_extends(BaseController2, Chaplin.Controller.Another);
|
||||
_inherits(BaseController2, Chaplin.Controller.Another);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -20,4 +20,4 @@ var Q = function Q() {
|
||||
}
|
||||
};
|
||||
|
||||
_extends(Q, _QSuper);
|
||||
_inherits(Q, _QSuper);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
var _inherits = function (child, parent) {
|
||||
child.prototype = Object.create(parent && parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
@@ -18,4 +18,4 @@ var Test = function Test() {
|
||||
}
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
_inherits(Test, Foo);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var _objectSpread = function (obj, keys) {
|
||||
var _objectWithoutProperties = function (obj, keys) {
|
||||
var target = {};
|
||||
for (var i in obj) {
|
||||
if (keys.indexOf(i) >= 0) continue;
|
||||
@@ -11,12 +11,12 @@ var _objectSpread = function (obj, keys) {
|
||||
return target;
|
||||
};
|
||||
|
||||
var x = _objectSpread(z, []);
|
||||
var x = _objectWithoutProperties(z, []);
|
||||
|
||||
var x = z.x;
|
||||
var y = _objectSpread(z, ["x"]);
|
||||
var y = _objectWithoutProperties(z, ["x"]);
|
||||
|
||||
(function (_ref) {
|
||||
var x = _ref.x;
|
||||
var y = _objectSpread(_ref, ["x"]);
|
||||
var y = _objectWithoutProperties(_ref, ["x"]);
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Foo = function Foo() {};
|
||||
|
||||
_classProps(Foo, null, (function (_ref) {
|
||||
_prototypeProperties(Foo, null, (function (_ref) {
|
||||
_ref[bar] = {
|
||||
get: function () {
|
||||
if (this._memoDone) return this._memo;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
var _prototypeProperties = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
_prototypeProperties(Test, null, {
|
||||
bar: {
|
||||
get: function () {
|
||||
throw new Error("wow");
|
||||
|
||||
Reference in New Issue
Block a user