File: main.js

package info (click to toggle)
node-rollup 3.15.0-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 51,264 kB
  • sloc: javascript: 108,994; sh: 26; makefile: 18
file content (28 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
let result = '';

const a = { a: true };
for (const key in!0?a:a) result += key;

const b = ['b'];
for (const value of!0?b:b) result += value;

const c = 'c';
function testReturn() {
	return!0?c:c;
}
result += testReturn();

const d = 'd';
function* testYield() {
	yield!0?d:d;
}
for (const value of testYield()) result += value;

const e = 'e';
try {
	throw!0?e:e;
} catch (err) {
	result += err;
}

assert.strictEqual(result, 'abcde');