Open
Description
Hi,
I've created a simple "tag" function for a string tempalte:
var myAge = 6;
var myFormerAge = 4;
function tag(strings, ...values){
if (values[0] < 5){
values[1] = 'small';
}else{
values[1] = 'big';
}
return `${strings[0]}${values[0]}${strings[1]}${values[1]}`;
}
var message = tag`I am ${myAge} years old, so now I am ${""}`;
console.log(message);
But it gives me an error in console:
Uncaught TypeError: $traceurRuntime.setProperty is not a function
I'm using:
npm 2.5.1
node 0.12
traceur 0.0.90C
The code above was built to:
var myAge = 6;
var myFormerAge = 4;
function tag(strings) {
for (var values = [],
$__1 = 1; $__1 < arguments.length; $__1++)
$traceurRuntime.setProperty(values, $__1 - 1, arguments[$traceurRuntime.toProperty($__1)]);
console.log(strings);
console.log(values);
}
var message = tag($__0, myAge, "");
console.log(message);
Which gave an error on the line with $traceurRuntime.setProperty
.