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
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') ...
suite('Creating XML with string writer:', function() { test('Plain text writer', function() { return eq(xml('root').dtd('hello.dtd').ins('pub_border', 'thin').ele('img', 'EMPTY').att('img', 'height', 'CDATA', '#REQUIRED').not('fs', { sysID: 'http://my.fs.com/reader' }).ent('ent', 'my val').pent('ent', '...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
63d51436618d67eee703abc4c720a732d13036ee
926
https://github.com/oozcitak/xmlbuilder-js/blob/63d51436618d67eee703abc4c720a732d13036ee/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Creating XML with string writer:', function() { test('Plain text writer', function() { return eq(xml('root').dtd('hello.dtd').ins('pub_border', 'thin').ele('img', 'EMPTY').att('img', 'height', 'CDATA', '#REQUIRED').not('fs', { sysID: 'http://my.f...
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
63d51436618d67eee703abc4c720a732d13036ee
926
https://github.com/oozcitak/xmlbuilder-js/blob/63d51436618d67eee703abc4c720a732d13036ee/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:completion
completion
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
<?pub_border thin ?> <!ELEMENT img EMPTY > <!ATTLIST img height CDATA #REQUIRED > <!NOTATION fs SYSTEM "http://my.fs.com/reader" > <!ENTITY ent "my val" > <!ENTITY % ent "my val" > ] > <root> <?a b ?> <xmlbuilder /> </root> """ ) tes...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
63d51436618d67eee703abc4c720a732d13036ee
926
https://github.com/oozcitak/xmlbuilder-js/blob/63d51436618d67eee703abc4c720a732d13036ee/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:raw_corpus
raw_corpus
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
66c7de90d77216db2667a707bd615be5a55f441d
926
https://github.com/oozcitak/xmlbuilder-js/blob/66c7de90d77216db2667a707bd615be5a55f441d/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') ...
suite('Creating XML with string writer:', function() { test('Plain text writer', function() { return eq(xml('root').dtd('hello.dtd').ins('pub_border', 'thin').ele('img', 'EMPTY').att('img', 'height', 'CDATA', '#REQUIRED').not('fs', { sysID: 'http://my.fs.com/reader' }).ent('ent', 'my val').pent('ent', '...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
66c7de90d77216db2667a707bd615be5a55f441d
926
https://github.com/oozcitak/xmlbuilder-js/blob/66c7de90d77216db2667a707bd615be5a55f441d/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Creating XML with string writer:', function() { test('Plain text writer', function() { return eq(xml('root').dtd('hello.dtd').ins('pub_border', 'thin').ele('img', 'EMPTY').att('img', 'height', 'CDATA', '#REQUIRED').not('fs', { sysID: 'http://my.f...
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
66c7de90d77216db2667a707bd615be5a55f441d
926
https://github.com/oozcitak/xmlbuilder-js/blob/66c7de90d77216db2667a707bd615be5a55f441d/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:completion
completion
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
<?pub_border thin ?> <!ELEMENT img EMPTY > <!ATTLIST img height CDATA #REQUIRED > <!NOTATION fs SYSTEM "http://my.fs.com/reader" > <!ENTITY ent "my val" > <!ENTITY % ent "my val" > ] > <root> <?a b ?> <xmlbuilder /> </root> """ ) tes...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
66c7de90d77216db2667a707bd615be5a55f441d
926
https://github.com/oozcitak/xmlbuilder-js/blob/66c7de90d77216db2667a707bd615be5a55f441d/test/issues/157.coffee
1
39
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:raw_corpus
raw_corpus
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
d50956674dbbf940149f9a8386b2fbe8780daab4
926
https://github.com/oozcitak/xmlbuilder-js/blob/d50956674dbbf940149f9a8386b2fbe8780daab4/test/issues/157.coffee
1
32
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') ...
suite('Creating XML with string writer:', function() { return test('Plain text writer', function() { return eq(xml('root').dtd('hello.dtd').ins('pub_border', 'thin').ele('img', 'EMPTY').att('img', 'height', 'CDATA', '#REQUIRED').not('fs', { sysID: 'http://my.fs.com/reader' }).ent('ent', 'my val').pent('...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
d50956674dbbf940149f9a8386b2fbe8780daab4
926
https://github.com/oozcitak/xmlbuilder-js/blob/d50956674dbbf940149f9a8386b2fbe8780daab4/test/issues/157.coffee
1
32
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Creating XML with string writer:', function() { return test('Plain text writer', function() { return eq(xml('root').dtd('hello.dtd').ins('pub_border', 'thin').ele('img', 'EMPTY').att('img', 'height', 'CDATA', '#REQUIRED').not('fs', { sysID: 'http...
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
d50956674dbbf940149f9a8386b2fbe8780daab4
926
https://github.com/oozcitak/xmlbuilder-js/blob/d50956674dbbf940149f9a8386b2fbe8780daab4/test/issues/157.coffee
1
32
oozcitak/xmlbuilder-js:test/issues/157.coffee:1:completion
completion
suite 'Creating XML with string writer:', -> test 'Plain text writer', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .att('img', 'height', 'CDATA', '#REQUIRED') .not('fs', { sysID: 'http://my.fs.com/reader' }) ...
""" <?xml version="1.0" ?> <!DOCTYPE root SYSTEM "hello.dtd" [ <?pub_border thin ?> <!ELEMENT img EMPTY > <!ATTLIST img height CDATA #REQUIRED > <!NOTATION fs SYSTEM "http://my.fs.com/reader" > <!ENTITY ent "my val" > <!ENTITY % ent "my val" > ] > ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/157.coffee
MIT
d50956674dbbf940149f9a8386b2fbe8780daab4
926
https://github.com/oozcitak/xmlbuilder-js/blob/d50956674dbbf940149f9a8386b2fbe8780daab4/test/issues/157.coffee
1
32
Pagedraw/pagedraw:src/eval-pdom.coffee:1:raw_corpus
raw_corpus
TypeChecked = ((specs) -> _l.mapValues specs, (pred, name_of_expected_type) -> (val) -> if pred(val) == false then throw new Error("#{val} is not a #{name_of_expected_type}") else return val ) { string: _l.isString number: _l.isNumber boolean: _l.isBoolean list: (v) -> v?.map? # ensu...
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
11
24
Pagedraw/pagedraw:src/eval-pdom.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript TypeChecked = ((specs) -> _l.mapValues specs, (pred, name_of_expected_type) -> (val) -> if pred(val) == false then throw new Error("#{val} is not a #{name_of_expected_type}") else return val ) { string: _l.isString number: _l.isNumber ...
var TypeChecked, global_eval; TypeChecked = (function(specs) { return _l.mapValues(specs, function(pred, name_of_expected_type) { return function(val) { if (pred(val) === false) { throw new Error(`${val} is not a ${name_of_expected_type}`); } else { return val; } }; }); })...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
11
24
Pagedraw/pagedraw:src/eval-pdom.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TypeChecked, global_eval; TypeChecked = (function(specs) { return _l.mapValues(specs, function(pred, name_of_expected_type) { return function(val) { if (pred(val) === false) { throw new Error(`${val} is not a ${name_of_expected_type}`); ...
TypeChecked = ((specs) -> _l.mapValues specs, (pred, name_of_expected_type) -> (val) -> if pred(val) == false then throw new Error("#{val} is not a #{name_of_expected_type}") else return val ) { string: _l.isString number: _l.isNumber boolean: _l.isBoolean list: (v) -> v?.map? # ensu...
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
11
24
Pagedraw/pagedraw:src/eval-pdom.coffee:1:completion
completion
TypeChecked = ((specs) -> _l.mapValues specs, (pred, name_of_expected_type) -> (val) -> if pred(val) == false then throw new Error("#{val} is not a #{name_of_expected_type}") else return val ) { string: _l.isString number: _l.isNumber
boolean: _l.isBoolean list: (v) -> v?.map? # ensure v is list-ish, as defined by implementing .map any: -> true } # http://perfectionkills.com/global-eval-what-are-the-options/ global_eval = eval
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
11
24
Pagedraw/pagedraw:src/eval-pdom.coffee:2:raw_corpus
raw_corpus
evalJsonDynamic = (value, scope, evalCode) -> if value instanceof Dynamic then evalCode(value.code, scope) else if _l.isArray value then value.map (v) -> evalJsonDynamic(v, scope, evalCode) else if _l.isPlainObject value then _l.mapValues value, (v) -> evalJsonDynamic(v, scope, evalCode) else value
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
26
30
Pagedraw/pagedraw:src/eval-pdom.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript evalJsonDynamic = (value, scope, evalCode) -> if value instanceof Dynamic then evalCode(value.code, scope) else if _l.isArray value then value.map (v) -> evalJsonDynamic(v, scope, evalCode) else if _l.isPlainObject value then _l.mapValues value, (v) -...
var evalJsonDynamic; evalJsonDynamic = function(value, scope, evalCode) { if (value instanceof Dynamic) { return evalCode(value.code, scope); } else if (_l.isArray(value)) { return value.map(function(v) { return evalJsonDynamic(v, scope, evalCode); }); } else if (_l.isPlainObject(value)) { ...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
26
30
Pagedraw/pagedraw:src/eval-pdom.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var evalJsonDynamic; evalJsonDynamic = function(value, scope, evalCode) { if (value instanceof Dynamic) { return evalCode(value.code, scope); } else if (_l.isArray(value)) { return value.map(function(v) { return evalJsonDynamic(v, scope, evalCode...
evalJsonDynamic = (value, scope, evalCode) -> if value instanceof Dynamic then evalCode(value.code, scope) else if _l.isArray value then value.map (v) -> evalJsonDynamic(v, scope, evalCode) else if _l.isPlainObject value then _l.mapValues value, (v) -> evalJsonDynamic(v, scope, evalCode) else value
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
26
30
Pagedraw/pagedraw:src/eval-pdom.coffee:2:completion
completion
evalJsonDynamic = (value, scope, evalCode) -> if value instanceof Dynamic then evalCode(value.code, scope)
else if _l.isArray value then value.map (v) -> evalJsonDynamic(v, scope, evalCode) else if _l.isPlainObject value then _l.mapValues value, (v) -> evalJsonDynamic(v, scope, evalCode) else value
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
26
30
Pagedraw/pagedraw:src/eval-pdom.coffee:3:raw_corpus
raw_corpus
module.exports = (pdom, getCompiledComponentByUniqueKey, language, page_width, allow_external_code = false) -> evalInScope = (code, scope) -> throw new Error("Empty dynamicable attribute") if _l.isEmpty code [args, values] = _l.zip _l.toPairs(_l.omit(scope, 'this'))... args ?= []; values ?=...
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
33
82
Pagedraw/pagedraw:src/eval-pdom.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (pdom, getCompiledComponentByUniqueKey, language, page_width, allow_external_code = false) -> evalInScope = (code, scope) -> throw new Error("Empty dynamicable attribute") if _l.isEmpty code [args, values] = _l.zip _l.toPairs...
module.exports = function(pdom, getCompiledComponentByUniqueKey, language, page_width, allow_external_code = false) { var compile_coffee_expression, createScope, evalCode, evalInScope, extendScope; evalInScope = function(code, scope) { var args, values; if (_l.isEmpty(code)) { throw new Error("Empty d...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
33
82
Pagedraw/pagedraw:src/eval-pdom.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(pdom, getCompiledComponentByUniqueKey, language, page_width, allow_external_code = false) { var compile_coffee_expression, createScope, evalCode, evalInScope, extendScope; evalInScope = function(code, scope) { var args, values; ...
module.exports = (pdom, getCompiledComponentByUniqueKey, language, page_width, allow_external_code = false) -> evalInScope = (code, scope) -> throw new Error("Empty dynamicable attribute") if _l.isEmpty code [args, values] = _l.zip _l.toPairs(_l.omit(scope, 'this'))... args ?= []; values ?=...
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
33
82
Pagedraw/pagedraw:src/eval-pdom.coffee:3:completion
completion
module.exports = (pdom, getCompiledComponentByUniqueKey, language, page_width, allow_external_code = false) -> evalInScope = (code, scope) -> throw new Error("Empty dynamicable attribute") if _l.isEmpty code [args, values] = _l.zip _l.toPairs(_l.omit(scope, 'this'))... args ?= []; values ?=...
evalCode: (code, scope) -> evalInScope("return #{code};", scope) when 'CJSX' # coffeescript support {compile_coffee_expression} = require './frontend/coffee-compiler' createScope: (var_name_to_val) -> if config.supportPropsOrStateInEvalForIns...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
33
82
Pagedraw/pagedraw:src/eval-pdom.coffee:4:raw_corpus
raw_corpus
# evalPdom :: Pdom -> Data -> [Pdom] _evalPdom = (pdom, scope, max_stack_depth = 500) -> evalPdom = (_pdom, _scope) -> try throw new Error("max component depth exceeded") if max_stack_depth < 1 _evalPdom(_pdom, _scope, max_stack_depth - 1) catch e ...
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
83
132
Pagedraw/pagedraw:src/eval-pdom.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # evalPdom :: Pdom -> Data -> [Pdom] _evalPdom = (pdom, scope, max_stack_depth = 500) -> evalPdom = (_pdom, _scope) -> try throw new Error("max component depth exceeded") if max_stack_depth < 1 _evalPdom(_pd...
// evalPdom :: Pdom -> Data -> [Pdom] var _evalPdom; _evalPdom = function(pdom, scope, max_stack_depth = 500) { var evalPdom; evalPdom = function(_pdom, _scope) { var e; try { if (max_stack_depth < 1) { throw new Error("max component depth exceeded"); } return _evalPdom(_pdom, _sc...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
83
132
Pagedraw/pagedraw:src/eval-pdom.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // evalPdom :: Pdom -> Data -> [Pdom] var _evalPdom; _evalPdom = function(pdom, scope, max_stack_depth = 500) { var evalPdom; evalPdom = function(_pdom, _scope) { var e; try { if (max_stack_depth < 1) { throw new Error("max component dept...
# evalPdom :: Pdom -> Data -> [Pdom] _evalPdom = (pdom, scope, max_stack_depth = 500) -> evalPdom = (_pdom, _scope) -> try throw new Error("max component depth exceeded") if max_stack_depth < 1 _evalPdom(_pdom, _scope, max_stack_depth - 1) catch e ...
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
83
132
Pagedraw/pagedraw:src/eval-pdom.coffee:4:completion
completion
# evalPdom :: Pdom -> Data -> [Pdom] _evalPdom = (pdom, scope, max_stack_depth = 500) -> evalPdom = (_pdom, _scope) -> try throw new Error("max component depth exceeded") if max_stack_depth < 1 _evalPdom(_pdom, _scope, max_stack_depth - 1) catch e ...
if pdom.tag == 'showIf' assert -> _l.every(k in ['tag', 'show_if', 'backingBlock', 'children'] for k in _l.keys pdom) if TypeChecked.boolean evalCode(pdom.show_if, scope) # we only expect pdom.children.length == 1, I think _l.flatMap pdom.children, (child) -> eval...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
83
132
Pagedraw/pagedraw:src/eval-pdom.coffee:5:raw_corpus
raw_corpus
# Function calls (!) else if pdom_tag_is_component(pdom.tag) componentBody = getCompiledComponentByUniqueKey(pdom.tag.uniqueKey) functionBodyScope = createScope evalJsonDynamic(pdom.props, scope, evalCode) evalPdom(componentBody, functionBodyScope) else e...
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
133
157
Pagedraw/pagedraw:src/eval-pdom.coffee:5:completion
completion
# Function calls (!) else if pdom_tag_is_component(pdom.tag) componentBody = getCompiledComponentByUniqueKey(pdom.tag.uniqueKey) functionBodyScope = createScope evalJsonDynamic(pdom.props, scope, evalCode) evalPdom(componentBody, functionBodyScope) else e...
typeChecker = ((typeCheckers) -> typeCheckers[prop] ? TypeChecked.any) { textContent: TypeChecked.string } typeChecker evalJsonDynamic(value, scope, evalCode) [evaled_pdom] # evalPdom must take as input a pdom who, when evaled, returns a...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/eval-pdom.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/eval-pdom.coffee
133
157
hipchat/hubot-hipchat:src/test.coffee:1:raw_corpus
raw_corpus
user = id: 1, name: "yannick" oldUser = role: "lol", name: "bob" for key, value of oldUser unless key of user user[key] = value console.log user, oldUser
CoffeeScript
hipchat/hubot-hipchat
src/test.coffee
MIT
19199efee35815b32ed8a1c7f6156c80ddda36b9
661
https://github.com/hipchat/hubot-hipchat/blob/19199efee35815b32ed8a1c7f6156c80ddda36b9/src/test.coffee
1
6
hipchat/hubot-hipchat:src/test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript user = id: 1, name: "yannick" oldUser = role: "lol", name: "bob" for key, value of oldUser unless key of user user[key] = value console.log user, oldUser ```
var key, oldUser, user, value; user = { id: 1, name: "yannick" }; oldUser = { role: "lol", name: "bob" }; for (key in oldUser) { value = oldUser[key]; if (!(key in user)) { user[key] = value; } } console.log(user, oldUser);
CoffeeScript
JavaScript
hipchat/hubot-hipchat
src/test.coffee
MIT
19199efee35815b32ed8a1c7f6156c80ddda36b9
661
https://github.com/hipchat/hubot-hipchat/blob/19199efee35815b32ed8a1c7f6156c80ddda36b9/src/test.coffee
1
6
hipchat/hubot-hipchat:src/test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var key, oldUser, user, value; user = { id: 1, name: "yannick" }; oldUser = { role: "lol", name: "bob" }; for (key in oldUser) { value = oldUser[key]; if (!(key in user)) { user[key] = value; } } console.log(user, oldUser); ```
user = id: 1, name: "yannick" oldUser = role: "lol", name: "bob" for key, value of oldUser unless key of user user[key] = value console.log user, oldUser
JavaScript
CoffeeScript
hipchat/hubot-hipchat
src/test.coffee
MIT
19199efee35815b32ed8a1c7f6156c80ddda36b9
661
https://github.com/hipchat/hubot-hipchat/blob/19199efee35815b32ed8a1c7f6156c80ddda36b9/src/test.coffee
1
6
hipchat/hubot-hipchat:src/test.coffee:1:completion
completion
user = id: 1, name: "yannick" oldUser = role: "lol", name: "bob" for key, value of oldUser
unless key of user user[key] = value console.log user, oldUser
CoffeeScript
CoffeeScript
hipchat/hubot-hipchat
src/test.coffee
MIT
19199efee35815b32ed8a1c7f6156c80ddda36b9
661
https://github.com/hipchat/hubot-hipchat/blob/19199efee35815b32ed8a1c7f6156c80ddda36b9/src/test.coffee
1
6
lmaccherone/node-localstorage:test/no-tostring-test.coffee:1:raw_corpus
raw_corpus
{LocalStorage} = require('../') tape = require('tape') tape('use key without toString', (test) => localStorage = new LocalStorage('./scratch11') test.doesNotThrow(() => localStorage.setItem(null, 'foo')) test.doesNotThrow(() => localStorage.setItem(undefined, 'bar')) test.equal(localStorage.getItem('null'), ...
CoffeeScript
lmaccherone/node-localstorage
test/no-tostring-test.coffee
MIT
23eff752dc603ad9559c50739589d3ec673c07f7
460
https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/no-tostring-test.coffee
1
28
lmaccherone/node-localstorage:test/no-tostring-test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {LocalStorage} = require('../') tape = require('tape') tape('use key without toString', (test) => localStorage = new LocalStorage('./scratch11') test.doesNotThrow(() => localStorage.setItem(null, 'foo')) test.doesNotThrow(() => localStorage.setItem(undefi...
var LocalStorage, tape; ({LocalStorage} = require('../')); tape = require('tape'); tape('use key without toString', (test) => { var localStorage; localStorage = new LocalStorage('./scratch11'); test.doesNotThrow(() => { return localStorage.setItem(null, 'foo'); }); test.doesNotThrow(() => { return ...
CoffeeScript
JavaScript
lmaccherone/node-localstorage
test/no-tostring-test.coffee
MIT
23eff752dc603ad9559c50739589d3ec673c07f7
460
https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/no-tostring-test.coffee
1
28
lmaccherone/node-localstorage:test/no-tostring-test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LocalStorage, tape; ({LocalStorage} = require('../')); tape = require('tape'); tape('use key without toString', (test) => { var localStorage; localStorage = new LocalStorage('./scratch11'); test.doesNotThrow(() => { return localStorage.setItem(null...
{LocalStorage} = require('../') tape = require('tape') tape('use key without toString', (test) => localStorage = new LocalStorage('./scratch11') test.doesNotThrow(() => localStorage.setItem(null, 'foo')) test.doesNotThrow(() => localStorage.setItem(undefined, 'bar')) test.equal(localStorage.getItem('null'), ...
JavaScript
CoffeeScript
lmaccherone/node-localstorage
test/no-tostring-test.coffee
MIT
23eff752dc603ad9559c50739589d3ec673c07f7
460
https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/no-tostring-test.coffee
1
28
lmaccherone/node-localstorage:test/no-tostring-test.coffee:1:completion
completion
{LocalStorage} = require('../') tape = require('tape') tape('use key without toString', (test) => localStorage = new LocalStorage('./scratch11') test.doesNotThrow(() => localStorage.setItem(null, 'foo')) test.doesNotThrow(() => localStorage.setItem(undefined, 'bar')) test.equal(localStorage.getItem('null'), ...
) tape('set value without toString', (test) => localStorage = new LocalStorage('./scratch12') test.doesNotThrow(() => localStorage.setItem('foo', null)) test.doesNotThrow(() => localStorage.setItem('bar', undefined)) test.equal(localStorage.getItem('foo'), 'null') test.equal(localStorage.getItem('bar'), 'u...
CoffeeScript
CoffeeScript
lmaccherone/node-localstorage
test/no-tostring-test.coffee
MIT
23eff752dc603ad9559c50739589d3ec673c07f7
460
https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/no-tostring-test.coffee
1
28
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:raw_corpus
raw_corpus
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type = null) -> @combo.showExclamation word, type if @com...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/combo-api.coffee
1
30
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type...
var ComboApi; module.exports = ComboApi = class ComboApi { constructor(comboRenderer) { this.combo = comboRenderer; } increase(n = 1) { if (this.combo.isEnable) { return this.combo.modifyStreak(n); } } decrease(n = 1) { if (this.combo.isEnable) { return this.combo.modifyStreak(-...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/combo-api.coffee
1
30
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ComboApi; module.exports = ComboApi = class ComboApi { constructor(comboRenderer) { this.combo = comboRenderer; } increase(n = 1) { if (this.combo.isEnable) { return this.combo.modifyStreak(n); } } decrease(n = 1) { if (this.c...
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type = null) -> @combo.showExclamation word, type if @com...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/combo-api.coffee
1
30
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:completion
completion
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type = null) -> @combo.showExclamation word, type if @com...
getLevel: -> if @combo.isEnable @combo.getLevel() else null getCurrentStreak: -> if @combo.isEnable @combo.getCurrentStreak() else null isEnable: -> @combo.isEnable
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/combo-api.coffee
1
30
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:raw_corpus
raw_corpus
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type = null) -> @combo.showExclamation word, type if @com...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b/lib/service/combo-api.coffee
1
24
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type...
var ComboApi; module.exports = ComboApi = class ComboApi { constructor(comboRenderer) { this.combo = comboRenderer; } increase(n = 1) { if (this.combo.isEnable) { return this.combo.modifyStreak(n); } } decrease(n = 1) { if (this.combo.isEnable) { return this.combo.modifyStreak(-...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b/lib/service/combo-api.coffee
1
24
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ComboApi; module.exports = ComboApi = class ComboApi { constructor(comboRenderer) { this.combo = comboRenderer; } increase(n = 1) { if (this.combo.isEnable) { return this.combo.modifyStreak(n); } } decrease(n = 1) { if (this.c...
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type = null) -> @combo.showExclamation word, type if @com...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b/lib/service/combo-api.coffee
1
24
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:completion
completion
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n if @combo.isEnable decrease: (n = 1) -> @combo.modifyStreak(-n) if @combo.isEnable exclame: (word = null, type = null) -> @combo.showExclamation word, type if @com...
resetCounter: -> @combo.resetCounter() if @combo.isEnable getLevel: -> if @combo.isEnable @combo.getLevel() else null isEnable: -> @combo.isEnable
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/1ebbd9a89ce7af7b088e28b300cad6c8cbb9c73b/lib/service/combo-api.coffee
1
24
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:raw_corpus
raw_corpus
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n decrease: (n = 1) -> @combo.modifyStreak(-n) exclame: (word = null, type = null) -> @combo.showExclamation word, type resetCounter: -> @combo.resetCounter()...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
d93bec39716b63f2b8f35b88a7e01c1a547215fc
3,570
https://github.com/JoelBesada/activate-power-mode/blob/d93bec39716b63f2b8f35b88a7e01c1a547215fc/lib/service/combo-api.coffee
1
18
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n decrease: (n = 1) -> @combo.modifyStreak(-n) exclame: (word = null, type = null) -> @combo.showExclamation...
var ComboApi; module.exports = ComboApi = class ComboApi { constructor(comboRenderer) { this.combo = comboRenderer; } increase(n = 1) { return this.combo.modifyStreak(n); } decrease(n = 1) { return this.combo.modifyStreak(-n); } exclame(word = null, type = null) { return this.combo.sho...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
d93bec39716b63f2b8f35b88a7e01c1a547215fc
3,570
https://github.com/JoelBesada/activate-power-mode/blob/d93bec39716b63f2b8f35b88a7e01c1a547215fc/lib/service/combo-api.coffee
1
18
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ComboApi; module.exports = ComboApi = class ComboApi { constructor(comboRenderer) { this.combo = comboRenderer; } increase(n = 1) { return this.combo.modifyStreak(n); } decrease(n = 1) { return this.combo.modifyStreak(-n); } exclam...
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n decrease: (n = 1) -> @combo.modifyStreak(-n) exclame: (word = null, type = null) -> @combo.showExclamation word, type resetCounter: -> @combo.resetCounter()...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
d93bec39716b63f2b8f35b88a7e01c1a547215fc
3,570
https://github.com/JoelBesada/activate-power-mode/blob/d93bec39716b63f2b8f35b88a7e01c1a547215fc/lib/service/combo-api.coffee
1
18
JoelBesada/activate-power-mode:lib/service/combo-api.coffee:1:completion
completion
module.exports = class ComboApi constructor: (comboRenderer) -> @combo = comboRenderer increase: (n = 1) -> @combo.modifyStreak n decrease: (n = 1) -> @combo.modifyStreak(-n)
exclame: (word = null, type = null) -> @combo.showExclamation word, type resetCounter: -> @combo.resetCounter() getLevel: -> @combo.getLevel()
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/combo-api.coffee
MIT
d93bec39716b63f2b8f35b88a7e01c1a547215fc
3,570
https://github.com/JoelBesada/activate-power-mode/blob/d93bec39716b63f2b8f35b88a7e01c1a547215fc/lib/service/combo-api.coffee
1
18
hipchat/hubot-hipchat:src/util.coffee:1:raw_corpus
raw_corpus
{object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of orig mod = require name if quiet console[k] = v for ...
CoffeeScript
hipchat/hubot-hipchat
src/util.coffee
MIT
08fa936f640a515fed75785b464f5de3b34aa9c2
661
https://github.com/hipchat/hubot-hipchat/blob/08fa936f640a515fed75785b464f5de3b34aa9c2/src/util.coffee
1
12
hipchat/hubot-hipchat:src/util.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of ori...
var object, hasProp = {}.hasOwnProperty; ({object} = require("underscore")); // Suppresses any console messages generated while requiring a module // when quiet is truthy exports.require = function(name, quiet) { var k, mod, orig, v; if (quiet) { orig = object((function() { var results; results ...
CoffeeScript
JavaScript
hipchat/hubot-hipchat
src/util.coffee
MIT
08fa936f640a515fed75785b464f5de3b34aa9c2
661
https://github.com/hipchat/hubot-hipchat/blob/08fa936f640a515fed75785b464f5de3b34aa9c2/src/util.coffee
1
12
hipchat/hubot-hipchat:src/util.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var object, hasProp = {}.hasOwnProperty; ({object} = require("underscore")); // Suppresses any console messages generated while requiring a module // when quiet is truthy exports.require = function(name, quiet) { var k, mod, orig, v; if (quiet) { orig =...
{object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of orig mod = require name if quiet console[k] = v for ...
JavaScript
CoffeeScript
hipchat/hubot-hipchat
src/util.coffee
MIT
08fa936f640a515fed75785b464f5de3b34aa9c2
661
https://github.com/hipchat/hubot-hipchat/blob/08fa936f640a515fed75785b464f5de3b34aa9c2/src/util.coffee
1
12
hipchat/hubot-hipchat:src/util.coffee:1:completion
completion
{object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet
orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of orig mod = require name if quiet console[k] = v for own k, v of orig mod
CoffeeScript
CoffeeScript
hipchat/hubot-hipchat
src/util.coffee
MIT
08fa936f640a515fed75785b464f5de3b34aa9c2
661
https://github.com/hipchat/hubot-hipchat/blob/08fa936f640a515fed75785b464f5de3b34aa9c2/src/util.coffee
1
12
hipchat/hubot-hipchat:src/util.coffee:1:raw_corpus
raw_corpus
{object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of orig mod = require name if quiet console[k] = v for ...
CoffeeScript
hipchat/hubot-hipchat
src/util.coffee
MIT
ff563b3b40801859636029181ca8cb77a655e476
661
https://github.com/hipchat/hubot-hipchat/blob/ff563b3b40801859636029181ca8cb77a655e476/src/util.coffee
1
14
hipchat/hubot-hipchat:src/util.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of ori...
var object, words, hasProp = {}.hasOwnProperty; ({object} = require("underscore")); // Suppresses any console messages generated while requiring a module // when quiet is truthy exports.require = function(name, quiet) { var k, mod, orig, v; if (quiet) { orig = object((function() { var results; r...
CoffeeScript
JavaScript
hipchat/hubot-hipchat
src/util.coffee
MIT
ff563b3b40801859636029181ca8cb77a655e476
661
https://github.com/hipchat/hubot-hipchat/blob/ff563b3b40801859636029181ca8cb77a655e476/src/util.coffee
1
14
hipchat/hubot-hipchat:src/util.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var object, words, hasProp = {}.hasOwnProperty; ({object} = require("underscore")); // Suppresses any console messages generated while requiring a module // when quiet is truthy exports.require = function(name, quiet) { var k, mod, orig, v; if (quiet) { ...
{object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console) console[k] = (->) for own k, v of orig mod = require name if quiet console[k] = v for ...
JavaScript
CoffeeScript
hipchat/hubot-hipchat
src/util.coffee
MIT
ff563b3b40801859636029181ca8cb77a655e476
661
https://github.com/hipchat/hubot-hipchat/blob/ff563b3b40801859636029181ca8cb77a655e476/src/util.coffee
1
14
hipchat/hubot-hipchat:src/util.coffee:1:completion
completion
{object} = require "underscore" # Suppresses any console messages generated while requiring a module # when quiet is truthy exports.require = (name, quiet) -> if quiet orig = object ([k, v] for own k, v of console)
console[k] = (->) for own k, v of orig mod = require name if quiet console[k] = v for own k, v of orig mod exports.words = words = (wordstr) -> wordstr.split " "
CoffeeScript
CoffeeScript
hipchat/hubot-hipchat
src/util.coffee
MIT
ff563b3b40801859636029181ca8cb77a655e476
661
https://github.com/hipchat/hubot-hipchat/blob/ff563b3b40801859636029181ca8cb77a655e476/src/util.coffee
1
14
gterrono/houston:lib/menu.coffee:1:raw_corpus
raw_corpus
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt '...
var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]; this.menu._add_menu_item(item); } }; Houston.m...
CoffeeScript
JavaScript
gterrono/houston
lib/menu.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]...
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
JavaScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:completion
completion
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
if item.type is 'link' item.path = item.use else if item.type is 'template' item.path = "#{Houston._ROOT_ROUTE}/actions/#{item.use}" return item Houston.menu._get_menu_items = -> @dependency.depend() @_process_item item for item in @_menu_items Houston.menu._add_menu_item = (item) -> @_menu_items.p...
CoffeeScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:raw_corpus
raw_corpus
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt '...
var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]; this.menu._add_menu_item(item); } }; Houston.m...
CoffeeScript
JavaScript
gterrono/houston
lib/menu.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]...
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
JavaScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:completion
completion
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
if item.type is 'link' item.path = item.use else if item.type is 'template' item.path = "#{Houston._ROOT_ROUTE}/custom/#{item.use}" return item Houston.menu._get_menu_items = -> @dependency.depend() @_process_item item for item in @_menu_items Houston.menu._add_menu_item = (item) -> @_menu_items.pu...
CoffeeScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:raw_corpus
raw_corpus
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
a2b3a39371b08a101fed368b0e13e62ebd1a8fb4
802
https://github.com/gterrono/houston/blob/a2b3a39371b08a101fed368b0e13e62ebd1a8fb4/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt '...
var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]; this.menu._add_menu_item(item); } }; Houston.m...
CoffeeScript
JavaScript
gterrono/houston
lib/menu.coffee
MIT
a2b3a39371b08a101fed368b0e13e62ebd1a8fb4
802
https://github.com/gterrono/houston/blob/a2b3a39371b08a101fed368b0e13e62ebd1a8fb4/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]...
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
JavaScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
a2b3a39371b08a101fed368b0e13e62ebd1a8fb4
802
https://github.com/gterrono/houston/blob/a2b3a39371b08a101fed368b0e13e62ebd1a8fb4/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:completion
completion
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
if item.type is 'link' item.path = item.use else if item.type is 'template' item.path = "#{Houston._ROOT_ROUTE}/#{item.use}" return item Houston.menu._get_menu_items = -> @dependency.depend() @_process_item item for item in @_menu_items Houston.menu._add_menu_item = (item) -> @_menu_items.push item...
CoffeeScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
a2b3a39371b08a101fed368b0e13e62ebd1a8fb4
802
https://github.com/gterrono/houston/blob/a2b3a39371b08a101fed368b0e13e62ebd1a8fb4/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:raw_corpus
raw_corpus
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
6b448b656d4cb5469780b5a5023e7f343164e0ca
802
https://github.com/gterrono/houston/blob/6b448b656d4cb5469780b5a5023e7f343164e0ca/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt '...
var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]; this.menu._add_menu_item(item); } }; Houston.m...
CoffeeScript
JavaScript
gterrono/houston
lib/menu.coffee
MIT
6b448b656d4cb5469780b5a5023e7f343164e0ca
802
https://github.com/gterrono/houston/blob/6b448b656d4cb5469780b5a5023e7f343164e0ca/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]...
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
JavaScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
6b448b656d4cb5469780b5a5023e7f343164e0ca
802
https://github.com/gterrono/houston/blob/6b448b656d4cb5469780b5a5023e7f343164e0ca/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:completion
completion
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
if item.type is 'link' item.path = item.use else if item.type is 'template' item.path = "/admin/#{item.use}" return item Houston.menu._get_menu_items = -> @dependency.depend() @_process_item item for item in @_menu_items Houston.menu._add_menu_item = (item) -> @_menu_items.push item @dependency.c...
CoffeeScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
6b448b656d4cb5469780b5a5023e7f343164e0ca
802
https://github.com/gterrono/houston/blob/6b448b656d4cb5469780b5a5023e7f343164e0ca/lib/menu.coffee
1
30
gterrono/houston:lib/menu.coffee:1:raw_corpus
raw_corpus
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
8394b1fb995a229a70a4eb7b9709c588c44bca0b
802
https://github.com/gterrono/houston/blob/8394b1fb995a229a70a4eb7b9709c588c44bca0b/lib/menu.coffee
1
32
gterrono/houston:lib/menu.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt '...
var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]; this.menu._add_menu_item(item); } }; Houston.m...
CoffeeScript
JavaScript
gterrono/houston
lib/menu.coffee
MIT
8394b1fb995a229a70a4eb7b9709c588c44bca0b
802
https://github.com/gterrono/houston/blob/8394b1fb995a229a70a4eb7b9709c588c44bca0b/lib/menu.coffee
1
32
gterrono/houston:lib/menu.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Houston.menu = function() { var i, item, len; for (i = 0, len = arguments.length; i < len; i++) { item = arguments[i]...
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
JavaScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
8394b1fb995a229a70a4eb7b9709c588c44bca0b
802
https://github.com/gterrono/houston/blob/8394b1fb995a229a70a4eb7b9709c588c44bca0b/lib/menu.coffee
1
32
gterrono/houston:lib/menu.coffee:1:completion
completion
root = exports ? this root.Houston ?= {} Houston.menu = () -> @.menu._add_menu_item item for item in arguments return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt 'template' throw new Meteor....
if item.type is 'link' item.path = item.use else if item.type is 'template' # TODO: Check if collection with this name already exists item.path = "/admin/#{item.use}" return item Houston.menu._get_menu_items = -> @dependency.depend() @_process_item item for item in @_menu_items Houston.menu._add...
CoffeeScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
8394b1fb995a229a70a4eb7b9709c588c44bca0b
802
https://github.com/gterrono/houston/blob/8394b1fb995a229a70a4eb7b9709c588c44bca0b/lib/menu.coffee
1
32
gterrono/houston:lib/menu.coffee:1:raw_corpus
raw_corpus
root = exports ? this root.Houston ?= {} Meteor.startup -> Houston.menu = (items) -> @.menu._add_menu_item item for item in items return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt...
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25
802
https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/lib/menu.coffee
1
31
gterrono/houston:lib/menu.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript root = exports ? this root.Houston ?= {} Meteor.startup -> Houston.menu = (items) -> @.menu._add_menu_item item for item in items return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = ...
var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Meteor.startup(function() { Houston.menu = function(items) { var i, item, len; for (i = 0, len = items.length; i < len; i++) { item = items[i]; this.menu._add...
CoffeeScript
JavaScript
gterrono/houston
lib/menu.coffee
MIT
dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25
802
https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/lib/menu.coffee
1
31
gterrono/houston:lib/menu.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; if (root.Houston == null) { root.Houston = {}; } Meteor.startup(function() { Houston.menu = function(items) { var i, item, len; for (i = 0, len = items.length; i < ...
root = exports ? this root.Houston ?= {} Meteor.startup -> Houston.menu = (items) -> @.menu._add_menu_item item for item in items return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt...
JavaScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25
802
https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/lib/menu.coffee
1
31
gterrono/houston:lib/menu.coffee:1:completion
completion
root = exports ? this root.Houston ?= {} Meteor.startup -> Houston.menu = (items) -> @.menu._add_menu_item item for item in items return Houston.menu.dependency = new Deps.Dependency Houston.menu._menu_items = [] Houston.menu._process_item = (item) -> if item.type isnt 'link' and item.type isnt...
throw new Meteor.Error 400, 'Can\'t recognize type: ' + item if item.type is 'link' item.path = item.use else if item.type is 'template' item.path = '/admin/view/' + item.use return item Houston.menu._get_menu_items = -> @dependency.depend() @_process_item item for item in @_menu_it...
CoffeeScript
CoffeeScript
gterrono/houston
lib/menu.coffee
MIT
dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25
802
https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/lib/menu.coffee
1
31
octoblu/meshblu:integration/socketIO-spec.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @config = new Me...
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8a9dfe9676fea89c0fa91e616994377e13dbf38c
815
https://github.com/octoblu/meshblu/blob/8a9dfe9676fea89c0fa91e616994377e13dbf38c/integration/socketIO-spec.coffee
1
41
octoblu/meshblu:integration/socketIO-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename =...
var MeshbluConfig, MeshbluHTTP, MeshbluSocketIO, _, meshblu, path; _ = require('lodash'); path = require('path'); meshblu = require('meshblu'); MeshbluHTTP = require('meshblu-http'); MeshbluSocketIO = require('meshblu-socket.io'); MeshbluConfig = require('meshblu-config'); describe('SocketLogic Events', function...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8a9dfe9676fea89c0fa91e616994377e13dbf38c
815
https://github.com/octoblu/meshblu/blob/8a9dfe9676fea89c0fa91e616994377e13dbf38c/integration/socketIO-spec.coffee
1
41
octoblu/meshblu:integration/socketIO-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluConfig, MeshbluHTTP, MeshbluSocketIO, _, meshblu, path; _ = require('lodash'); path = require('path'); meshblu = require('meshblu'); MeshbluHTTP = require('meshblu-http'); MeshbluSocketIO = require('meshblu-socket.io'); MeshbluConfig = require('mes...
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @config = new Me...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8a9dfe9676fea89c0fa91e616994377e13dbf38c
815
https://github.com/octoblu/meshblu/blob/8a9dfe9676fea89c0fa91e616994377e13dbf38c/integration/socketIO-spec.coffee
1
41
octoblu/meshblu:integration/socketIO-spec.coffee:1:completion
completion
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @config = new Me...
before (done) -> @meshbluHTTP = new MeshbluHTTP @config @meshbluHTTP.register {}, (error, device) => return done error if error? @device = device @meshblu = new MeshbluSocketIO uuid: @device.uuid, token: @device.token, host: @config.host, protocol: @config.protocol, socketIOOptions: {forceNew...
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8a9dfe9676fea89c0fa91e616994377e13dbf38c
815
https://github.com/octoblu/meshblu/blob/8a9dfe9676fea89c0fa91e616994377e13dbf38c/integration/socketIO-spec.coffee
1
41
octoblu/meshblu:integration/socketIO-spec.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @config = new Me...
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename =...
var MeshbluConfig, MeshbluHTTP, MeshbluSocketIO, _, meshblu, path; _ = require('lodash'); path = require('path'); meshblu = require('meshblu'); MeshbluHTTP = require('meshblu-http'); MeshbluSocketIO = require('meshblu-socket.io'); MeshbluConfig = require('meshblu-config'); describe('SocketLogic Events', function...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluConfig, MeshbluHTTP, MeshbluSocketIO, _, meshblu, path; _ = require('lodash'); path = require('path'); meshblu = require('meshblu'); MeshbluHTTP = require('meshblu-http'); MeshbluSocketIO = require('meshblu-socket.io'); MeshbluConfig = require('mes...
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @config = new Me...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-spec.coffee:1:completion
completion
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @config = new Me...
before (done) -> meshbluHTTP = new MeshbluHTTP _.pick @config, 'server', 'port' meshbluHTTP.register {}, (error, device) => return done error if error? @device = device @meshblu = new MeshbluSocketIO uuid: @device.uuid, token: @device.token, host: @config.host, protocol: @config.protocol, soc...
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-spec.coffee:3:raw_corpus
raw_corpus
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @event...
describe('when called with an invalid request', function() { beforeEach(function(done) { return this.meshblu.identity({ uuid: 'invalid-uuid', token: 'invalid-token' }, (error) => { if (error == null) { return done(new Error('expected identity to raise an error')); } retur...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('when called with an invalid request', function() { beforeEach(function(done) { return this.meshblu.identity({ uuid: 'invalid-uuid', token: 'invalid-token' }, (error) => { if (error == null) { return done(new Error('expe...
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-spec.coffee:3:completion
completion
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
it 'should send a "identity-error" message', -> expect(@message.topic).to.deep.equal 'identity-error' expect(_.omit @message.payload, '_timestamp').to.deep.equal { error: "Device not found" request: uuid: 'invalid-uuid' }
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
3754117cb39a22bbfd909d7ba5aba71a2f26ccf0
815
https://github.com/octoblu/meshblu/blob/3754117cb39a22bbfd909d7ba5aba71a2f26ccf0/integration/socketIO-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-spec.coffee:2:raw_corpus
raw_corpus
it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(@message.payload).to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: {foo: 'bar'}} } describe 'when called with a...
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(@message.payload).to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: ...
it('should send an "update" message', function() { expect(this.message.topic).to.deep.equal('update'); return expect(this.message.payload).to.deep.equal({ fromUuid: this.device.uuid, request: { query: { uuid: this.device.uuid }, params: { $set: { foo: 'bar' ...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should send an "update" message', function() { expect(this.message.topic).to.deep.equal('update'); return expect(this.message.payload).to.deep.equal({ fromUuid: this.device.uuid, request: { query: { uuid: this.device.uuid }, ...
it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(@message.payload).to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: {foo: 'bar'}} } describe 'when called with a...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-spec.coffee:2:completion
completion
it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(@message.payload).to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: {foo: 'bar'}} } describe 'when called with a...
request: query: {uuid: 'invalid-uuid'} params: {$set: {foo: 'bar'}} } describe 'EVENT identity', -> describe 'when called with a valid request', -> beforeEach (done) -> @meshblu.identity uuid: @device.uuid, token: @device.token, (error) => return done error...
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-spec.coffee:3:raw_corpus
raw_corpus
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @event...
describe('when called with an invalid request', function() { beforeEach(function(done) { return this.meshblu.identity({ uuid: 'invalid-uuid', token: 'invalid-token' }, (error) => { if (error == null) { return done(new Error('expected identity to raise an error')); } retur...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('when called with an invalid request', function() { beforeEach(function(done) { return this.meshblu.identity({ uuid: 'invalid-uuid', token: 'invalid-token' }, (error) => { if (error == null) { return done(new Error('expe...
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-spec.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/integration/socketIO-spec.coffee
88
102