tessl install tessl/npm-coffeescript@2.7.0A programming language that compiles into JavaScript, offering more concise and readable syntax while maintaining full JavaScript compatibility.
Agent Success
Agent success rate when using this tile
77%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.01x
Baseline
Agent success rate without this tile
76%
Build a utility module that compiles and evaluates CoffeeScript code featuring complex destructuring patterns. The module should provide functions that demonstrate and test CoffeeScript's destructuring capabilities, including nested structures, default values, rest operators, and object property aliasing.
[a, [b, c]] = [1, [2, 3]] and returns valid JavaScript @test[a, , c] = [1, 2, 3] and returns valid JavaScript @test{old: new} = {old: 'value'} and returns valid JavaScript @test{a: {b: c}} = {a: {b: 5}} and returns valid JavaScript @test[a = 10, b = 20] = [1] and returns valid JavaScript @test{x = 5, y = 10} = {x: 3} and returns valid JavaScript @test[first, rest...] = [1, 2, 3, 4] and returns valid JavaScript @test[{name}, {age}] = [{name: 'Alice'}, {age: 30}] and returns valid JavaScript @test@generates
/**
* Compiles CoffeeScript code to JavaScript
* @param {string} coffeeCode - The CoffeeScript code to compile
* @returns {string} The compiled JavaScript code
*/
function compileDestructuring(coffeeCode) {
// Implementation
}
/**
* Compiles and evaluates CoffeeScript code with destructuring
* @param {string} coffeeCode - The CoffeeScript code to compile and evaluate
* @returns {any} The result of evaluating the code
*/
function evalDestructuring(coffeeCode) {
// Implementation
}
module.exports = {
compileDestructuring,
evalDestructuring
};Provides CoffeeScript compilation and evaluation support, particularly for complex destructuring patterns.
@satisfied-by