Closed axtens closed 5 months ago
working thru from last to first @glennj don't spend any time on this. I've got it figured out. Using R8 with
const output = []; const lines = ClipboardService.GetText().split(/\r\n|\r|\n/g); lines.forEach(line => { line = line.replace("{", "["); line = line.replace("}", "]"); output.push(eval(line)); }) clip(output.join("\r\n")) function test_equal(name, expecting, outcome) { return 'test_equal("' + name + '", ' + outcome + ', ' + expecting + ')'; } function score(obj, name) { return 'score(' + (JSON.stringify(obj)).replace("]", "}").replace("[", "{") + ',"' + name + '")' } function is_scalene(obj) { return 'is_scalene(' + (JSON.stringify(obj)).replace("]", "}").replace("[", "{") + ')' } function is_isosceles(obj) { return ' is_isosceles(' + (JSON.stringify(obj)).replace("]", "}").replace("[", "{") + ')' } function is_equilateral(obj) { return 'is_equilateral(' + (JSON.stringify(obj)).replace("]", "}").replace("[", "{") + ')' } function two_fer(name) { return ' two_fer("' + name + '")' }
As I change something, its function gets added.
All tested with run.ex
working thru from last to first @glennj don't spend any time on this. I've got it figured out. Using R8 with
As I change something, its function gets added.