babel-plugin-aexpr-source-transformation
Advanced tools
Comparing version 2.1.1 to 2.1.2
"use strict"; | ||
/** | ||
* see http://astexplorer.net/#/h1zFzvogmm/13 for interactive development | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -4,0 +8,0 @@ value: true |
{ | ||
"name": "babel-plugin-aexpr-source-transformation", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "3rd implementation strategy of active expressions, via a babel transformation", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,10 +0,2 @@ | ||
var x; | ||
let y = 42; | ||
function z() {} | ||
({ | ||
x, | ||
y, | ||
z | ||
}); | ||
import { getMember as _getMember } from "aexpr-source-transformation-propagation"; | ||
let r = _getMember(Number, "POSITIVE_INFINITY"); |
@@ -12,5 +12,8 @@ "use strict"; | ||
{file: 'base'}, | ||
{file: 'none'}, | ||
{file: 'locals-declared'}, | ||
{file: 'nested'} | ||
{file: 'ignore'}, | ||
{file: 'nested_left_assignment'}, | ||
{file: 'all-accesses'}, | ||
{file: 'class_example'}, | ||
{file: 'class_example'}, | ||
{file: 'with_aexpr'} | ||
]; | ||
@@ -17,0 +20,0 @@ |
@@ -1,39 +0,1 @@ | ||
class Rectangle { | ||
constructor(x, y, width, height) { | ||
this["x"] = x; | ||
this["y"] = y; | ||
this["width"] = width; | ||
this["height"] = height; | ||
} | ||
area() { | ||
return this["width"] * this["height"]; | ||
} | ||
} | ||
a.b = c.d | ||
c(c, "bar") | ||
let r1 = new Rectangle(0, 0, 10, 20), | ||
r2 = new Rectangle(5, 10, 20, 30); | ||
aexpr(() => r1["area"](), locals)["onChange"](() => console["log"]('changed')); | ||
var arr = [1,2,3]; | ||
arr[2] | ||
/* | ||
// currently not supported is the following scenario | ||
var obj = { | ||
x: 42, | ||
fn: function() { | ||
return this.x | ||
} | ||
} | ||
function getter(o,p) { return o[p]; } | ||
// when we have a CallExpression as parent of the MemberExpression, the this reference is bound implicitly | ||
obj.fn() // 42 | ||
// also working fine | ||
obj["fn"]() // 42 | ||
// however, with the current implementation we loose the this reference when wrapping just the inner MemberExpression | ||
getter(obj, "fn")() // undefined | ||
*/ | ||
let r = Number.POSITIVE_INFINITY; |
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
32448
22
648