id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
jashkenas/coffeescript:test/support/helpers.coffee:8:raw_corpus
raw_corpus
exports.inspect = (obj) -> if global.testingBrowser JSON.stringify obj, null, 2 else require('util').inspect obj, depth: 10 colors: if process.env.NODE_DISABLE_COLORS then no else yes # Helpers to get AST nodes for a string of code.
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
42
50
jashkenas/coffeescript:test/support/helpers.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.inspect = (obj) -> if global.testingBrowser JSON.stringify obj, null, 2 else require('util').inspect obj, depth: 10 colors: if process.env.NODE_DISABLE_COLORS then no else yes # Helpers to get AST nodes for a string of code. ```
exports.inspect = function(obj) { if (global.testingBrowser) { return JSON.stringify(obj, null, 2); } else { return require('util').inspect(obj, { depth: 10, colors: process.env.NODE_DISABLE_COLORS ? false : true }); } }; // Helpers to get AST nodes for a string of code.
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
42
50
jashkenas/coffeescript:test/support/helpers.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.inspect = function(obj) { if (global.testingBrowser) { return JSON.stringify(obj, null, 2); } else { return require('util').inspect(obj, { depth: 10, colors: process.env.NODE_DISABLE_COLORS ? false : true }); } }; // Helpers t...
exports.inspect = (obj) -> if global.testingBrowser JSON.stringify obj, null, 2 else require('util').inspect obj, depth: 10 colors: if process.env.NODE_DISABLE_COLORS then no else yes # Helpers to get AST nodes for a string of code.
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
42
50
jashkenas/coffeescript:test/support/helpers.coffee:8:completion
completion
exports.inspect = (obj) -> if global.testingBrowser JSON.stringify obj, null, 2 else
require('util').inspect obj, depth: 10 colors: if process.env.NODE_DISABLE_COLORS then no else yes # Helpers to get AST nodes for a string of code.
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
42
50
jashkenas/coffeescript:test/support/helpers.coffee:9:raw_corpus
raw_corpus
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`.
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
51
55
jashkenas/coffeescript:test/support/helpers.coffee:9:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. ```
var getAstRoot; exports.getAstRoot = getAstRoot = function(code) { return CoffeeScript.compile(code, { ast: true }); }; // The root node is always a `File` node, so for brevity in the tests return its // children from `program.body`.
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
51
55
jashkenas/coffeescript:test/support/helpers.coffee:9:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getAstRoot; exports.getAstRoot = getAstRoot = function(code) { return CoffeeScript.compile(code, { ast: true }); }; // The root node is always a `File` node, so for brevity in the tests return its // children from `program.body`. ```
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`.
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
51
55
jashkenas/coffeescript:test/support/helpers.coffee:10:raw_corpus
raw_corpus
getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node.
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
56
60
jashkenas/coffeescript:test/support/helpers.coffee:10:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node. ```
var getAstExpressions; getAstExpressions = function(code) { var ast; ast = getAstRoot(code); return ast.program.body; }; // Many tests want just the root node.
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
56
60
jashkenas/coffeescript:test/support/helpers.coffee:10:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getAstExpressions; getAstExpressions = function(code) { var ast; ast = getAstRoot(code); return ast.program.body; }; // Many tests want just the root node. ```
getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node.
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
56
60
jashkenas/coffeescript:test/support/helpers.coffee:10:completion
completion
getAstExpressions = (code) -> ast = getAstRoot code
ast.program.body # Many tests want just the root node.
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
56
60
jashkenas/coffeescript:test/support/helpers.coffee:11:raw_corpus
raw_corpus
exports.getAstExpression = (code) -> expressionStatementAst = getAstExpressions(code)[0] ok expressionStatementAst.type is 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper' expressionStatementAst.expression
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
61
64
jashkenas/coffeescript:test/support/helpers.coffee:11:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getAstExpression = (code) -> expressionStatementAst = getAstExpressions(code)[0] ok expressionStatementAst.type is 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper' expressionStatementAst.expression ```
exports.getAstExpression = function(code) { var expressionStatementAst; expressionStatementAst = getAstExpressions(code)[0]; ok(expressionStatementAst.type === 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper'); return expressionStatementAst.expression; };
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
61
64
jashkenas/coffeescript:test/support/helpers.coffee:11:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.getAstExpression = function(code) { var expressionStatementAst; expressionStatementAst = getAstExpressions(code)[0]; ok(expressionStatementAst.type === 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper'); return expressionStatementAst...
exports.getAstExpression = (code) -> expressionStatementAst = getAstExpressions(code)[0] ok expressionStatementAst.type is 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper' expressionStatementAst.expression
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
61
64
jashkenas/coffeescript:test/support/helpers.coffee:11:completion
completion
exports.getAstExpression = (code) -> expressionStatementAst = getAstExpressions(code)[0]
ok expressionStatementAst.type is 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper' expressionStatementAst.expression
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
61
64
jashkenas/coffeescript:test/support/helpers.coffee:12:raw_corpus
raw_corpus
exports.getAstStatement = (code) -> statement = getAstExpressions(code)[0] ok statement.type isnt 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper" statement
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
66
69
jashkenas/coffeescript:test/support/helpers.coffee:12:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getAstStatement = (code) -> statement = getAstExpressions(code)[0] ok statement.type isnt 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper" statement ```
exports.getAstStatement = function(code) { var statement; statement = getAstExpressions(code)[0]; ok(statement.type !== 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper"); return statement; };
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
66
69
jashkenas/coffeescript:test/support/helpers.coffee:12:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.getAstStatement = function(code) { var statement; statement = getAstExpressions(code)[0]; ok(statement.type !== 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper"); return statement; }; ```
exports.getAstStatement = (code) -> statement = getAstExpressions(code)[0] ok statement.type isnt 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper" statement
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
66
69
jashkenas/coffeescript:test/support/helpers.coffee:12:completion
completion
exports.getAstStatement = (code) -> statement = getAstExpressions(code)[0]
ok statement.type isnt 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper" statement
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
66
69
jashkenas/coffeescript:test/support/helpers.coffee:13:raw_corpus
raw_corpus
exports.getAstExpressionOrStatement = (code) -> expressionAst = getAstExpressions(code)[0] return expressionAst unless expressionAst.type is 'ExpressionStatement' expressionAst.expression
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
71
74
jashkenas/coffeescript:test/support/helpers.coffee:13:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getAstExpressionOrStatement = (code) -> expressionAst = getAstExpressions(code)[0] return expressionAst unless expressionAst.type is 'ExpressionStatement' expressionAst.expression ```
exports.getAstExpressionOrStatement = function(code) { var expressionAst; expressionAst = getAstExpressions(code)[0]; if (expressionAst.type !== 'ExpressionStatement') { return expressionAst; } return expressionAst.expression; };
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
71
74
jashkenas/coffeescript:test/support/helpers.coffee:13:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.getAstExpressionOrStatement = function(code) { var expressionAst; expressionAst = getAstExpressions(code)[0]; if (expressionAst.type !== 'ExpressionStatement') { return expressionAst; } return expressionAst.expression; }; ```
exports.getAstExpressionOrStatement = (code) -> expressionAst = getAstExpressions(code)[0] return expressionAst unless expressionAst.type is 'ExpressionStatement' expressionAst.expression
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
71
74
jashkenas/coffeescript:test/support/helpers.coffee:13:completion
completion
exports.getAstExpressionOrStatement = (code) -> expressionAst = getAstExpressions(code)[0]
return expressionAst unless expressionAst.type is 'ExpressionStatement' expressionAst.expression
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
71
74
jashkenas/coffeescript:test/support/helpers.coffee:14:raw_corpus
raw_corpus
exports.throwsCompileError = (code, compileOpts, args...) -> throws -> CoffeeScript.compile code, compileOpts, args... throws -> CoffeeScript.compile code, Object.assign({}, (compileOpts ? {}), ast: yes), args...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
76
78
jashkenas/coffeescript:test/support/helpers.coffee:14:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.throwsCompileError = (code, compileOpts, args...) -> throws -> CoffeeScript.compile code, compileOpts, args... throws -> CoffeeScript.compile code, Object.assign({}, (compileOpts ? {}), ast: yes), args... ```
exports.throwsCompileError = function(code, compileOpts, ...args) { throws(function() { return CoffeeScript.compile(code, compileOpts, ...args); }); return throws(function() { return CoffeeScript.compile(code, Object.assign({}, compileOpts != null ? compileOpts : {}, { ast: true }), ...args); ...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
76
78
jashkenas/coffeescript:test/support/helpers.coffee:14:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.throwsCompileError = function(code, compileOpts, ...args) { throws(function() { return CoffeeScript.compile(code, compileOpts, ...args); }); return throws(function() { return CoffeeScript.compile(code, Object.assign({}, compileOpts != null ? c...
exports.throwsCompileError = (code, compileOpts, args...) -> throws -> CoffeeScript.compile code, compileOpts, args... throws -> CoffeeScript.compile code, Object.assign({}, (compileOpts ? {}), ast: yes), args...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
76
78
jashkenas/coffeescript:test/support/helpers.coffee:15:raw_corpus
raw_corpus
exports.doesNotThrowCompileError = (code, compileOpts, args...) -> doesNotThrow -> CoffeeScript.compile code, compileOpts, args... doesNotThrow -> CoffeeScript.compile code, Object.assign({}, (compileOpts ? {}), ast: yes), args...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
80
82
jashkenas/coffeescript:test/support/helpers.coffee:15:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.doesNotThrowCompileError = (code, compileOpts, args...) -> doesNotThrow -> CoffeeScript.compile code, compileOpts, args... doesNotThrow -> CoffeeScript.compile code, Object.assign({}, (compileOpts ? {}), ast: yes), args... ```
exports.doesNotThrowCompileError = function(code, compileOpts, ...args) { doesNotThrow(function() { return CoffeeScript.compile(code, compileOpts, ...args); }); return doesNotThrow(function() { return CoffeeScript.compile(code, Object.assign({}, compileOpts != null ? compileOpts : {}, { ast: true ...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
80
82
jashkenas/coffeescript:test/support/helpers.coffee:15:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.doesNotThrowCompileError = function(code, compileOpts, ...args) { doesNotThrow(function() { return CoffeeScript.compile(code, compileOpts, ...args); }); return doesNotThrow(function() { return CoffeeScript.compile(code, Object.assign({}, compi...
exports.doesNotThrowCompileError = (code, compileOpts, args...) -> doesNotThrow -> CoffeeScript.compile code, compileOpts, args... doesNotThrow -> CoffeeScript.compile code, Object.assign({}, (compileOpts ? {}), ast: yes), args...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/support/helpers.coffee
80
82
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for ...
// See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence hel...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !...
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
exports.eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" exports.arrayEq = (a, b, msg) -> ok arrayEgal(a, b), msg or "Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}" exports.eqJS = (input, expectedOutput, msg) -> actualOutput = CoffeeScript.co...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:2:raw_corpus
raw_corpus
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node. exports.getAs...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
51
74
jashkenas/coffeescript:test/support/helpers.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program....
var getAstExpressions, getAstRoot; exports.getAstRoot = getAstRoot = function(code) { return CoffeeScript.compile(code, { ast: true }); }; // The root node is always a `File` node, so for brevity in the tests return its // children from `program.body`. getAstExpressions = function(code) { var ast; ast = g...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
51
74
jashkenas/coffeescript:test/support/helpers.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getAstExpressions, getAstRoot; exports.getAstRoot = getAstRoot = function(code) { return CoffeeScript.compile(code, { ast: true }); }; // The root node is always a `File` node, so for brevity in the tests return its // children from `program.body`. ge...
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node. exports.getAs...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
51
74
jashkenas/coffeescript:test/support/helpers.coffee:2:completion
completion
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node. exports.getAs...
ok expressionStatementAst.type is 'ExpressionStatement', 'Expected ExpressionStatement AST wrapper' expressionStatementAst.expression exports.getAstStatement = (code) -> statement = getAstExpressions(code)[0] ok statement.type isnt 'ExpressionStatement', "Didn't expect ExpressionStatement AST wrapper" statemen...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93
16,577
https://github.com/jashkenas/coffeescript/blob/a7b1fa51e718e84df6d8e137a65d6bb3f6cedf93/test/support/helpers.coffee
51
74
jashkenas/coffeescript:test/support/helpers.coffee:2:raw_corpus
raw_corpus
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node. exports.getAs...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
38c8b2f35f36d0f71c9660bde6ff99c71edf17f2
16,577
https://github.com/jashkenas/coffeescript/blob/38c8b2f35f36d0f71c9660bde6ff99c71edf17f2/test/support/helpers.coffee
51
66
jashkenas/coffeescript:test/support/helpers.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program....
var getAstExpressions, getAstRoot; exports.getAstRoot = getAstRoot = function(code) { return CoffeeScript.compile(code, { ast: true }); }; // The root node is always a `File` node, so for brevity in the tests return its // children from `program.body`. getAstExpressions = function(code) { var ast; ast = g...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
38c8b2f35f36d0f71c9660bde6ff99c71edf17f2
16,577
https://github.com/jashkenas/coffeescript/blob/38c8b2f35f36d0f71c9660bde6ff99c71edf17f2/test/support/helpers.coffee
51
66
jashkenas/coffeescript:test/support/helpers.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getAstExpressions, getAstRoot; exports.getAstRoot = getAstRoot = function(code) { return CoffeeScript.compile(code, { ast: true }); }; // The root node is always a `File` node, so for brevity in the tests return its // children from `program.body`. ge...
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program.body # Many tests want just the root node. exports.getAs...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
38c8b2f35f36d0f71c9660bde6ff99c71edf17f2
16,577
https://github.com/jashkenas/coffeescript/blob/38c8b2f35f36d0f71c9660bde6ff99c71edf17f2/test/support/helpers.coffee
51
66
jashkenas/coffeescript:test/support/helpers.coffee:2:completion
completion
exports.getAstRoot = getAstRoot = (code) -> CoffeeScript.compile code, ast: yes # The root node is always a `File` node, so for brevity in the tests return its # children from `program.body`. getAstExpressions = (code) -> ast = getAstRoot code ast.program.body
# Many tests want just the root node. exports.getAstExpression = (code) -> expressionAst = getAstExpressions(code)[0] if expressionAst.type is 'ExpressionStatement' expressionAst.expression else expressionAst
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
38c8b2f35f36d0f71c9660bde6ff99c71edf17f2
16,577
https://github.com/jashkenas/coffeescript/blob/38c8b2f35f36d0f71c9660bde6ff99c71edf17f2/test/support/helpers.coffee
51
66
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for ...
// See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence hel...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !...
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
exports.eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" exports.arrayEq = (a, b, msg) -> ok arrayEgal(a, b), msg or "Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}" exports.eqJS = (input, expectedOutput, msg) -> actualOutput = CoffeeScript.co...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
1
50
jashkenas/coffeescript:test/support/helpers.coffee:2:raw_corpus
raw_corpus
# `Block` node, so for brevity in the tests return its children from # `expressions`. exports.getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes ast.expressions # Many tests want just the root node. exports.getAstExpression = (code) -> getAstExpressions(code)[0]
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
51
58
jashkenas/coffeescript:test/support/helpers.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # `Block` node, so for brevity in the tests return its children from # `expressions`. exports.getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes ast.expressions # Many tests want just the root node. exports.getAstExpression = (code) -> g...
// `Block` node, so for brevity in the tests return its children from // `expressions`. exports.getAstExpressions = function(code) { var ast; ast = CoffeeScript.compile(code, { ast: true }); return ast.expressions; }; // Many tests want just the root node. exports.getAstExpression = function(code) { retu...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
51
58
jashkenas/coffeescript:test/support/helpers.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // `Block` node, so for brevity in the tests return its children from // `expressions`. exports.getAstExpressions = function(code) { var ast; ast = CoffeeScript.compile(code, { ast: true }); return ast.expressions; }; // Many tests want just the root n...
# `Block` node, so for brevity in the tests return its children from # `expressions`. exports.getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes ast.expressions # Many tests want just the root node. exports.getAstExpression = (code) -> getAstExpressions(code)[0]
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
51
58
jashkenas/coffeescript:test/support/helpers.coffee:2:completion
completion
# `Block` node, so for brevity in the tests return its children from # `expressions`. exports.getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes
ast.expressions # Many tests want just the root node. exports.getAstExpression = (code) -> getAstExpressions(code)[0]
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
eb22196850555a3729f7457ac57c481a252f822c
16,577
https://github.com/jashkenas/coffeescript/blob/eb22196850555a3729f7457ac57c481a252f822c/test/support/helpers.coffee
51
58
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
fe5ff39ca22033c2c2691b29c6e12004ab69dce4
16,577
https://github.com/jashkenas/coffeescript/blob/fe5ff39ca22033c2c2691b29c6e12004ab69dce4/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for ...
// See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence hel...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
fe5ff39ca22033c2c2691b29c6e12004ab69dce4
16,577
https://github.com/jashkenas/coffeescript/blob/fe5ff39ca22033c2c2691b29c6e12004ab69dce4/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !...
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
fe5ff39ca22033c2c2691b29c6e12004ab69dce4
16,577
https://github.com/jashkenas/coffeescript/blob/fe5ff39ca22033c2c2691b29c6e12004ab69dce4/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
actualOutputLines[i] = "#{yellow}#{line}#{reset}" """Expected generated JavaScript to be: #{reset}#{expectedOutput}#{red} but instead it was: #{reset}#{actualOutputLines.join '\n'}#{red}""" exports.eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" export...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
fe5ff39ca22033c2c2691b29c6e12004ab69dce4
16,577
https://github.com/jashkenas/coffeescript/blob/fe5ff39ca22033c2c2691b29c6e12004ab69dce4/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
6d21dc549520f1c48b6f35b4ed0a45e158de8d63
16,577
https://github.com/jashkenas/coffeescript/blob/6d21dc549520f1c48b6f35b4ed0a45e158de8d63/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for ...
// See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence hel...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
6d21dc549520f1c48b6f35b4ed0a45e158de8d63
16,577
https://github.com/jashkenas/coffeescript/blob/6d21dc549520f1c48b6f35b4ed0a45e158de8d63/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, diffOutput, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !...
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
6d21dc549520f1c48b6f35b4ed0a45e158de8d63
16,577
https://github.com/jashkenas/coffeescript/blob/6d21dc549520f1c48b6f35b4ed0a45e158de8d63/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
actualOutputLines[i] = "#{yellow}#{line}#{reset}" """Expected generated JavaScript to be: #{reset}#{expectedOutput}#{red} but instead it was: #{reset}#{actualOutputLines.join '\n'}#{red}""" exports.eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" export...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
6d21dc549520f1c48b6f35b4ed0a45e158de8d63
16,577
https://github.com/jashkenas/coffeescript/blob/6d21dc549520f1c48b6f35b4ed0a45e158de8d63/test/support/helpers.coffee
1
40
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/support/helpers.coffee
1
34
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for ...
// See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence helper; uses eg...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/support/helpers.coffee
1
34
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } };...
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/support/helpers.coffee
1
34
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
"Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" exports.arrayEq = (a, b, msg) -> ok arrayEgal(a,b), msg or "Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}" exports.eqJS = (input, expectedOutput, msg) -> actualOutput = CoffeeScript.compile input, bare: yes .replace /^\s+|\s+$/g, '' # Tr...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8
16,577
https://github.com/jashkenas/coffeescript/blob/4e57ca6833bf1b2cd733017f7ef7db398b8d5ab8/test/support/helpers.coffee
1
34
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9
16,577
https://github.com/jashkenas/coffeescript/blob/dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9/test/support/helpers.coffee
1
32
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for ...
// See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence helper; uses eg...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9
16,577
https://github.com/jashkenas/coffeescript/blob/dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9/test/support/helpers.coffee
1
32
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } };...
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9
16,577
https://github.com/jashkenas/coffeescript/blob/dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9/test/support/helpers.coffee
1
32
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See [http://wiki.ecmascript.org/doku.php?id=harmony:egal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b...
ok egal(a, b), msg or "Expected #{reset}#{a}#{red} to equal #{reset}#{b}#{red}" exports.arrayEq = (a, b, msg) -> ok arrayEgal(a,b), msg or "Expected #{reset}#{a}#{red} to deep equal #{reset}#{b}#{red}" exports.eqJS = (input, expectedOutput, msg) -> actualOutput = CoffeeScript.compile input, bare: yes .repla...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9
16,577
https://github.com/jashkenas/coffeescript/blob/dc0fb85fd35b7f23ea99c8d8e0e984428024a3f9/test/support/helpers.coffee
1
32
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b then yes else if a instanceof Array and b instanceof ...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d
16,577
https://github.com/jashkenas/coffeescript/blob/ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d/test/support/helpers.coffee
1
21
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, ...
// See http://wiki.ecmascript.org/doku.php?id=harmony:egal var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = function(a, b) {...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d
16,577
https://github.com/jashkenas/coffeescript/blob/ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d/test/support/helpers.coffee
1
21
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See http://wiki.ecmascript.org/doku.php?id=harmony:egal var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence helper; uses ega...
# See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b then yes else if a instanceof Array and b instanceof ...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d
16,577
https://github.com/jashkenas/coffeescript/blob/ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d/test/support/helpers.coffee
1
21
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b then yes
else if a instanceof Array and b instanceof Array return no unless a.length is b.length return no for el, idx in a when not arrayEgal el, b[idx] yes exports.eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{a} to equal #{b}" exports.arrayEq = (a, b, msg) -> ok arrayEgal(a,b), msg or "Expected #{a}...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d
16,577
https://github.com/jashkenas/coffeescript/blob/ac1b2b5c30bc25d4777a7e118818f7c85cd99f4d/test/support/helpers.coffee
1
21
jashkenas/coffeescript:test/support/helpers.coffee:1:raw_corpus
raw_corpus
# See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b then yes else if a instanceof Array and b instanceof ...
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
729fec29475c66f5a917cf279ce26b141ca6cc2d
16,577
https://github.com/jashkenas/coffeescript/blob/729fec29475c66f5a917cf279ce26b141ca6cc2d/test/support/helpers.coffee
1
17
jashkenas/coffeescript:test/support/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, ...
// See http://wiki.ecmascript.org/doku.php?id=harmony:egal var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = function(a, b) {...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
729fec29475c66f5a917cf279ce26b141ca6cc2d
16,577
https://github.com/jashkenas/coffeescript/blob/729fec29475c66f5a917cf279ce26b141ca6cc2d/test/support/helpers.coffee
1
17
jashkenas/coffeescript:test/support/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // See http://wiki.ecmascript.org/doku.php?id=harmony:egal var arrayEgal, egal; egal = function(a, b) { if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a !== a && b !== b; } }; // A recursive functional equivalence helper; uses ega...
# See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence. arrayEgal = (a, b) -> if egal a, b then yes else if a instanceof Array and b instanceof ...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
729fec29475c66f5a917cf279ce26b141ca6cc2d
16,577
https://github.com/jashkenas/coffeescript/blob/729fec29475c66f5a917cf279ce26b141ca6cc2d/test/support/helpers.coffee
1
17
jashkenas/coffeescript:test/support/helpers.coffee:1:completion
completion
# See http://wiki.ecmascript.org/doku.php?id=harmony:egal egal = (a, b) -> if a is b a isnt 0 or 1/a is 1/b else a isnt a and b isnt b # A recursive functional equivalence helper; uses egal for testing equivalence.
arrayEgal = (a, b) -> if egal a, b then yes else if a instanceof Array and b instanceof Array return no unless a.length is b.length return no for el, idx in a when not arrayEgal el, b[idx] yes exports.eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{a} to equal #{b}" exports.arrayEq = (a, b, ...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/support/helpers.coffee
MIT
729fec29475c66f5a917cf279ce26b141ca6cc2d
16,577
https://github.com/jashkenas/coffeescript/blob/729fec29475c66f5a917cf279ce26b141ca6cc2d/test/support/helpers.coffee
1
17
jianliaoim/talk-os:talk-web/client/app/container.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'app-container' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDebugger: false path: Immutable.List() componentDidMount: -> window.addEventListener 'keydown', @onWindowKeydown window.addEventLis...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
34
83
jianliaoim/talk-os:talk-web/client/app/container.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'app-container' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDebugger: false path: Immutable.List() componentDidMount: -> window.addEventLi...
module.exports = React.createClass({ displayName: 'app-container', propTypes: { core: React.PropTypes.instanceOf(Immutable.Map).isRequired }, getInitialState: function() { return { showDebugger: false, path: Immutable.List() }; }, componentDidMount: function() { window.addEventLi...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
34
83
jianliaoim/talk-os:talk-web/client/app/container.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'app-container', propTypes: { core: React.PropTypes.instanceOf(Immutable.Map).isRequired }, getInitialState: function() { return { showDebugger: false, path: Immutable.List() }; }, ...
module.exports = React.createClass displayName: 'app-container' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDebugger: false path: Immutable.List() componentDidMount: -> window.addEventListener 'keydown', @onWindowKeydown window.addEventLis...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
34
83
jianliaoim/talk-os:talk-web/client/app/container.coffee:1:completion
completion
module.exports = React.createClass displayName: 'app-container' propTypes: core: React.PropTypes.instanceOf(Immutable.Map).isRequired getInitialState: -> showDebugger: false path: Immutable.List() componentDidMount: -> window.addEventListener 'keydown', @onWindowKeydown window.addEventLis...
@setState showDebugger: not @state.showDebugger event.preventDefault() onWindowFocus: (event) -> deviceActions.detectFocus true onWindowBlur: (event) -> deviceActions.detectFocus false onPopstate: (info) -> preference = @props.core.getIn ['store', 'user', 'preference'] initializeHandlers....
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
34
83
jianliaoim/talk-os:talk-web/client/app/container.coffee:2:raw_corpus
raw_corpus
skipRendering: loadingStack.size > 0 renderPage: -> store = @props.core.get 'store' router = store.get('router') _teamId = router.getIn(['data', '_teamId']) _userId = store.getIn(['user', '_id']) switch router.get('name') when 'chat', 'collection', 'favorites', 'launch', 'room', 'story', '...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
84
133
jianliaoim/talk-os:talk-web/client/app/container.coffee:2:completion
completion
skipRendering: loadingStack.size > 0 renderPage: -> store = @props.core.get 'store' router = store.get('router') _teamId = router.getIn(['data', '_teamId']) _userId = store.getIn(['user', '_id']) switch router.get('name') when 'chat', 'collection', 'favorites', 'launch', 'room', 'story', '...
ContainerWireframe sentence: loadingSentences.get(new Date()) when 'overview' Overview team: store.getIn ['teams', _teamId] stage: store.getIn ['activities', _teamId, 'stage'] contacts: store.getIn ['contacts', _teamId] invitations: store.getIn ['invitatio...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
84
133
jianliaoim/talk-os:talk-web/client/app/container.coffee:3:raw_corpus
raw_corpus
TeamWireframe team: query.teamBy store, loadingStack.first().get('_teamId') else @renderPage() else @renderPage() render: -> store = @props.core.get 'store' div className: 'app-container', NotifyCenter router: store.get('router') AppTitle() @renderAddressbar() ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
134
155
jianliaoim/talk-os:talk-web/client/app/container.coffee:3:completion
completion
TeamWireframe team: query.teamBy store, loadingStack.first().get('_teamId') else @renderPage() else @renderPage() render: -> store = @props.core.get 'store' div className: 'app-container', NotifyCenter router: store.get('router') AppTitle()
@renderAddressbar() @renderLoadingOrPage() if @state.showDebugger div className: 'devtools-layer', Devtools core: @props.core language: 'zh' width: window.innerWidth height: window.innerHeight path: @state.path onPathC...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/container.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/container.coffee
134
155
jianliaoim/talk-os:talk-web/client/actions.coffee:1:raw_corpus
raw_corpus
recorder = require 'actions-recorder' config = require './config' dispatch = recorder.dispatch # drafts # settings exports.markLogin = (status) -> dispatch 'settings/mark-login', status # device # misc exports.outdateStore = -> if not config.isGuest dispatch 'misc/outdate-store'
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions.coffee
1
19
jianliaoim/talk-os:talk-web/client/actions.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript recorder = require 'actions-recorder' config = require './config' dispatch = recorder.dispatch # drafts # settings exports.markLogin = (status) -> dispatch 'settings/mark-login', status # device # misc exports.outdateStore = -> if not config.isGuest ...
var config, dispatch, recorder; recorder = require('actions-recorder'); config = require('./config'); dispatch = recorder.dispatch; // drafts // settings exports.markLogin = function(status) { return dispatch('settings/mark-login', status); }; // device // misc exports.outdateStore = function() { if (!config...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions.coffee
1
19
jianliaoim/talk-os:talk-web/client/actions.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var config, dispatch, recorder; recorder = require('actions-recorder'); config = require('./config'); dispatch = recorder.dispatch; // drafts // settings exports.markLogin = function(status) { return dispatch('settings/mark-login', status); }; // device //...
recorder = require 'actions-recorder' config = require './config' dispatch = recorder.dispatch # drafts # settings exports.markLogin = (status) -> dispatch 'settings/mark-login', status # device # misc exports.outdateStore = -> if not config.isGuest dispatch 'misc/outdate-store'
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions.coffee
1
19
jianliaoim/talk-os:talk-web/client/actions.coffee:1:completion
completion
recorder = require 'actions-recorder' config = require './config' dispatch = recorder.dispatch # drafts # settings
exports.markLogin = (status) -> dispatch 'settings/mark-login', status # device # misc exports.outdateStore = -> if not config.isGuest dispatch 'misc/outdate-store'
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions.coffee
1
19
nevir/groc:lib/styles/default/assets/behavior.coffee:4:raw_corpus
raw_corpus
highlightMatch = (node$, queryString) -> nodeText = node$.text() lowerText = nodeText.toLowerCase() markedText = '' furthestIndex = 0 for char in queryString foundIndex = lowerText.indexOf char, furthestIndex markedText += nodeText[furthestIndex...foundIndex] + "<em>#{nodeText[foundIndex]}<...
CoffeeScript
nevir/groc
lib/styles/default/assets/behavior.coffee
MIT
291b1ecf56d55b5aa565e08645b67e5e1a3d4d73
579
https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/styles/default/assets/behavior.coffee
53
70
nevir/groc:lib/styles/default/assets/behavior.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript highlightMatch = (node$, queryString) -> nodeText = node$.text() lowerText = nodeText.toLowerCase() markedText = '' furthestIndex = 0 for char in queryString foundIndex = lowerText.indexOf char, furthestIndex markedText += nodeText[fu...
var highlightMatch; highlightMatch = function(node$, queryString) { var char, foundIndex, furthestIndex, i, len, lowerText, markedText, nodeText; nodeText = node$.text(); lowerText = nodeText.toLowerCase(); markedText = ''; furthestIndex = 0; for (i = 0, len = queryString.length; i < len; i++) { char =...
CoffeeScript
JavaScript
nevir/groc
lib/styles/default/assets/behavior.coffee
MIT
291b1ecf56d55b5aa565e08645b67e5e1a3d4d73
579
https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/styles/default/assets/behavior.coffee
53
70
nevir/groc:lib/styles/default/assets/behavior.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var highlightMatch; highlightMatch = function(node$, queryString) { var char, foundIndex, furthestIndex, i, len, lowerText, markedText, nodeText; nodeText = node$.text(); lowerText = nodeText.toLowerCase(); markedText = ''; furthestIndex = 0; for (i = ...
highlightMatch = (node$, queryString) -> nodeText = node$.text() lowerText = nodeText.toLowerCase() markedText = '' furthestIndex = 0 for char in queryString foundIndex = lowerText.indexOf char, furthestIndex markedText += nodeText[furthestIndex...foundIndex] + "<em>#{nodeText[foundIndex]}<...
JavaScript
CoffeeScript
nevir/groc
lib/styles/default/assets/behavior.coffee
MIT
291b1ecf56d55b5aa565e08645b67e5e1a3d4d73
579
https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/styles/default/assets/behavior.coffee
53
70
nevir/groc:lib/styles/default/assets/behavior.coffee:4:completion
completion
highlightMatch = (node$, queryString) -> nodeText = node$.text() lowerText = nodeText.toLowerCase() markedText = '' furthestIndex = 0 for char in queryString foundIndex = lowerText.indexOf char, furthestIndex
markedText += nodeText[furthestIndex...foundIndex] + "<em>#{nodeText[foundIndex]}</em>" furthestIndex = foundIndex + 1 node$.html markedText + nodeText[furthestIndex...] #################### # DOM Construction # ####################
CoffeeScript
CoffeeScript
nevir/groc
lib/styles/default/assets/behavior.coffee
MIT
291b1ecf56d55b5aa565e08645b67e5e1a3d4d73
579
https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/styles/default/assets/behavior.coffee
53
70
octoblu/meshblu:lib/logError.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => return if error?.message == 'Device not found' console.error.apply console, arguments return unless _.isError error @airbr...
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
142dbea049048cb4227aa97742f176d0db973382
815
https://github.com/octoblu/meshblu/blob/142dbea049048cb4227aa97742f176d0db973382/lib/logError.coffee
1
16
octoblu/meshblu:lib/logError.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => return if error?.message == 'Device not found' console.error.apply consol...
var LogError, _, logError; _ = require('lodash'); LogError = class LogError { constructor() { this.log = this.log.bind(this); if (process.env.AIRBRAKE_KEY) { this.airbrake = require('airbrake').createClient(process.env.AIRBRAKE_KEY); } } log(error) { var ref; if ((error != null ? erro...
CoffeeScript
JavaScript
octoblu/meshblu
lib/logError.coffee
MIT
142dbea049048cb4227aa97742f176d0db973382
815
https://github.com/octoblu/meshblu/blob/142dbea049048cb4227aa97742f176d0db973382/lib/logError.coffee
1
16
octoblu/meshblu:lib/logError.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LogError, _, logError; _ = require('lodash'); LogError = class LogError { constructor() { this.log = this.log.bind(this); if (process.env.AIRBRAKE_KEY) { this.airbrake = require('airbrake').createClient(process.env.AIRBRAKE_KEY); } } ...
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => return if error?.message == 'Device not found' console.error.apply console, arguments return unless _.isError error @airbr...
JavaScript
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
142dbea049048cb4227aa97742f176d0db973382
815
https://github.com/octoblu/meshblu/blob/142dbea049048cb4227aa97742f176d0db973382/lib/logError.coffee
1
16
octoblu/meshblu:lib/logError.coffee:1:completion
completion
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) =>
return if error?.message == 'Device not found' console.error.apply console, arguments return unless _.isError error @airbrake?.notify error console.error error.stack logError = new LogError() module.exports = logError.log
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
142dbea049048cb4227aa97742f176d0db973382
815
https://github.com/octoblu/meshblu/blob/142dbea049048cb4227aa97742f176d0db973382/lib/logError.coffee
1
16
octoblu/meshblu:lib/logError.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => console.error.apply console, arguments if _.isError error @airbrake?.notify error console.error error.stack logError ...
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
25cced882d2c303f0b9bf24df48a75ccb1caee46
815
https://github.com/octoblu/meshblu/blob/25cced882d2c303f0b9bf24df48a75ccb1caee46/lib/logError.coffee
1
15
octoblu/meshblu:lib/logError.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => console.error.apply console, arguments if _.isError error @airbrake...
var LogError, _, logError; _ = require('lodash'); LogError = class LogError { constructor() { this.log = this.log.bind(this); if (process.env.AIRBRAKE_KEY) { this.airbrake = require('airbrake').createClient(process.env.AIRBRAKE_KEY); } } log(error) { var ref; console.error.apply(conso...
CoffeeScript
JavaScript
octoblu/meshblu
lib/logError.coffee
MIT
25cced882d2c303f0b9bf24df48a75ccb1caee46
815
https://github.com/octoblu/meshblu/blob/25cced882d2c303f0b9bf24df48a75ccb1caee46/lib/logError.coffee
1
15
octoblu/meshblu:lib/logError.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LogError, _, logError; _ = require('lodash'); LogError = class LogError { constructor() { this.log = this.log.bind(this); if (process.env.AIRBRAKE_KEY) { this.airbrake = require('airbrake').createClient(process.env.AIRBRAKE_KEY); } } ...
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => console.error.apply console, arguments if _.isError error @airbrake?.notify error console.error error.stack logError ...
JavaScript
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
25cced882d2c303f0b9bf24df48a75ccb1caee46
815
https://github.com/octoblu/meshblu/blob/25cced882d2c303f0b9bf24df48a75ccb1caee46/lib/logError.coffee
1
15
octoblu/meshblu:lib/logError.coffee:1:completion
completion
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY
log: (error) => console.error.apply console, arguments if _.isError error @airbrake?.notify error console.error error.stack logError = new LogError() module.exports = logError.log
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
25cced882d2c303f0b9bf24df48a75ccb1caee46
815
https://github.com/octoblu/meshblu/blob/25cced882d2c303f0b9bf24df48a75ccb1caee46/lib/logError.coffee
1
15
octoblu/meshblu:lib/logError.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => @airbrake?.notify error console.error.apply console, arguments console.error error.stack if _.isError error logError = new Lo...
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
1b93806a9321e5dda42d3d937968cab3d88ac39e
815
https://github.com/octoblu/meshblu/blob/1b93806a9321e5dda42d3d937968cab3d88ac39e/lib/logError.coffee
1
14
octoblu/meshblu:lib/logError.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => @airbrake?.notify error console.error.apply console, arguments consol...
var LogError, _, logError; _ = require('lodash'); LogError = class LogError { constructor() { this.log = this.log.bind(this); if (process.env.AIRBRAKE_KEY) { this.airbrake = require('airbrake').createClient(process.env.AIRBRAKE_KEY); } } log(error) { var ref; if ((ref = this.airbrake)...
CoffeeScript
JavaScript
octoblu/meshblu
lib/logError.coffee
MIT
1b93806a9321e5dda42d3d937968cab3d88ac39e
815
https://github.com/octoblu/meshblu/blob/1b93806a9321e5dda42d3d937968cab3d88ac39e/lib/logError.coffee
1
14
octoblu/meshblu:lib/logError.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LogError, _, logError; _ = require('lodash'); LogError = class LogError { constructor() { this.log = this.log.bind(this); if (process.env.AIRBRAKE_KEY) { this.airbrake = require('airbrake').createClient(process.env.AIRBRAKE_KEY); } } ...
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY log: (error) => @airbrake?.notify error console.error.apply console, arguments console.error error.stack if _.isError error logError = new Lo...
JavaScript
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
1b93806a9321e5dda42d3d937968cab3d88ac39e
815
https://github.com/octoblu/meshblu/blob/1b93806a9321e5dda42d3d937968cab3d88ac39e/lib/logError.coffee
1
14