Comparing version 0.2.27 to 0.2.28
{ | ||
"name": "aether", | ||
"version": "0.2.27", | ||
"version": "0.2.28", | ||
"homepage": "https://github.com/codecombat/aether", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -42,3 +42,3 @@ (function() { | ||
module.exports.createAPIClone = createAPIClone = function(aether, value) { | ||
var className, clone, ctor, i, id, isArr, k, prop, result, v, _fn, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref3, _ref4, _ref5, _ref6, _ref7; | ||
var className, clone, ctor, i, id, isArr, k, prop, result, v, _fn, _fn1, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; | ||
if (!_.isObject(value)) { | ||
@@ -117,7 +117,7 @@ return value; | ||
} else if (value.apiProperties) { | ||
_ref4 = (_ref3 = value.apiMethods) != null ? _ref3 : []; | ||
_ref4 = (_ref3 = value.apiOwnMethods) != null ? _ref3 : []; | ||
_fn = function(prop) { | ||
var fn; | ||
fn = function() { | ||
if (!value._aetherAPIMethodsAllowed) { | ||
if (!value._aetherAPIOwnMethodsAllowed) { | ||
throw new Error("Calling " + prop + " is not allowed."); | ||
@@ -136,6 +136,28 @@ } | ||
} | ||
_ref5 = value.apiProperties; | ||
for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) { | ||
prop = _ref5[_k]; | ||
_ref6 = (_ref5 = value.apiMethods) != null ? _ref5 : []; | ||
_fn1 = function(prop) { | ||
var fn; | ||
fn = function() { | ||
return value[prop].apply(value, arguments); | ||
}; | ||
return Object.defineProperty(result, prop, { | ||
value: fn, | ||
enumerable: true | ||
}); | ||
}; | ||
for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { | ||
prop = _ref6[_k]; | ||
_fn1(prop); | ||
} | ||
_ref8 = (_ref7 = value.apiUserProperties) != null ? _ref7 : []; | ||
for (_l = 0, _len3 = _ref8.length; _l < _len3; _l++) { | ||
prop = _ref8[_l]; | ||
if (result[prop] == null) { | ||
result[prop] = createAPIClone(aether, value[prop]); | ||
} | ||
} | ||
_ref9 = value.apiProperties; | ||
for (_m = 0, _len4 = _ref9.length; _m < _len4; _m++) { | ||
prop = _ref9[_m]; | ||
if (result[prop] == null) { | ||
(function(prop) { | ||
@@ -153,9 +175,2 @@ var fn; | ||
} | ||
_ref7 = (_ref6 = value.apiUserProperties) != null ? _ref6 : []; | ||
for (_l = 0, _len3 = _ref7.length; _l < _len3; _l++) { | ||
prop = _ref7[_l]; | ||
if (result[prop] == null) { | ||
result[prop] = createAPIClone(aether, value[prop]); | ||
} | ||
} | ||
} else { | ||
@@ -162,0 +177,0 @@ for (k in value) { |
{ | ||
"name": "aether", | ||
"version": "0.2.27", | ||
"version": "0.2.28", | ||
"description": "Analyzes, instruments, and transpiles JS to help beginners.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
175077
3118