clean up and fix tests
This commit is contained in:
@@ -4,7 +4,7 @@ var test = {
|
||||
*/
|
||||
["a"]:"1",
|
||||
[/*
|
||||
* Inside bracket init
|
||||
*/
|
||||
* Inside bracket init
|
||||
*/
|
||||
"b"]:"2"
|
||||
}, ok = 42;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
var test = {
|
||||
/**
|
||||
* Before bracket init
|
||||
*/
|
||||
["a"]: "1",
|
||||
[/*
|
||||
* Inside bracket init
|
||||
*/
|
||||
"b"]: "2"
|
||||
}, ok = 42;
|
||||
/**
|
||||
* Before bracket init
|
||||
*/
|
||||
["a"]: "1",
|
||||
[/*
|
||||
* Inside bracket init
|
||||
*/
|
||||
"b"]: "2"
|
||||
}, ok = 42;
|
||||
|
||||
@@ -5,8 +5,8 @@ var test = {
|
||||
["a"]:"1",
|
||||
|
||||
[/*
|
||||
* Inside bracket init
|
||||
*/
|
||||
* Inside bracket init
|
||||
*/
|
||||
"b"]:"2",
|
||||
|
||||
["c"
|
||||
|
||||
@@ -3,17 +3,25 @@ var test = {
|
||||
* Before bracket init
|
||||
*/
|
||||
["a"]: "1",
|
||||
|
||||
[/*
|
||||
* Inside bracket init
|
||||
*/
|
||||
* Inside bracket init
|
||||
*/
|
||||
"b"]: "2",
|
||||
["c" /*
|
||||
* After bracket key
|
||||
*/]: "3",
|
||||
|
||||
["c"
|
||||
/*
|
||||
* After bracket key
|
||||
*/]: "3",
|
||||
|
||||
// Before bracket, line comment
|
||||
["d"]: "4",
|
||||
[// Inside bracket, line comment
|
||||
|
||||
[
|
||||
// Inside bracket, line comment
|
||||
"e"]: "5",
|
||||
["f" // After bracket, line comment
|
||||
]: "6"
|
||||
|
||||
["f"
|
||||
// After bracket, line comment
|
||||
]: "6"
|
||||
};
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
do {
|
||||
} // LINE
|
||||
do {} // LINE
|
||||
while (true);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
function test() {
|
||||
// Leading to EmptyStatement
|
||||
;
|
||||
// Trailing to EmptyStatement
|
||||
; // Trailing to EmptyStatement
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function test() {
|
||||
// Leading to EmptyStatement
|
||||
; // Trailing to EmptyStatement
|
||||
; // Trailing to EmptyStatement
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
!function () {
|
||||
} //
|
||||
!function () {} //
|
||||
, 42;
|
||||
!{
|
||||
get 42() {
|
||||
} //
|
||||
,
|
||||
foo: 42
|
||||
};
|
||||
(function () {
|
||||
} //
|
||||
!{ get 42() {} //
|
||||
, foo: 42 };
|
||||
(function () {} //
|
||||
);
|
||||
|
||||
@@ -2,4 +2,4 @@ if (cond)
|
||||
// Leading to if-block
|
||||
{
|
||||
print("hello");
|
||||
} // Trailing to if-block
|
||||
} // Trailing to if-block
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
if (cond)
|
||||
// Leading to EmptyStatement
|
||||
; // Trailing to EmptyStatement
|
||||
; // Trailing to EmptyStatement
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
(function () {
|
||||
return; // comment
|
||||
}());
|
||||
return; // comment
|
||||
})();
|
||||
|
||||
@@ -19,25 +19,27 @@
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
function test() {
|
||||
} // Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
function test() {}
|
||||
|
||||
// Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
function test() { }
|
||||
function test() {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
|
||||
@@ -21,27 +21,29 @@
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
function test() {
|
||||
} /*
|
||||
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
function test() {}
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
/*
|
||||
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
// Leading
|
||||
var i = 20; // Trailing
|
||||
var i = 20;
|
||||
// Trailing
|
||||
|
||||
@@ -2,17 +2,21 @@ function test() {
|
||||
/*
|
||||
* Leading comment
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Leading comment 2
|
||||
*
|
||||
*/
|
||||
var i = 20; /*
|
||||
* Trailing comment
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* Trailing comment 2
|
||||
*
|
||||
*/
|
||||
|
||||
var i = 20;
|
||||
/*
|
||||
* Trailing comment
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Trailing comment 2
|
||||
*
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
; // Trailing
|
||||
; // Trailing
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
try {
|
||||
} //
|
||||
finally {
|
||||
}
|
||||
try {
|
||||
} catch (e) {
|
||||
} //
|
||||
finally {
|
||||
}
|
||||
try {} //
|
||||
finally {}
|
||||
|
||||
try {} catch (e) {} //
|
||||
finally {}
|
||||
|
||||
{
|
||||
try {
|
||||
} catch (e) {
|
||||
} //
|
||||
finally {
|
||||
}
|
||||
try {} catch (e) {} //
|
||||
finally {}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
function test() {
|
||||
var
|
||||
// Leading to VariableDeclarator
|
||||
// Leading to VariableDeclarator
|
||||
i = 20,
|
||||
// Leading to VariableDeclarator
|
||||
// Leading to VariableDeclarator
|
||||
j = 20;
|
||||
// Leading to VariableDeclarator
|
||||
// Leading to VariableDeclarator
|
||||
i = 20,
|
||||
// Leading to VariableDeclarator
|
||||
// Leading to VariableDeclarator
|
||||
j = 20;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
function test() {
|
||||
var
|
||||
/*
|
||||
* Leading to VariableDeclarator
|
||||
* Leading to VariableDeclarator
|
||||
*/
|
||||
i = 20,
|
||||
/*
|
||||
* Leading to VariableDeclarator
|
||||
* Leading to VariableDeclarator
|
||||
*/
|
||||
j = 20;
|
||||
/*
|
||||
* Leading to VariableDeclarator
|
||||
* Leading to VariableDeclarator
|
||||
*/
|
||||
i = 20,
|
||||
/*
|
||||
* Leading to VariableDeclarator
|
||||
* Leading to VariableDeclarator
|
||||
*/
|
||||
j = 20;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
var t = 20; /*
|
||||
* This is trailing comment
|
||||
*/
|
||||
* This is trailing comment
|
||||
*/
|
||||
}
|
||||
|
||||
{
|
||||
var tt = 20; /*
|
||||
* This is trailing comment
|
||||
*/
|
||||
* This is trailing comment
|
||||
*/
|
||||
}
|
||||
{{
|
||||
var t = 20; /*
|
||||
* This is trailing comment
|
||||
*/
|
||||
* This is trailing comment
|
||||
*/
|
||||
}}
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
{
|
||||
var t = 20;
|
||||
/*
|
||||
* This is trailing comment
|
||||
*/
|
||||
var t = 20; /*
|
||||
* This is trailing comment
|
||||
*/
|
||||
}
|
||||
|
||||
{
|
||||
var tt = 20;
|
||||
/*
|
||||
* This is trailing comment
|
||||
*/
|
||||
var tt = 20; /*
|
||||
* This is trailing comment
|
||||
*/
|
||||
}
|
||||
{
|
||||
{
|
||||
var t = 20;
|
||||
/*
|
||||
* This is trailing comment
|
||||
*/
|
||||
var t = 20; /*
|
||||
* This is trailing comment
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
for (var i = (1 in []) in []);
|
||||
for (var i = 1 in [] in []);
|
||||
for (var i = 1 in ([] in []));
|
||||
for (var i = (10 * 10 in []) in []);
|
||||
for (var i = (10 + 10 in []) in []);
|
||||
for (var i = 10 + (10 in []) in []);
|
||||
for (var i = 10 + 10 in [] in []);
|
||||
for (var i = 10 + 10 in ([] in []));
|
||||
for (var i = (1 in []);;);
|
||||
for ((1 in []);;);
|
||||
for (1 * (1 in []);;);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
new (a()).b();
|
||||
new (a().b)();
|
||||
new a().b();
|
||||
new (a()).b();
|
||||
new (a().b)();
|
||||
new (a())();
|
||||
new new a(a)();
|
||||
new new a()(a);
|
||||
new a().test;
|
||||
new a().test;
|
||||
new (a()).test();
|
||||
new (a().test)();
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
dejavu.Class.declare({ method2: function () {} });
|
||||
dejavu.Class.declare({
|
||||
method2: function () {}
|
||||
});
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
var i = 1 * (2 + 0 in []);
|
||||
for (var i = 1 * (2 + 0 in []) in []);
|
||||
@@ -1,2 +0,0 @@
|
||||
var i = 1 * (2 + 0 in []);
|
||||
for (var i = 1 * (2 + 0 in []) in []);
|
||||
@@ -1 +0,0 @@
|
||||
var i = 0 in ["test"];
|
||||
@@ -1 +0,0 @@
|
||||
var i = 0 in ["test"];
|
||||
@@ -3,25 +3,37 @@ class Derived extends Super {}
|
||||
class Derived2 extends Super() {}
|
||||
class StaticMethods {
|
||||
static n1() {}
|
||||
|
||||
static get get1() {}
|
||||
|
||||
static set set1(value) {}
|
||||
|
||||
static *gen1() {}
|
||||
}
|
||||
class Methods {
|
||||
n2() {}
|
||||
|
||||
get get2() {}
|
||||
|
||||
set set2(value) {}
|
||||
|
||||
*gen1() {}
|
||||
}
|
||||
class ComputedStaticMethods {
|
||||
static [n1]() {}
|
||||
|
||||
static get [get1]() {}
|
||||
|
||||
static set [set1](value) {}
|
||||
|
||||
static *[gen1]() {}
|
||||
}
|
||||
class ComputedMethods {
|
||||
[n2]() {}
|
||||
|
||||
get [get2]() {}
|
||||
|
||||
set [set2](value) {}
|
||||
|
||||
*[gen1]() {}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Test { }
|
||||
class Derived extends Super { }
|
||||
class Derived2 extends Super() { }
|
||||
class StaticMethods {
|
||||
(class Test { });
|
||||
(class Derived extends Super { });
|
||||
(class Derived2 extends Super() { });
|
||||
(class StaticMethods {
|
||||
static n1() {
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ class StaticMethods {
|
||||
|
||||
static *gen1() {
|
||||
}
|
||||
}
|
||||
class Methods {
|
||||
});
|
||||
(class Methods {
|
||||
n2() {
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ class Methods {
|
||||
|
||||
*gen1() {
|
||||
}
|
||||
}
|
||||
class ComputedStaticMethods {
|
||||
});
|
||||
(class ComputedStaticMethods {
|
||||
static [n1]() {
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ class ComputedStaticMethods {
|
||||
|
||||
static *[gen1]() {
|
||||
}
|
||||
}
|
||||
class ComputedMethods {
|
||||
});
|
||||
(class ComputedMethods {
|
||||
[n2]() {
|
||||
}
|
||||
|
||||
@@ -52,6 +52,6 @@ class ComputedMethods {
|
||||
|
||||
*[gen1]() {
|
||||
}
|
||||
}
|
||||
});
|
||||
(class { });
|
||||
(class extends Super() { });
|
||||
|
||||
@@ -3,26 +3,38 @@
|
||||
(class Derived2 extends Super() {});
|
||||
(class StaticMethods {
|
||||
static n1() {}
|
||||
|
||||
static get get1() {}
|
||||
|
||||
static set set1(value) {}
|
||||
|
||||
static *gen1() {}
|
||||
});
|
||||
(class Methods {
|
||||
n2() {}
|
||||
|
||||
get get2() {}
|
||||
|
||||
set set2(value) {}
|
||||
|
||||
*gen1() {}
|
||||
});
|
||||
(class ComputedStaticMethods {
|
||||
static [n1]() {}
|
||||
|
||||
static get [get1]() {}
|
||||
|
||||
static set [set1](value) {}
|
||||
|
||||
static *[gen1]() {}
|
||||
});
|
||||
(class ComputedMethods {
|
||||
[n2]() {}
|
||||
|
||||
get [get2]() {}
|
||||
|
||||
set [set2](value) {}
|
||||
|
||||
*[gen1]() {}
|
||||
});
|
||||
(class {});
|
||||
|
||||
@@ -2,8 +2,12 @@ var object1 = {
|
||||
get [Symbol.create]() {},
|
||||
set [set()](value) {}
|
||||
};
|
||||
var object2 = { *[generator()]() {} };
|
||||
var object3 = { *[generator()]() {} };
|
||||
var object2 = {
|
||||
*[generator()]() {}
|
||||
};
|
||||
var object3 = {
|
||||
*[generator()]() {}
|
||||
};
|
||||
var object4 = {
|
||||
[Symbol.xxx]: "hello",
|
||||
[ok()]: 42
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
function a(p = 20) {}
|
||||
|
||||
function b(p, q = 30) {}
|
||||
|
||||
function c(p, q = 30, ...r) {}
|
||||
|
||||
(p = 20) => {};
|
||||
(p = 20, ...q) => {};
|
||||
|
||||
@@ -5,12 +5,14 @@ function t2({responseText}) {
|
||||
function t3([a, b]) {
|
||||
}
|
||||
var [i, j, k] = array;
|
||||
var {i, j, k} = obj;
|
||||
var {
|
||||
i,
|
||||
j,
|
||||
k
|
||||
} = obj;
|
||||
let {i, j, k} = obj;
|
||||
const {i, j, k} = obj;
|
||||
var {
|
||||
value
|
||||
} = obj;
|
||||
var { value } = obj;
|
||||
var {
|
||||
value
|
||||
} = obj;
|
||||
|
||||
@@ -7,15 +7,9 @@ var {
|
||||
j,
|
||||
k
|
||||
} = obj;
|
||||
let {
|
||||
i,
|
||||
j,
|
||||
k
|
||||
} = obj;
|
||||
const {
|
||||
i,
|
||||
j,
|
||||
k
|
||||
} = obj;
|
||||
var { value } = obj;
|
||||
let { i, j, k } = obj;
|
||||
const { i, j, k } = obj;
|
||||
var { value } = obj;
|
||||
var {
|
||||
value
|
||||
} = obj;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function test() {
|
||||
for (var i of array) {}
|
||||
|
||||
for (let i of array) {}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
({ t: t }) = obj;
|
||||
({ t: { C: C } }) = obj;
|
||||
({
|
||||
a,
|
||||
b,
|
||||
c
|
||||
t: { C: C }
|
||||
}) = obj;
|
||||
({ a, b, c }) = obj;
|
||||
|
||||
@@ -2,6 +2,7 @@ var escaped = `
|
||||
\u2028
|
||||
\u2029
|
||||
`;
|
||||
|
||||
var escaped = `
|
||||
\v
|
||||
\b
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
var hello = `hello`;
|
||||
|
||||
var hello = `
|
||||
line
|
||||
terminators`;
|
||||
|
||||
var tagged = tagged`hello`;
|
||||
var tagged = member.call`hello`;
|
||||
var tagged = new call`hello`;
|
||||
var tagged = new (call`hello`());
|
||||
var tagged = new call`hello`();
|
||||
var tagged = new (call`hello`())();
|
||||
var tageed = member[call`hello`];
|
||||
|
||||
var middles = `
|
||||
Is the order a rabbit?
|
||||
`;
|
||||
|
||||
var middles = `
|
||||
Is the order ${ order }?
|
||||
`;
|
||||
|
||||
var middles = `
|
||||
Is the order ${ order }?
|
||||
`;
|
||||
|
||||
var middles = `
|
||||
1. ${ cocoa }
|
||||
2. ${ chino }
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
function add() {
|
||||
var _arguments = arguments;
|
||||
|
||||
return [1, 2, 3].map(function (i) {
|
||||
return i * _arguments[0];
|
||||
});
|
||||
}
|
||||
|
||||
add(5);
|
||||
add(5);
|
||||
|
||||
@@ -10,10 +10,7 @@ var seattlers = (function () {
|
||||
var c = _step2.value;
|
||||
|
||||
if (c.city == "Seattle") {
|
||||
_arr.push({
|
||||
name: c.name,
|
||||
age: c.age
|
||||
});
|
||||
_arr.push({ name: c.name, age: c.age });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ var arr = (function () {
|
||||
|
||||
for (var _iterator2 = "12345678".split("")[Symbol.iterator](), _step2; !(_step2 = _iterator2.next()).done;) {
|
||||
var y = _step2.value;
|
||||
|
||||
_arr.push(x + y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
|
||||
function add() {
|
||||
var _this = this;
|
||||
|
||||
return [1, 2, 3].map(function (i) {
|
||||
return i * _this.multiplier;
|
||||
});
|
||||
}
|
||||
|
||||
add.call({ multiplier: 5 });
|
||||
add.call({ multiplier: 5 });
|
||||
|
||||
@@ -35,10 +35,10 @@ five({ arguments: ["foo"] });
|
||||
|
||||
function six(obj) {
|
||||
var fn = () => {
|
||||
var fn2 = function () {
|
||||
return arguments[0];
|
||||
};
|
||||
return fn2("foobar");
|
||||
var fn2 = function () {
|
||||
return arguments[0];
|
||||
};
|
||||
return fn2("foobar");
|
||||
};
|
||||
return fn();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
function one() {
|
||||
var _arguments = arguments;
|
||||
|
||||
var inner = function () {
|
||||
return _arguments;
|
||||
};
|
||||
@@ -11,12 +12,14 @@ one(1, 2);
|
||||
|
||||
function two() {
|
||||
var _arguments2 = arguments;
|
||||
|
||||
var inner = function () {
|
||||
return _arguments2;
|
||||
};
|
||||
|
||||
var another = function () {
|
||||
var _arguments3 = arguments;
|
||||
|
||||
var inner2 = function () {
|
||||
return _arguments3;
|
||||
};
|
||||
@@ -28,6 +31,7 @@ two(1, 2);
|
||||
|
||||
function three() {
|
||||
var _arguments4 = arguments;
|
||||
|
||||
var fn = function () {
|
||||
return _arguments4[0] + "bar";
|
||||
};
|
||||
@@ -37,6 +41,7 @@ three("foo");
|
||||
|
||||
function four() {
|
||||
var _arguments5 = arguments;
|
||||
|
||||
var fn = function () {
|
||||
return _arguments5[0].foo + "bar";
|
||||
};
|
||||
@@ -61,4 +66,4 @@ function six(obj) {
|
||||
};
|
||||
return fn();
|
||||
}
|
||||
six();
|
||||
six();
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
var some = function (count) {
|
||||
if (count === undefined) count = "30";
|
||||
|
||||
console.log("count", count);
|
||||
};
|
||||
|
||||
some();
|
||||
some();
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = { init: function () {
|
||||
var _this = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
MongoClient.connect(config.mongodb, function (err, db) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
_this.db = db;
|
||||
resolve(_this);
|
||||
module.exports = {
|
||||
init: function () {
|
||||
var _this = this;
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
MongoClient.connect(config.mongodb, function (err, db) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
_this.db = db;
|
||||
resolve(_this);
|
||||
});
|
||||
});
|
||||
});
|
||||
} };
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
var _slice = Array.prototype.slice;
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
@@ -33,21 +35,25 @@ var Test = (function (Foo) {
|
||||
|
||||
_extends(Test, Foo);
|
||||
|
||||
_classProps(Test, { foo: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
Foo.foo.call(this);
|
||||
Foo.foo.call.apply(Foo.foo, [this].concat(_slice.call(arguments)));
|
||||
Foo.foo.call.apply(Foo.foo, [this, "test"].concat(_slice.call(arguments)));
|
||||
_classProps(Test, {
|
||||
foo: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
Foo.foo.call(this);
|
||||
Foo.foo.call.apply(Foo.foo, [this].concat(_slice.call(arguments)));
|
||||
Foo.foo.call.apply(Foo.foo, [this, "test"].concat(_slice.call(arguments)));
|
||||
}
|
||||
}
|
||||
} }, { test: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
Foo.prototype.test.call(this);
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this].concat(_slice.call(arguments)));
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this, "test"].concat(_slice.call(arguments)));
|
||||
}, {
|
||||
test: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
Foo.prototype.test.call(this);
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this].concat(_slice.call(arguments)));
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this, "test"].concat(_slice.call(arguments)));
|
||||
}
|
||||
}
|
||||
} });
|
||||
});
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
@@ -19,4 +21,4 @@ var Test = (function (Foo) {
|
||||
_extends(Test, Foo);
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
})(Foo);
|
||||
|
||||
@@ -2,16 +2,19 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
@@ -23,12 +26,14 @@ var Test = (function (Foo) {
|
||||
|
||||
_extends(Test, Foo);
|
||||
|
||||
_classProps(Test, { test: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
return Foo.wow.call(this);
|
||||
_classProps(Test, {
|
||||
test: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
return Foo.wow.call(this);
|
||||
}
|
||||
}
|
||||
} });
|
||||
});
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
@@ -22,4 +24,4 @@ var Foo = (function (Bar) {
|
||||
_extends(Foo, Bar);
|
||||
|
||||
return Foo;
|
||||
})(Bar);
|
||||
})(Bar);
|
||||
|
||||
@@ -2,20 +2,23 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, { test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
}
|
||||
}
|
||||
} });
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -2,15 +2,20 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, { test: { get: function () {
|
||||
return 5 + 5;
|
||||
} } });
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -2,18 +2,21 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, { test: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
return 5 + 5;
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
return 5 + 5;
|
||||
}
|
||||
}
|
||||
} });
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -2,15 +2,20 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, { test: { set: function (val) {
|
||||
this._test = val;
|
||||
} } });
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
@@ -16,12 +17,14 @@ var BaseView = function () {
|
||||
var BaseView = (function () {
|
||||
var _class2 = function () {};
|
||||
|
||||
_classProps(_class2, null, { foo: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
this.autoRender = true;
|
||||
_classProps(_class2, null, {
|
||||
foo: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
this.autoRender = true;
|
||||
}
|
||||
}
|
||||
} });
|
||||
});
|
||||
|
||||
return _class2;
|
||||
})();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
@@ -18,4 +20,4 @@ var Q = (function (_ref) {
|
||||
_extends(Q, _ref);
|
||||
|
||||
return Q;
|
||||
})(function () {});
|
||||
})(function () {});
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _extends = function (child, parent) {
|
||||
child.prototype = Object.create(parent.prototype, { constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
} });
|
||||
child.prototype = Object.create(parent.prototype, {
|
||||
constructor: {
|
||||
value: child,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
@@ -18,4 +20,4 @@ var Test = (function (Foo) {
|
||||
_extends(Test, Foo);
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
})(Foo);
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
wow;
|
||||
/*
|
||||
um yeah lol
|
||||
*/
|
||||
test.wow();
|
||||
@@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
wow;
|
||||
|
||||
/*
|
||||
um yeah lol
|
||||
*/
|
||||
|
||||
test.wow();
|
||||
@@ -1,3 +0,0 @@
|
||||
wow;
|
||||
// um yeah lol
|
||||
test.wow();
|
||||
@@ -1,5 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
wow;
|
||||
// um yeah lol
|
||||
test.wow();
|
||||
@@ -6,15 +6,9 @@ var b = _ref[1];
|
||||
var _ref2 = [3, 4];
|
||||
var c = _ref2[0];
|
||||
var d = _ref2[1];
|
||||
var _ref3 = {
|
||||
e: 5,
|
||||
f: 6
|
||||
};
|
||||
var _ref3 = { e: 5, f: 6 };
|
||||
var e = _ref3.e;
|
||||
var f = _ref3.f;
|
||||
var _ref4 = {
|
||||
a: 7,
|
||||
b: 8
|
||||
};
|
||||
var _ref4 = { a: 7, b: 8 };
|
||||
var g = _ref4.a;
|
||||
var h = _ref4.b;
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
var t = function (t, f) {
|
||||
if (f === undefined) f = 5;
|
||||
|
||||
if (t === undefined) t = "foo";
|
||||
|
||||
return t + " bar " + f;
|
||||
};
|
||||
|
||||
var a = function (t, f) {
|
||||
if (f === undefined) f = 5;
|
||||
|
||||
return t + " bar " + f;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
|
||||
var t = function (t) {
|
||||
if (t === undefined) t = "foo";
|
||||
|
||||
return t + " bar";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
for (var _ref in obj) {
|
||||
var name = _ref[0];
|
||||
var value = _ref[1];
|
||||
|
||||
print("Name: " + name + ", Value: " + value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,13 +10,11 @@ function somethingAdvanced(_ref) {
|
||||
function unpackObject(_ref2) {
|
||||
var title = _ref2.title;
|
||||
var author = _ref2.author;
|
||||
|
||||
return title + " " + author;
|
||||
}
|
||||
|
||||
console.log(unpackObject({
|
||||
title: "title",
|
||||
author: "author"
|
||||
}));
|
||||
console.log(unpackObject({ title: "title", author: "author" }));
|
||||
|
||||
var unpackArray = function (_ref3, _ref4) {
|
||||
var a = _ref3[0];
|
||||
@@ -25,7 +23,8 @@ var unpackArray = function (_ref3, _ref4) {
|
||||
var x = _ref4[0];
|
||||
var y = _ref4[1];
|
||||
var z = _ref4[2];
|
||||
|
||||
return a + b + c;
|
||||
};
|
||||
|
||||
console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3]));
|
||||
console.log(unpackArray(["hello", ", ", "world"], [1, 2, 3]));
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
X({ "data-prop": x ? Y({ prop: 2 }) : Z(null, "\n") });
|
||||
X({
|
||||
"data-prop": x ? Y({
|
||||
prop: 2
|
||||
}) : Z(null, "\n")
|
||||
});
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
X(null);
|
||||
|
||||
X({ prop: "1" });
|
||||
X({
|
||||
prop: "1"
|
||||
});
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
X({ prop: "2" }, Y(null));
|
||||
X({
|
||||
prop: "2"
|
||||
}, Y(null));
|
||||
|
||||
X({ prop: "2" }, Y(null), Z(null));
|
||||
X({
|
||||
prop: "2"
|
||||
}, Y(null), Z(null));
|
||||
|
||||
@@ -2,20 +2,13 @@ define(["exports"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
exports.foo7 = foo7;
|
||||
var foo = 1;
|
||||
exports.foo = foo;
|
||||
var foo2 = function () {};
|
||||
exports.foo2 = foo2;
|
||||
var foo = exports.foo = 1;
|
||||
var foo2 = exports.foo2 = function () {};
|
||||
var foo3;
|
||||
exports.foo3 = foo3;
|
||||
var foo4 = 2;
|
||||
exports.foo4 = foo4;
|
||||
var foo4 = exports.foo4 = 2;
|
||||
var foo5;
|
||||
exports.foo5 = foo5;
|
||||
var foo6 = 3;
|
||||
exports.foo6 = foo6;
|
||||
var foo6 = exports.foo6 = 3;
|
||||
function foo7() {}
|
||||
|
||||
var foo8 = function foo8() {};
|
||||
|
||||
exports.foo8 = foo8;
|
||||
|
||||
@@ -6,6 +6,6 @@ export function nextOdd(n) {
|
||||
|
||||
export var isOdd = (function (isEven) {
|
||||
return function (n) {
|
||||
return !isEven(n);
|
||||
return !isEven(n);
|
||||
};
|
||||
})(isEven);
|
||||
|
||||
@@ -7,10 +7,9 @@ define(["exports", "./evens"], function (exports, _evens) {
|
||||
return isEven(n) ? n + 1 : n + 2;
|
||||
}
|
||||
|
||||
var isOdd = (function (isEven) {
|
||||
var isOdd = exports.isOdd = (function (isEven) {
|
||||
return function (n) {
|
||||
return !isEven(n);
|
||||
};
|
||||
})(isEven);
|
||||
exports.isOdd = isOdd;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,8 +6,7 @@ define(["exports", "foo", "foo-bar", "./directory/foo-bar"], function (exports,
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.foo;
|
||||
exports.test = test;
|
||||
var test = 5;
|
||||
var test = exports.test = 5;
|
||||
|
||||
exports.test = test;
|
||||
exports.default = test;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
exports.foo7 = foo7;
|
||||
var foo = 1;
|
||||
exports.foo = foo;
|
||||
var foo2 = function () {};
|
||||
exports.foo2 = foo2;
|
||||
var foo = exports.foo = 1;
|
||||
var foo2 = exports.foo2 = function () {};
|
||||
var foo3;
|
||||
exports.foo3 = foo3;
|
||||
var foo4 = 2;
|
||||
exports.foo4 = foo4;
|
||||
var foo4 = exports.foo4 = 2;
|
||||
var foo5;
|
||||
exports.foo5 = foo5;
|
||||
var foo6 = 3;
|
||||
exports.foo6 = foo6;
|
||||
var foo6 = exports.foo6 = 3;
|
||||
function foo7() {}
|
||||
|
||||
var foo8 = function foo8() {};
|
||||
|
||||
exports.foo8 = foo8;
|
||||
|
||||
@@ -6,6 +6,6 @@ export function nextOdd(n) {
|
||||
|
||||
export var isOdd = (function (isEven) {
|
||||
return function (n) {
|
||||
return !isEven(n);
|
||||
return !isEven(n);
|
||||
};
|
||||
})(isEven);
|
||||
|
||||
@@ -6,9 +6,8 @@ function nextOdd(n) {
|
||||
return isEven(n) ? n + 1 : n + 2;
|
||||
}
|
||||
|
||||
var isOdd = (function (isEven) {
|
||||
var isOdd = exports.isOdd = (function (isEven) {
|
||||
return function (n) {
|
||||
return !isEven(n);
|
||||
};
|
||||
})(isEven);
|
||||
exports.isOdd = isOdd;
|
||||
@@ -11,7 +11,6 @@ var foo = require("foo");
|
||||
var bar = require("foo").bar;
|
||||
var bar = require("foo").foo;
|
||||
exports.test = test;
|
||||
var test = 5;
|
||||
var test = exports.test = 5;
|
||||
|
||||
exports.test = test;
|
||||
exports.default = test;
|
||||
exports.default = test;
|
||||
|
||||
@@ -8,20 +8,13 @@
|
||||
"use strict";
|
||||
|
||||
exports.foo7 = foo7;
|
||||
var foo = 1;
|
||||
exports.foo = foo;
|
||||
var foo2 = function () {};
|
||||
exports.foo2 = foo2;
|
||||
var foo = exports.foo = 1;
|
||||
var foo2 = exports.foo2 = function () {};
|
||||
var foo3;
|
||||
exports.foo3 = foo3;
|
||||
var foo4 = 2;
|
||||
exports.foo4 = foo4;
|
||||
var foo4 = exports.foo4 = 2;
|
||||
var foo5;
|
||||
exports.foo5 = foo5;
|
||||
var foo6 = 3;
|
||||
exports.foo6 = foo6;
|
||||
var foo6 = exports.foo6 = 3;
|
||||
function foo7() {}
|
||||
|
||||
var foo8 = function foo8() {};
|
||||
|
||||
exports.foo8 = foo8;
|
||||
|
||||
@@ -6,6 +6,6 @@ export function nextOdd(n) {
|
||||
|
||||
export var isOdd = (function (isEven) {
|
||||
return function (n) {
|
||||
return !isEven(n);
|
||||
return !isEven(n);
|
||||
};
|
||||
})(isEven);
|
||||
|
||||
@@ -13,10 +13,9 @@
|
||||
return isEven(n) ? n + 1 : n + 2;
|
||||
}
|
||||
|
||||
var isOdd = (function (isEven) {
|
||||
var isOdd = exports.isOdd = (function (isEven) {
|
||||
return function (n) {
|
||||
return !isEven(n);
|
||||
};
|
||||
})(isEven);
|
||||
exports.isOdd = isOdd;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
var bar = _foo.bar;
|
||||
var bar = _foo.foo;
|
||||
exports.test = test;
|
||||
var test = 5;
|
||||
var test = exports.test = 5;
|
||||
|
||||
exports.test = test;
|
||||
exports.default = test;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
var obj = (function (_obj) {
|
||||
Object.defineProperties(_obj, { foo: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
set: function (value) {
|
||||
this._foo = value;
|
||||
Object.defineProperties(_obj, {
|
||||
foo: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
set: function (value) {
|
||||
this._foo = value;
|
||||
}
|
||||
}
|
||||
} });
|
||||
});
|
||||
|
||||
return _obj;
|
||||
})({});
|
||||
})({});
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var obj = (function (_obj) {
|
||||
Object.defineProperties(_obj, { foo: { get: function () {
|
||||
return 5 + 5;
|
||||
} } });
|
||||
Object.defineProperties(_obj, {
|
||||
foo: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return _obj;
|
||||
})({});
|
||||
})({});
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var obj = { method: function () {
|
||||
return 5 + 5;
|
||||
} };
|
||||
var obj = {
|
||||
method: function () {
|
||||
return 5 + 5;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var obj = (function (_obj) {
|
||||
Object.defineProperties(_obj, { foo: { set: function (value) {
|
||||
this._foo = value;
|
||||
} } });
|
||||
Object.defineProperties(_obj, {
|
||||
foo: {
|
||||
set: function (value) {
|
||||
this._foo = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return _obj;
|
||||
})({});
|
||||
})({});
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
var coords = {
|
||||
x: x,
|
||||
y: y,
|
||||
foo: "bar"
|
||||
};
|
||||
var coords = { x: x, y: y, foo: "bar" };
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
var coords = {
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
var coords = { x: x, y: y };
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
exports = { Component: React.createClass({
|
||||
displayName: "Component",
|
||||
render: function () {
|
||||
return null;
|
||||
}
|
||||
}) };
|
||||
exports = {
|
||||
Component: React.createClass({
|
||||
displayName: "Component",
|
||||
render: function () {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
@@ -2,18 +2,23 @@
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, { bar: { get: function () {
|
||||
throw new Error("wow");
|
||||
} } });
|
||||
_classProps(Test, null, {
|
||||
bar: {
|
||||
get: function () {
|
||||
throw new Error("wow");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
|
||||
var test = new Test;
|
||||
test.bar;
|
||||
var test = new Test();
|
||||
test.bar;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[{
|
||||
"original": {
|
||||
"line": 3,
|
||||
"column": 11
|
||||
"column": 10
|
||||
},
|
||||
"generated": {
|
||||
"line": 12,
|
||||
"column": 11
|
||||
"line": 15,
|
||||
"column": 15
|
||||
}
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user