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
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(str, indent, warn_fn, opts = {}) { var $currIndent, $extIndent, $lastIndent, $nextIndent, $prevLength, $template, do_not_change_whitespace, new_code; do_not_change_whitespace = !!(opts != null ? opts.do_not_change_whitespace : void 0);...
module.exports = (str, indent, warn_fn, opts = {}) -> do_not_change_whitespace = !!opts?.do_not_change_whitespace indent = indent or DEFAULT_INDENT warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN indent = ' '.repeat(indent) if Number.isInteger(indent) $currIndent = 0 $nextIndent ...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
893e116fc4f9a905596e906a8b79fca3241cbcf1
1,503
https://github.com/Glavin001/atom-beautify/blob/893e116fc4f9a905596e906a8b79fca3241cbcf1/src/beautifiers/lua-beautifier/beautifier.coffee
29
78
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:3:completion
completion
module.exports = (str, indent, warn_fn, opts = {}) -> do_not_change_whitespace = !!opts?.do_not_change_whitespace indent = indent or DEFAULT_INDENT warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN indent = ' '.repeat(indent) if Number.isInteger(indent) $currIndent = 0 $nextIndent ...
return line res1 = line.match(/\[(=*)\[/) if res1 $template = res1[1].length + 1 if !$template_flag line = line.trim() # remote all spaces on both ends line = if do_not_change_whitespace then line else adjust_space(line) if !line.length return '' raw_line = line lin...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
893e116fc4f9a905596e906a8b79fca3241cbcf1
1,503
https://github.com/Glavin001/atom-beautify/blob/893e116fc4f9a905596e906a8b79fca3241cbcf1/src/beautifiers/lua-beautifier/beautifier.coffee
29
78
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:4:raw_corpus
raw_corpus
# capture unbalanced curly brackets # close (curly) brackets if needed if $curly < 0 $currIndent += $curly if $brackets < 0 $currIndent += $brackets $nextIndent += $brackets + $curly # console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent}) if $currInd...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
893e116fc4f9a905596e906a8b79fca3241cbcf1
1,503
https://github.com/Glavin001/atom-beautify/blob/893e116fc4f9a905596e906a8b79fca3241cbcf1/src/beautifiers/lua-beautifier/beautifier.coffee
79
105
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:4:completion
completion
# capture unbalanced curly brackets # close (curly) brackets if needed if $curly < 0 $currIndent += $curly if $brackets < 0 $currIndent += $brackets $nextIndent += $brackets + $curly # console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent}) if $currInd...
$currIndent = -1 + $lastIndent if $nextIndent < $currIndent $nextIndent = $currIndent # console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent}) warn_fn """negative indentation at line #{line_number}: #{raw_line}""" if $currIndent < 0 new_line = (if raw_line.length a...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
893e116fc4f9a905596e906a8b79fca3241cbcf1
1,503
https://github.com/Glavin001/atom-beautify/blob/893e116fc4f9a905596e906a8b79fca3241cbcf1/src/beautifiers/lua-beautifier/beautifier.coffee
79
105
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:raw_corpus
raw_corpus
adjust_space = (line) -> string_list = line.match /(['"])[^\1]*?\1/g muli_string = line.match /\[(=*)\[([^\]\1\]]*)/ comment = line.match /\-{2}[^\[].*$/ line = line.replace /\s+/g, ' ' # replace all whitespaces inside the string with one space, WARNING: the whitespaces in string will be replace too! line =...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
3
23
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript adjust_space = (line) -> string_list = line.match /(['"])[^\1]*?\1/g muli_string = line.match /\[(=*)\[([^\]\1\]]*)/ comment = line.match /\-{2}[^\[].*$/ line = line.replace /\s+/g, ' ' # replace all whitespaces inside the string with one space, WARNING...
var adjust_space; adjust_space = function(line) { var comment, muli_string, string_list; string_list = line.match(/(['"])[^\1]*?\1/g); muli_string = line.match(/\[(=*)\[([^\]\1\]]*)/); comment = line.match(/\-{2}[^\[].*$/); line = line.replace(/\s+/g, ' '); // replace all whitespaces inside the string with...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
3
23
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var adjust_space; adjust_space = function(line) { var comment, muli_string, string_list; string_list = line.match(/(['"])[^\1]*?\1/g); muli_string = line.match(/\[(=*)\[([^\]\1\]]*)/); comment = line.match(/\-{2}[^\[].*$/); line = line.replace(/\s+/g, ' ...
adjust_space = (line) -> string_list = line.match /(['"])[^\1]*?\1/g muli_string = line.match /\[(=*)\[([^\]\1\]]*)/ comment = line.match /\-{2}[^\[].*$/ line = line.replace /\s+/g, ' ' # replace all whitespaces inside the string with one space, WARNING: the whitespaces in string will be replace too! line =...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
3
23
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:completion
completion
adjust_space = (line) -> string_list = line.match /(['"])[^\1]*?\1/g muli_string = line.match /\[(=*)\[([^\]\1\]]*)/ comment = line.match /\-{2}[^\[].*$/ line = line.replace /\s+/g, ' ' # replace all whitespaces inside the string with one space, WARNING: the whitespaces in string will be replace too! line =...
line = line.replace /,([^\s])/g, ', $1' # adjust ',' line = line.replace /\s+,/g, ',' # recover the whitespaces in string. line = line.replace /(['"])[^\1]*?\1/g, -> string_list.shift() if muli_string and muli_string[0] line = line.replace /\[(=*)\[([^\]\1\]]*)/, muli_string[0] if comment and commen...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
3
23
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:3:raw_corpus
raw_corpus
module.exports = (str, indent, warn_fn) -> indent = indent or DEFAULT_INDENT warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN indent = ' '.repeat(indent) if Number.isInteger(indent) $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
28
77
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (str, indent, warn_fn) -> indent = indent or DEFAULT_INDENT warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN indent = ' '.repeat(indent) if Number.isInteger(indent) $currIndent = 0 $nextIndent = 0 $prevLengt...
module.exports = function(str, indent, warn_fn) { var $currIndent, $extIndent, $lastIndent, $nextIndent, $prevLength, $template, new_code; indent = indent || DEFAULT_INDENT; warn_fn = typeof warn_fn === 'function' ? warn_fn : DEFAULT_WARN_FN; if (Number.isInteger(indent)) { indent = ' '.repeat(indent); } ...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
28
77
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(str, indent, warn_fn) { var $currIndent, $extIndent, $lastIndent, $nextIndent, $prevLength, $template, new_code; indent = indent || DEFAULT_INDENT; warn_fn = typeof warn_fn === 'function' ? warn_fn : DEFAULT_WARN_FN; if (Number.isI...
module.exports = (str, indent, warn_fn) -> indent = indent or DEFAULT_INDENT warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN indent = ' '.repeat(indent) if Number.isInteger(indent) $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 ...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
28
77
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:3:completion
completion
module.exports = (str, indent, warn_fn) -> indent = indent or DEFAULT_INDENT warn_fn = if typeof warn_fn == 'function' then warn_fn else DEFAULT_WARN_FN indent = ' '.repeat(indent) if Number.isInteger(indent) $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 ...
res1 = line.match(/\[(=*)\[/) if res1 $template = res1[1].length + 1 if !$template_flag line = line.trim() # remote all spaces on both ends line = adjust_space(line) if !line.length return '' raw_line = line line = line.replace(/(['"])[^\1]*?\1/, '') # remove all qu...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
28
77
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:4:raw_corpus
raw_corpus
# close (curly) brackets if needed if $curly < 0 $currIndent += $curly if $brackets < 0 $currIndent += $brackets $nextIndent += $brackets + $curly # console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent}) if $currIndent - $lastIndent > 1 $extIndent +...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
78
103
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:4:completion
completion
# close (curly) brackets if needed if $curly < 0 $currIndent += $curly if $brackets < 0 $currIndent += $brackets $nextIndent += $brackets + $curly # console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent}) if $currIndent - $lastIndent > 1 $extIndent +...
if $nextIndent < $currIndent $nextIndent = $currIndent # console.log({last: $lastIndent, curr: $currIndent, next: $nextIndent, ext: $extIndent}) warn_fn """negative indentation at line #{line_number}: #{raw_line}""" if $currIndent < 0 new_line = (if raw_line.length and $currIndent > 0 and !$template_f...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
51af21106303dd97d8b510cd20ad1fdbebee83e4
1,503
https://github.com/Glavin001/atom-beautify/blob/51af21106303dd97d8b510cd20ad1fdbebee83e4/src/beautifiers/lua-beautifier/beautifier.coffee
78
103
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:raw_corpus
raw_corpus
DEFAULT_INDENT = ' ' module.exports = (str, indent) -> indent = indent or DEFAULT_INDENT indent = ' '.repeat indent if Number.isInteger indent $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 new_code = str.split(/\r?\n/g).map (line, line_number) -> ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
8c8afc407dc11b309e9db0d4caad820951820f18
1,503
https://github.com/Glavin001/atom-beautify/blob/8c8afc407dc11b309e9db0d4caad820951820f18/src/beautifiers/lua-beautifier/beautifier.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript DEFAULT_INDENT = ' ' module.exports = (str, indent) -> indent = indent or DEFAULT_INDENT indent = ' '.repeat indent if Number.isInteger indent $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 new_c...
var DEFAULT_INDENT; DEFAULT_INDENT = ' '; module.exports = function(str, indent) { var $currIndent, $extIndent, $lastIndent, $nextIndent, $prevLength, $template, new_code; indent = indent || DEFAULT_INDENT; if (Number.isInteger(indent)) { indent = ' '.repeat(indent); } $currIndent = 0; $nextIndent ...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
8c8afc407dc11b309e9db0d4caad820951820f18
1,503
https://github.com/Glavin001/atom-beautify/blob/8c8afc407dc11b309e9db0d4caad820951820f18/src/beautifiers/lua-beautifier/beautifier.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var DEFAULT_INDENT; DEFAULT_INDENT = ' '; module.exports = function(str, indent) { var $currIndent, $extIndent, $lastIndent, $nextIndent, $prevLength, $template, new_code; indent = indent || DEFAULT_INDENT; if (Number.isInteger(indent)) { indent = ' ...
DEFAULT_INDENT = ' ' module.exports = (str, indent) -> indent = indent or DEFAULT_INDENT indent = ' '.repeat indent if Number.isInteger indent $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 new_code = str.split(/\r?\n/g).map (line, line_number) -> ...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
8c8afc407dc11b309e9db0d4caad820951820f18
1,503
https://github.com/Glavin001/atom-beautify/blob/8c8afc407dc11b309e9db0d4caad820951820f18/src/beautifiers/lua-beautifier/beautifier.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:1:completion
completion
DEFAULT_INDENT = ' ' module.exports = (str, indent) -> indent = indent or DEFAULT_INDENT indent = ' '.repeat indent if Number.isInteger indent $currIndent = 0 $nextIndent = 0 $prevLength = 0 $extIndent = 0 $lastIndent = 0 $template = 0 new_code = str.split(/\r?\n/g).map (line, line_number) -> ...
# remote all spaces on both ends string_list = line.match /(['"])[^\1]*?\1/g line = line.replace /\s+/g, ' ' # replace all whitespaces inside the string with one space, WARNING: the whitespaces in string will be replace too! line = line.replace /([^\-])\s?(==|>=|<=|[=><\+\-\*\/])\s?([^\-\[])/g, ...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
8c8afc407dc11b309e9db0d4caad820951820f18
1,503
https://github.com/Glavin001/atom-beautify/blob/8c8afc407dc11b309e9db0d4caad820951820f18/src/beautifiers/lua-beautifier/beautifier.coffee
1
50
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:2:raw_corpus
raw_corpus
$brackets = (line.match(/\(/g) or []).length - ((line.match(/\)/g) or []).length) # capture unbalanced brackets $curly = (line.match(/\{/g) or []).length - ((line.match(/\}/g) or []).length) # capture unbalanced curly brackets # close (curly) brackets if needed $currIndent += $curly if $curly < 0 ...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
8c8afc407dc11b309e9db0d4caad820951820f18
1,503
https://github.com/Glavin001/atom-beautify/blob/8c8afc407dc11b309e9db0d4caad820951820f18/src/beautifiers/lua-beautifier/beautifier.coffee
51
79
Glavin001/atom-beautify:src/beautifiers/lua-beautifier/beautifier.coffee:2:completion
completion
$brackets = (line.match(/\(/g) or []).length - ((line.match(/\)/g) or []).length) # capture unbalanced brackets $curly = (line.match(/\{/g) or []).length - ((line.match(/\}/g) or []).length) # capture unbalanced curly brackets # close (curly) brackets if needed $currIndent += $curly if $curly < 0 ...
$currIndent = -1 + $lastIndent if $nextIndent < $currIndent $nextIndent = $currIndent if $currIndent < 0 console.warn 'WARNING: negative indentation at line ${line_number}: ${raw_line}' new_line = (if raw_line.length and $currIndent > 0 and !$template_flag then indent.repeat($currIndent) else '...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/lua-beautifier/beautifier.coffee
MIT
8c8afc407dc11b309e9db0d4caad820951820f18
1,503
https://github.com/Glavin001/atom-beautify/blob/8c8afc407dc11b309e9db0d4caad820951820f18/src/beautifiers/lua-beautifier/beautifier.coffee
51
79
jianliaoim/talk-os:talk-web/test/spec/actions/prefs.spec.coffee:1:raw_corpus
raw_corpus
xdescribe 'Actions: prefs', -> beforeEach -> @action = require 'actions/prefs' @api = require 'network/api' describe 'Method: prefsUpdate', -> it 'should call api', -> spyOn(@api.preferences.update, 'put').and.callThrough() data = {} config = data: data @action.prefsUpdate(da...
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/actions/prefs.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/actions/prefs.spec.coffee
1
15
jianliaoim/talk-os:talk-web/test/spec/actions/prefs.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript xdescribe 'Actions: prefs', -> beforeEach -> @action = require 'actions/prefs' @api = require 'network/api' describe 'Method: prefsUpdate', -> it 'should call api', -> spyOn(@api.preferences.update, 'put').and.callThrough() data = {...
xdescribe('Actions: prefs', function() { beforeEach(function() { this.action = require('actions/prefs'); return this.api = require('network/api'); }); return describe('Method: prefsUpdate', function() { return it('should call api', function() { var config, data; spyOn(this.api.preferences....
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/test/spec/actions/prefs.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/actions/prefs.spec.coffee
1
15
jianliaoim/talk-os:talk-web/test/spec/actions/prefs.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript xdescribe('Actions: prefs', function() { beforeEach(function() { this.action = require('actions/prefs'); return this.api = require('network/api'); }); return describe('Method: prefsUpdate', function() { return it('should call api', function() { ...
xdescribe 'Actions: prefs', -> beforeEach -> @action = require 'actions/prefs' @api = require 'network/api' describe 'Method: prefsUpdate', -> it 'should call api', -> spyOn(@api.preferences.update, 'put').and.callThrough() data = {} config = data: data @action.prefsUpdate(da...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/actions/prefs.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/actions/prefs.spec.coffee
1
15
jianliaoim/talk-os:talk-web/test/spec/actions/prefs.spec.coffee:1:completion
completion
xdescribe 'Actions: prefs', -> beforeEach -> @action = require 'actions/prefs' @api = require 'network/api' describe 'Method: prefsUpdate', ->
it 'should call api', -> spyOn(@api.preferences.update, 'put').and.callThrough() data = {} config = data: data @action.prefsUpdate(data) expect(@api.preferences.update.put).toHaveBeenCalledWith config
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/spec/actions/prefs.spec.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/actions/prefs.spec.coffee
1
15
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:1:raw_corpus
raw_corpus
exports.fetch = (store, actionData) -> messageData = actionData.get('data') _teamId = actionData.get('_teamId') _channelId = actionData.get('_toId') if store.getIn(['messages', _teamId])? store.setIn ['messages', _teamId, _channelId], messageData else store.setIn ['messages', _teamId], Immutable.Map(...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
11
26
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.fetch = (store, actionData) -> messageData = actionData.get('data') _teamId = actionData.get('_teamId') _channelId = actionData.get('_toId') if store.getIn(['messages', _teamId])? store.setIn ['messages', _teamId, _channelId], messageData e...
exports.fetch = function(store, actionData) { var _channelId, _teamId, messageData; messageData = actionData.get('data'); _teamId = actionData.get('_teamId'); _channelId = actionData.get('_toId'); if (store.getIn(['messages', _teamId]) != null) { return store.setIn(['messages', _teamId, _channelId], messa...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
11
26
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.fetch = function(store, actionData) { var _channelId, _teamId, messageData; messageData = actionData.get('data'); _teamId = actionData.get('_teamId'); _channelId = actionData.get('_toId'); if (store.getIn(['messages', _teamId]) != null) { retu...
exports.fetch = (store, actionData) -> messageData = actionData.get('data') _teamId = actionData.get('_teamId') _channelId = actionData.get('_toId') if store.getIn(['messages', _teamId])? store.setIn ['messages', _teamId, _channelId], messageData else store.setIn ['messages', _teamId], Immutable.Map(...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
11
26
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:2:raw_corpus
raw_corpus
exports.remove = (store, removeData) -> _teamId = removeData.get '_teamId' _contactId = removeData.getIn ['user', '_id'] inCollection = (contact) -> contact.get('_id') is _contactId store .update 'contacts', (cursor) -> if cursor.has _teamId cursor.update _teamId, (contacts) -> contact...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
27
53
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.remove = (store, removeData) -> _teamId = removeData.get '_teamId' _contactId = removeData.getIn ['user', '_id'] inCollection = (contact) -> contact.get('_id') is _contactId store .update 'contacts', (cursor) -> if cursor.has _teamId ...
exports.remove = function(store, removeData) { var _contactId, _teamId, inCollection; _teamId = removeData.get('_teamId'); _contactId = removeData.getIn(['user', '_id']); inCollection = function(contact) { return contact.get('_id') === _contactId; }; return store.update('contacts', function(cursor) { ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
27
53
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.remove = function(store, removeData) { var _contactId, _teamId, inCollection; _teamId = removeData.get('_teamId'); _contactId = removeData.getIn(['user', '_id']); inCollection = function(contact) { return contact.get('_id') === _contactId; }; ...
exports.remove = (store, removeData) -> _teamId = removeData.get '_teamId' _contactId = removeData.getIn ['user', '_id'] inCollection = (contact) -> contact.get('_id') is _contactId store .update 'contacts', (cursor) -> if cursor.has _teamId cursor.update _teamId, (contacts) -> contact...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
27
53
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:2:completion
completion
exports.remove = (store, removeData) -> _teamId = removeData.get '_teamId' _contactId = removeData.getIn ['user', '_id'] inCollection = (contact) -> contact.get('_id') is _contactId store .update 'contacts', (cursor) -> if cursor.has _teamId cursor.update _teamId, (contacts) -> contact...
cursor .update 'leftContacts', (cursor) -> if cursor.has(_teamId) and not cursor.get(_teamId).some(inCollection) cursor.update _teamId, (contacts) -> contacts.push removeData.get('user').set('isQuit', true) # http://talk.ci/doc/event/member.update.html # http://talk.ci/doc/restful/team.setmemberrol...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
27
53
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:3:raw_corpus
raw_corpus
exports.update = (store, roleData) -> _teamId = roleData.get '_teamId' _userId = roleData.get '_userId' if store.getIn(['contacts', _teamId])? store.updateIn ['contacts', _teamId], (contacts) -> contacts.map (contact) -> if contact.get('_id') is _userId # tricky, but by now it's the o...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
54
76
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.update = (store, roleData) -> _teamId = roleData.get '_teamId' _userId = roleData.get '_userId' if store.getIn(['contacts', _teamId])? store.updateIn ['contacts', _teamId], (contacts) -> contacts.map (contact) -> if contact.get('_...
exports.update = function(store, roleData) { var _teamId, _userId; _teamId = roleData.get('_teamId'); _userId = roleData.get('_userId'); if (store.getIn(['contacts', _teamId]) != null) { return store.updateIn(['contacts', _teamId], function(contacts) { return contacts.map(function(contact) { i...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
54
76
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.update = function(store, roleData) { var _teamId, _userId; _teamId = roleData.get('_teamId'); _userId = roleData.get('_userId'); if (store.getIn(['contacts', _teamId]) != null) { return store.updateIn(['contacts', _teamId], function(contacts) { ...
exports.update = (store, roleData) -> _teamId = roleData.get '_teamId' _userId = roleData.get '_userId' if store.getIn(['contacts', _teamId])? store.updateIn ['contacts', _teamId], (contacts) -> contacts.map (contact) -> if contact.get('_id') is _userId # tricky, but by now it's the o...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
54
76
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:4:raw_corpus
raw_corpus
exports.fetchLeft = (store, leftContactsData) -> _teamId = leftContactsData.get('_teamId') contactListData = leftContactsData.get('data') store.setIn ['leftContacts', _teamId], contactListData.map (contact) -> contact.set 'isQuit', true # teams.members.get # http://talk.ci/doc/restful/team.members.html
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
77
85
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.fetchLeft = (store, leftContactsData) -> _teamId = leftContactsData.get('_teamId') contactListData = leftContactsData.get('data') store.setIn ['leftContacts', _teamId], contactListData.map (contact) -> contact.set 'isQuit', true # teams.member...
exports.fetchLeft = function(store, leftContactsData) { var _teamId, contactListData; _teamId = leftContactsData.get('_teamId'); contactListData = leftContactsData.get('data'); return store.setIn(['leftContacts', _teamId], contactListData.map(function(contact) { return contact.set('isQuit', true); })); };...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
77
85
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.fetchLeft = function(store, leftContactsData) { var _teamId, contactListData; _teamId = leftContactsData.get('_teamId'); contactListData = leftContactsData.get('data'); return store.setIn(['leftContacts', _teamId], contactListData.map(function(conta...
exports.fetchLeft = (store, leftContactsData) -> _teamId = leftContactsData.get('_teamId') contactListData = leftContactsData.get('data') store.setIn ['leftContacts', _teamId], contactListData.map (contact) -> contact.set 'isQuit', true # teams.members.get # http://talk.ci/doc/restful/team.members.html
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
77
85
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:4:completion
completion
exports.fetchLeft = (store, leftContactsData) -> _teamId = leftContactsData.get('_teamId') contactListData = leftContactsData.get('data')
store.setIn ['leftContacts', _teamId], contactListData.map (contact) -> contact.set 'isQuit', true # teams.members.get # http://talk.ci/doc/restful/team.members.html
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
77
85
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:5:raw_corpus
raw_corpus
exports.read = (store, actionData) -> _teamId = actionData.get '_teamId' data = actionData.get 'data' if store.hasIn ['contacts', _teamId] store.mergeIn ['contacts', _teamId], data else store.setIn ['contacts', _teamId], data
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
86
93
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.read = (store, actionData) -> _teamId = actionData.get '_teamId' data = actionData.get 'data' if store.hasIn ['contacts', _teamId] store.mergeIn ['contacts', _teamId], data else store.setIn ['contacts', _teamId], data ```
exports.read = function(store, actionData) { var _teamId, data; _teamId = actionData.get('_teamId'); data = actionData.get('data'); if (store.hasIn(['contacts', _teamId])) { return store.mergeIn(['contacts', _teamId], data); } else { return store.setIn(['contacts', _teamId], data); } };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
86
93
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.read = function(store, actionData) { var _teamId, data; _teamId = actionData.get('_teamId'); data = actionData.get('data'); if (store.hasIn(['contacts', _teamId])) { return store.mergeIn(['contacts', _teamId], data); } else { return store....
exports.read = (store, actionData) -> _teamId = actionData.get '_teamId' data = actionData.get 'data' if store.hasIn ['contacts', _teamId] store.mergeIn ['contacts', _teamId], data else store.setIn ['contacts', _teamId], data
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
86
93
jianliaoim/talk-os:talk-web/client/updater/contact.coffee:5:completion
completion
exports.read = (store, actionData) -> _teamId = actionData.get '_teamId' data = actionData.get 'data'
if store.hasIn ['contacts', _teamId] store.mergeIn ['contacts', _teamId], data else store.setIn ['contacts', _teamId], data
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/contact.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/contact.coffee
86
93
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'team-card' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired contacts: React.PropTypes.instanceOf(Immutable.List).isRequired getInitialState: -> showInvite: false onClick: -> handlers.router.team @props.team.get('_id') on...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
17
66
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'team-card' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired contacts: React.PropTypes.instanceOf(Immutable.List).isRequired getInitialState: -> showInvite: false onClick:...
module.exports = React.createClass({ displayName: 'team-card', propTypes: { team: React.PropTypes.instanceOf(Immutable.Map).isRequired, contacts: React.PropTypes.instanceOf(Immutable.List).isRequired }, getInitialState: function() { return { showInvite: false }; }, onClick: function() ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
17
66
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'team-card', propTypes: { team: React.PropTypes.instanceOf(Immutable.Map).isRequired, contacts: React.PropTypes.instanceOf(Immutable.List).isRequired }, getInitialState: function() { return { ...
module.exports = React.createClass displayName: 'team-card' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired contacts: React.PropTypes.instanceOf(Immutable.List).isRequired getInitialState: -> showInvite: false onClick: -> handlers.router.team @props.team.get('_id') on...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
17
66
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:1:completion
completion
module.exports = React.createClass displayName: 'team-card' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired contacts: React.PropTypes.instanceOf(Immutable.List).isRequired getInitialState: -> showInvite: false onClick: -> handlers.router.team @props.team.get('_id') on...
@setState { showInvite } renderInviteModal: -> showInvite = @state.showInvite show = @state.showInvite in ['batch-invite', 'invite'] props = assign { show: show, color: 'green', onClose: @onInviteClose }, { name: 'team-invite', title: lang.getText('team-entrance-invite') } if showInvite is 'invite...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
17
66
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:2:raw_corpus
raw_corpus
render: -> firstLetter = @props.team.get('name')[0] visibleMemberIds = @props.contacts .filterNot (contact) -> contact.get('isRobot') .map (contact) -> contact.get('_id') div className: 'team-card', div className: 'team-card-title', lang.getText 'team-info' div className: 'card-detail',...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
67
93
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript render: -> firstLetter = @props.team.get('name')[0] visibleMemberIds = @props.contacts .filterNot (contact) -> contact.get('isRobot') .map (contact) -> contact.get('_id') div className: 'team-card', div className: 'team-card-title', lan...
({ render: function() { var firstLetter, style, visibleMemberIds; firstLetter = this.props.team.get('name')[0]; visibleMemberIds = this.props.contacts.filterNot(function(contact) { return contact.get('isRobot'); }).map(function(contact) { return contact.get('_id'); }); return div({...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
67
93
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ render: function() { var firstLetter, style, visibleMemberIds; firstLetter = this.props.team.get('name')[0]; visibleMemberIds = this.props.contacts.filterNot(function(contact) { return contact.get('isRobot'); }).map(function(contact) { ...
render: -> firstLetter = @props.team.get('name')[0] visibleMemberIds = @props.contacts .filterNot (contact) -> contact.get('isRobot') .map (contact) -> contact.get('_id') div className: 'team-card', div className: 'team-card-title', lang.getText 'team-info' div className: 'card-detail',...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
67
93
jianliaoim/talk-os:talk-web/client/app/team-card.coffee:2:completion
completion
render: -> firstLetter = @props.team.get('name')[0] visibleMemberIds = @props.contacts .filterNot (contact) -> contact.get('isRobot') .map (contact) -> contact.get('_id') div className: 'team-card', div className: 'team-card-title', lang.getText 'team-info' div className: 'card-detail',...
div className: 'card-logo', firstLetter div className: 'card-title', onClick: @onClick, @props.team.get('name') div className: 'card-text', @props.team.get('description') MembersRow _teamId: @props.team.get('_id') _memberIds: visibleMemberIds contacts: @props.contac...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-card.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-card.coffee
67
93
jianliaoim/talk-os:talk-account/app.coffee:1:raw_corpus
raw_corpus
server = require './server/server' logger = require('graceful-logger').format 'medium' port = process.env.PORT or 7630 server.listen port, -> logger.info "Server listen on #{port}"
CoffeeScript
jianliaoim/talk-os
talk-account/app.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/app.coffee
1
5
jianliaoim/talk-os:talk-account/app.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript server = require './server/server' logger = require('graceful-logger').format 'medium' port = process.env.PORT or 7630 server.listen port, -> logger.info "Server listen on #{port}" ```
var logger, port, server; server = require('./server/server'); logger = require('graceful-logger').format('medium'); port = process.env.PORT || 7630; server.listen(port, function() { return logger.info(`Server listen on ${port}`); });
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/app.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/app.coffee
1
5
jianliaoim/talk-os:talk-account/app.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var logger, port, server; server = require('./server/server'); logger = require('graceful-logger').format('medium'); port = process.env.PORT || 7630; server.listen(port, function() { return logger.info(`Server listen on ${port}`); }); ```
server = require './server/server' logger = require('graceful-logger').format 'medium' port = process.env.PORT or 7630 server.listen port, -> logger.info "Server listen on #{port}"
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/app.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/app.coffee
1
5
jianliaoim/talk-os:talk-account/app.coffee:1:completion
completion
server = require './server/server' logger = require('graceful-logger').format 'medium'
port = process.env.PORT or 7630 server.listen port, -> logger.info "Server listen on #{port}"
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/app.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/app.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/suggestion_list.coffee:1:raw_corpus
raw_corpus
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.shared ||= {} Tags.Templates.shared.suggestion_list = (options = {}) -> '<ul class="tags-suggestion-list dropdown-menu"></ul>'
CoffeeScript
maxwells/bootstrap-tags
src/templates/shared/suggestion_list.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/suggestion_list.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/suggestion_list.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.shared ||= {} Tags.Templates.shared.suggestion_list = (options = {}) -> '<ul class="tags-suggestion-list dropdown-menu"></ul>' ```
var base; window.Tags || (window.Tags = {}); Tags.Templates || (Tags.Templates = {}); (base = Tags.Templates).shared || (base.shared = {}); Tags.Templates.shared.suggestion_list = function(options = {}) { return '<ul class="tags-suggestion-list dropdown-menu"></ul>'; };
CoffeeScript
JavaScript
maxwells/bootstrap-tags
src/templates/shared/suggestion_list.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/suggestion_list.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/suggestion_list.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var base; window.Tags || (window.Tags = {}); Tags.Templates || (Tags.Templates = {}); (base = Tags.Templates).shared || (base.shared = {}); Tags.Templates.shared.suggestion_list = function(options = {}) { return '<ul class="tags-suggestion-list dropdown-menu"...
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.shared ||= {} Tags.Templates.shared.suggestion_list = (options = {}) -> '<ul class="tags-suggestion-list dropdown-menu"></ul>'
JavaScript
CoffeeScript
maxwells/bootstrap-tags
src/templates/shared/suggestion_list.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/suggestion_list.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/suggestion_list.coffee:1:completion
completion
window.Tags ||= {} Tags.Templates ||= {}
Tags.Templates.shared ||= {} Tags.Templates.shared.suggestion_list = (options = {}) -> '<ul class="tags-suggestion-list dropdown-menu"></ul>'
CoffeeScript
CoffeeScript
maxwells/bootstrap-tags
src/templates/shared/suggestion_list.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/suggestion_list.coffee
1
5
jnordberg/wintersmith:src/core/generator.coffee:1:raw_corpus
raw_corpus
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if ...
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/generator.coffee
1
38
jnordberg/wintersmith:src/core/generator.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content m...
/* generator.coffee */ var ContentPlugin, ContentTree, runGenerator; ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var groups, resolve; groups = env.getContentGroups(); resolve = function(root, items) { var item, key, results, tree; // c...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/generator.coffee
1
38
jnordberg/wintersmith:src/core/generator.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* generator.coffee */ var ContentPlugin, ContentTree, runGenerator; ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var groups, resolve; groups = env.getContentGroups(); resolve = functio...
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if ...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/generator.coffee
1
38
jnordberg/wintersmith:src/core/generator.coffee:1:completion
completion
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if ...
tree = new ContentTree key, groups tree.parent = root tree.parent._.directories.push tree root[key] = tree resolve root[key], item else throw new Error "Invalid item for '#{ key }' encountered when resolving generator output" generator.fn contents, (error, generated) -> ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
be757f5f7d72ddce462f67913c9cd7c578162018
3,484
https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/generator.coffee
1
38
jnordberg/wintersmith:src/core/generator.coffee:1:raw_corpus
raw_corpus
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if ...
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d
3,484
https://github.com/jnordberg/wintersmith/blob/88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d/src/core/generator.coffee
1
37
jnordberg/wintersmith:src/core/generator.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content m...
/* generator.coffee */ var ContentPlugin, ContentTree, runGenerator; ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var groups, resolve; groups = env.getContentGroups(); resolve = function(root, items) { var item, key, results, tree; // c...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d
3,484
https://github.com/jnordberg/wintersmith/blob/88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d/src/core/generator.coffee
1
37
jnordberg/wintersmith:src/core/generator.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* generator.coffee */ var ContentPlugin, ContentTree, runGenerator; ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var groups, resolve; groups = env.getContentGroups(); resolve = functio...
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if ...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d
3,484
https://github.com/jnordberg/wintersmith/blob/88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d/src/core/generator.coffee
1
37
jnordberg/wintersmith:src/core/generator.coffee:1:completion
completion
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> groups = env.getContentGroups() resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if ...
tree = new ContentTree key, groups tree.parent = root tree.parent._.directories.push tree root[key] = tree resolve root[key], item else throw new Error "Invalid item for '#{ key }' encountered when resolving generator output" generator.fn contents, (error, generated) -> ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d
3,484
https://github.com/jnordberg/wintersmith/blob/88996e4f6762c9bd40f1fcbb5eba9ce2110f9d5d/src/core/generator.coffee
1
37
jnordberg/wintersmith:src/core/generator.coffee:1:raw_corpus
raw_corpus
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if item instanceof ContentPlugin ...
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
554a7e810b39354e5a8770e0bb6269d36082bfc5
3,484
https://github.com/jnordberg/wintersmith/blob/554a7e810b39354e5a8770e0bb6269d36082bfc5/src/core/generator.coffee
1
35
jnordberg/wintersmith:src/core/generator.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, i...
/* generator.coffee */ var ContentPlugin, ContentTree, runGenerator; ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var resolve; resolve = function(root, items) { var item, key, results, tree; // create content tree instances for objects an...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
554a7e810b39354e5a8770e0bb6269d36082bfc5
3,484
https://github.com/jnordberg/wintersmith/blob/554a7e810b39354e5a8770e0bb6269d36082bfc5/src/core/generator.coffee
1
35
jnordberg/wintersmith:src/core/generator.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* generator.coffee */ var ContentPlugin, ContentTree, runGenerator; ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var resolve; resolve = function(root, items) { var item, key, results...
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if item instanceof ContentPlugin ...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
554a7e810b39354e5a8770e0bb6269d36082bfc5
3,484
https://github.com/jnordberg/wintersmith/blob/554a7e810b39354e5a8770e0bb6269d36082bfc5/src/core/generator.coffee
1
35
jnordberg/wintersmith:src/core/generator.coffee:1:completion
completion
### generator.coffee ### {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> resolve = (root, items) -> # create content tree instances for objects and set content metadata for renderer for key, item of items if item instanceof ContentPlugin ...
tree.parent = root tree.parent._.directories.push tree root[key] = tree resolve root[key], item else throw new Error "Invalid item for '#{ key }' encountered when resolving generator output" generator.fn contents, (error, generated) -> tree = new ContentTree env, '' try ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
554a7e810b39354e5a8770e0bb6269d36082bfc5
3,484
https://github.com/jnordberg/wintersmith/blob/554a7e810b39354e5a8770e0bb6269d36082bfc5/src/core/generator.coffee
1
35
jnordberg/wintersmith:src/core/generator.coffee:1:raw_corpus
raw_corpus
### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> merge = (items, root, callback) -> # merge output of generator back into content tree async.forEach Object.keys(items), (key, callback) -> if item...
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
5952d3da664fcc559a2790fc1ef929e897576267
3,484
https://github.com/jnordberg/wintersmith/blob/5952d3da664fcc559a2790fc1ef929e897576267/src/core/generator.coffee
1
45
jnordberg/wintersmith:src/core/generator.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> merge = (items, root, callback) -> # merge output of generator back into content tree async.for...
/* generator.coffee */ var ContentPlugin, ContentTree, async, runGenerator; async = require('async'); ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var merge; merge = function(items, root, callback) { // merge output of generator back int...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
5952d3da664fcc559a2790fc1ef929e897576267
3,484
https://github.com/jnordberg/wintersmith/blob/5952d3da664fcc559a2790fc1ef929e897576267/src/core/generator.coffee
1
45
jnordberg/wintersmith:src/core/generator.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* generator.coffee */ var ContentPlugin, ContentTree, async, runGenerator; async = require('async'); ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var merge; merge = function(items, root...
### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> merge = (items, root, callback) -> # merge output of generator back into content tree async.forEach Object.keys(items), (key, callback) -> if item...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
5952d3da664fcc559a2790fc1ef929e897576267
3,484
https://github.com/jnordberg/wintersmith/blob/5952d3da664fcc559a2790fc1ef929e897576267/src/core/generator.coffee
1
45
jnordberg/wintersmith:src/core/generator.coffee:1:completion
completion
### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> merge = (items, root, callback) -> # merge output of generator back into content tree async.forEach Object.keys(items), (key, callback) -> if item...
merge items[key], root[key], callback else env.logger.warning "generator tries to overwrite existing item '#{ key }' with a tree, ignoring output." callback() else env.logger.verbose "generator creating subtree '#{ key }'" tree = new ContentTree env, key ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
5952d3da664fcc559a2790fc1ef929e897576267
3,484
https://github.com/jnordberg/wintersmith/blob/5952d3da664fcc559a2790fc1ef929e897576267/src/core/generator.coffee
1
45
jnordberg/wintersmith:src/core/generator.coffee:1:raw_corpus
raw_corpus
### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> run = (callback) -> # run the generator generator.fn contents, callback merge = (generated, callback) -> # merge output of generator back into co...
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
60511d25ada32e4513bdd0a4f4131e76db5e48e6
3,484
https://github.com/jnordberg/wintersmith/blob/60511d25ada32e4513bdd0a4f4131e76db5e48e6/src/core/generator.coffee
1
50
jnordberg/wintersmith:src/core/generator.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> run = (callback) -> # run the generator generator.fn contents, callback merge = (generated, ...
/* generator.coffee */ var ContentPlugin, ContentTree, async, runGenerator; async = require('async'); ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var merge, run; run = function(callback) { // run the generator return generator.fn(co...
CoffeeScript
JavaScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
60511d25ada32e4513bdd0a4f4131e76db5e48e6
3,484
https://github.com/jnordberg/wintersmith/blob/60511d25ada32e4513bdd0a4f4131e76db5e48e6/src/core/generator.coffee
1
50
jnordberg/wintersmith:src/core/generator.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* generator.coffee */ var ContentPlugin, ContentTree, async, runGenerator; async = require('async'); ({ContentPlugin, ContentTree} = require('./content')); runGenerator = function(env, contents, generator, callback) { var merge, run; run = function(callback...
### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> run = (callback) -> # run the generator generator.fn contents, callback merge = (generated, callback) -> # merge output of generator back into co...
JavaScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
60511d25ada32e4513bdd0a4f4131e76db5e48e6
3,484
https://github.com/jnordberg/wintersmith/blob/60511d25ada32e4513bdd0a4f4131e76db5e48e6/src/core/generator.coffee
1
50
jnordberg/wintersmith:src/core/generator.coffee:1:completion
completion
### generator.coffee ### async = require 'async' {ContentPlugin, ContentTree} = require './content' runGenerator = (env, contents, generator, callback) -> run = (callback) -> # run the generator generator.fn contents, callback merge = (generated, callback) -> # merge output of generator back into co...
else if items[key] instanceof Object if contents[key]? if contents[key] instanceof ContentTree m items[key], contents[key], callback else env.logger.warning "generator tries to overwrite existing item '#{ key }'' with directory, ignoring output." ...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
src/core/generator.coffee
MIT
60511d25ada32e4513bdd0a4f4131e76db5e48e6
3,484
https://github.com/jnordberg/wintersmith/blob/60511d25ada32e4513bdd0a4f4131e76db5e48e6/src/core/generator.coffee
1
50
oozcitak/xmlbuilder-js:test/basic/doctype.coffee:1:raw_corpus
raw_corpus
suite 'Document Type Declaration:', -> test 'SYSTEM dtd from create()', -> eq( xml('root', { sysID: 'hello.dtd' }).ele('node').txt('test').end() '<?xml version="1.0"?><!DOCTYPE root SYSTEM "hello.dtd"><root><node>test</node></root>' ) test 'Public dtd from create()', -> eq( xml('HTML'...
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/doctype.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/doctype.coffee
1
50
oozcitak/xmlbuilder-js:test/basic/doctype.coffee:1:completion
completion
suite 'Document Type Declaration:', -> test 'SYSTEM dtd from create()', -> eq( xml('root', { sysID: 'hello.dtd' }).ele('node').txt('test').end() '<?xml version="1.0"?><!DOCTYPE root SYSTEM "hello.dtd"><root><node>test</node></root>' ) test 'Public dtd from create()', -> eq( xml('HTML'...
test 'Replace dtd', -> eq( xml('root').dtd('hello.dtd').up().ele('node').txt('test').dtd('bye.dtd').end() '<?xml version="1.0"?><!DOCTYPE root SYSTEM "bye.dtd"><root><node>test</node></root>' ) test 'Internal and external dtd', -> eq( xml('root') .dtd('hello.dtd') ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/doctype.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/doctype.coffee
1
50
oozcitak/xmlbuilder-js:test/basic/doctype.coffee:3:raw_corpus
raw_corpus
'<?xml version="1.0"?>' + '<!DOCTYPE root SYSTEM "hello.dtd" [' + '<?pub_border thin?>' + '<!ELEMENT img EMPTY>' + '<!-- Image attributes follow -->' + '<!ATTLIST img height CDATA #REQUIRED>' + '<!ATTLIST img visible (yes|no) "yes">' + '<!NOTATION fs SYS...
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/doctype.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/doctype.coffee
60
109
oozcitak/xmlbuilder-js:test/basic/doctype.coffee:3:completion
completion
'<?xml version="1.0"?>' + '<!DOCTYPE root SYSTEM "hello.dtd" [' + '<?pub_border thin?>' + '<!ELEMENT img EMPTY>' + '<!-- Image attributes follow -->' + '<!ATTLIST img height CDATA #REQUIRED>' + '<!ATTLIST img visible (yes|no) "yes">' + '<!NOTATION fs SYS...
test 'Internal and external dtd (pretty print)', -> eq( xml('root') .dtd('hello.dtd') .ins('pub_border', 'thin') .ele('img', 'EMPTY') .com('Image attributes follow') .att('img', 'height', 'CDATA', '#REQUIRED') .att('img', 'visible...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/doctype.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/doctype.coffee
60
109
oozcitak/xmlbuilder-js:test/basic/doctype.coffee:5:raw_corpus
raw_corpus
""" <?xml version="1.0"?> <!DOCTYPE root SYSTEM "hello.dtd" [ <?pub_border thin?> <!ELEMENT img EMPTY> <!-- Image attributes follow --> <!ATTLIST img height CDATA #REQUIRED> <!ATTLIST img visible (yes|no) "yes"> <!NOTATION fs SYSTEM "http://my.fs.com/reader"> ...
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/doctype.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/doctype.coffee
112
138
oozcitak/xmlbuilder-js:test/basic/doctype.coffee:5:completion
completion
""" <?xml version="1.0"?> <!DOCTYPE root SYSTEM "hello.dtd" [ <?pub_border thin?> <!ELEMENT img EMPTY> <!-- Image attributes follow --> <!ATTLIST img height CDATA #REQUIRED> <!ATTLIST img visible (yes|no) "yes"> <!NOTATION fs SYSTEM "http://my.fs.com/reader"> ...
<!ENTITY ent "my val"> <!ENTITY ent SYSTEM "http://www.myspec.com/ent"> <!ENTITY ent PUBLIC "-//MY//SPEC ENT//EN" "http://www.myspec.com/ent"> <!ENTITY ent SYSTEM "http://www.myspec.com/ent" NDATA entprg> <!ENTITY ent PUBLIC "-//MY//SPEC ENT//EN" "http://www.myspec.com/ent" NDATA entprg>...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/doctype.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/doctype.coffee
112
138
Glavin001/atom-beautify:src/views/loading-view.coffee:1:raw_corpus
raw_corpus
{View, TextEditorView} = require 'atom-space-pen-views' module.exports = class LoadingView extends View @content: -> @div class: 'atom-beautify message-panel', => @div class: 'overlay from-top', => @div class: "tool-panel panel-bottom", => @div class: "inset-pane...
CoffeeScript
Glavin001/atom-beautify
src/views/loading-view.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/views/loading-view.coffee
1
38
Glavin001/atom-beautify:src/views/loading-view.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {View, TextEditorView} = require 'atom-space-pen-views' module.exports = class LoadingView extends View @content: -> @div class: 'atom-beautify message-panel', => @div class: 'overlay from-top', => @div class: "tool-pane...
var LoadingView, TextEditorView, View, boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }; ({View, TextEditorView} = require('atom-space-pen-views')); module.exports = LoadingView = class LoadingView ex...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/views/loading-view.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/views/loading-view.coffee
1
38
Glavin001/atom-beautify:src/views/loading-view.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LoadingView, TextEditorView, View, boundMethodCheck = function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }; ({View, TextEditorView} = require('atom-space-pen-views')...
{View, TextEditorView} = require 'atom-space-pen-views' module.exports = class LoadingView extends View @content: -> @div class: 'atom-beautify message-panel', => @div class: 'overlay from-top', => @div class: "tool-panel panel-bottom", => @div class: "inset-pane...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/views/loading-view.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/views/loading-view.coffee
1
38
Glavin001/atom-beautify:src/views/loading-view.coffee:1:completion
completion
{View, TextEditorView} = require 'atom-space-pen-views' module.exports = class LoadingView extends View @content: -> @div class: 'atom-beautify message-panel', => @div class: 'overlay from-top', => @div class: "tool-panel panel-bottom", => @div class: "inset-pane...
outlet: 'title' 'Atom Beautify' @div class: "panel-body padded select-list text-center" outlet: 'body' => @div => @span class: 'text-center loading loading-spinner-...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/views/loading-view.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/views/loading-view.coffee
1
38
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:1:raw_corpus
raw_corpus
_handleCallback = (callback = ->) -> _callback = (err, res, data) -> if res?.statusCode is 200 callback err, data else err or= new Err "PUSH_FAILED", data.message callback err
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
11
18
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _handleCallback = (callback = ->) -> _callback = (err, res, data) -> if res?.statusCode is 200 callback err, data else err or= new Err "PUSH_FAILED", data.message callback err ```
var _handleCallback; _handleCallback = function(callback = function() {}) { var _callback; return _callback = function(err, res, data) { if ((res != null ? res.statusCode : void 0) === 200) { return callback(err, data); } else { err || (err = new Err("PUSH_FAILED", data.message)); return ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
11
18
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _handleCallback; _handleCallback = function(callback = function() {}) { var _callback; return _callback = function(err, res, data) { if ((res != null ? res.statusCode : void 0) === 200) { return callback(err, data); } else { err || (err...
_handleCallback = (callback = ->) -> _callback = (err, res, data) -> if res?.statusCode is 200 callback err, data else err or= new Err "PUSH_FAILED", data.message callback err
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
11
18
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:1:completion
completion
_handleCallback = (callback = ->) -> _callback = (err, res, data) -> if res?.statusCode is 200
callback err, data else err or= new Err "PUSH_FAILED", data.message callback err
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
11
18
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:2:raw_corpus
raw_corpus
tps.subscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/subscribe' json: true headers: 'x-app-key': config.tps.appKey 'x-app-secret': config.tps.appSecret ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
20
34
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript tps.subscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/subscribe' json: true headers: 'x-app-key': config....
tps.subscribe = function(channelKey, userId, callback = function() {}) { var options; if (!config.tps) { return callback(new Err('CONFIG_MISSING', 'tps')); } options = { method: 'POST', url: config.tps.apiHost + '/channels/subscribe', json: true, headers: { 'x-app-key': config.tps.appK...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
20
34
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript tps.subscribe = function(channelKey, userId, callback = function() {}) { var options; if (!config.tps) { return callback(new Err('CONFIG_MISSING', 'tps')); } options = { method: 'POST', url: config.tps.apiHost + '/channels/subscribe', json: ...
tps.subscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/subscribe' json: true headers: 'x-app-key': config.tps.appKey 'x-app-secret': config.tps.appSecret ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
20
34
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:2:completion
completion
tps.subscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/subscribe' json: true
headers: 'x-app-key': config.tps.appKey 'x-app-secret': config.tps.appSecret body: channelKey: channelKey userId: userId request options, _handleCallback(callback)
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
20
34
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:3:raw_corpus
raw_corpus
tps.unsubscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/unsubscribe' json: true headers: 'x-app-key': config.tps.appKey 'x-app-secret': config.tps.appSecret...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
36
59
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript tps.unsubscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/unsubscribe' json: true headers: 'x-app-key': con...
var bulk, tpsOptions; tps.unsubscribe = function(channelKey, userId, callback = function() {}) { var options; if (!config.tps) { return callback(new Err('CONFIG_MISSING', 'tps')); } options = { method: 'POST', url: config.tps.apiHost + '/channels/unsubscribe', json: true, headers: { '...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
36
59
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var bulk, tpsOptions; tps.unsubscribe = function(channelKey, userId, callback = function() {}) { var options; if (!config.tps) { return callback(new Err('CONFIG_MISSING', 'tps')); } options = { method: 'POST', url: config.tps.apiHost + '/channe...
tps.unsubscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/unsubscribe' json: true headers: 'x-app-key': config.tps.appKey 'x-app-secret': config.tps.appSecret...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
36
59
jianliaoim/talk-os:talk-api2x/server/components/tps.coffee:3:completion
completion
tps.unsubscribe = (channelKey, userId, callback = ->) -> return callback(new Err('CONFIG_MISSING', 'tps')) unless config.tps options = method: 'POST' url: config.tps.apiHost + '/channels/unsubscribe' json: true headers: 'x-app-key': config.tps.appKey 'x-app-secret': config.tps.appSecret...
userId: userId request options, _handleCallback(callback) bulk = payloads: [] tpsOptions = max: 100 interval: 1000 timer: null cleared: true
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/components/tps.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/components/tps.coffee
36
59