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
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:completion
completion
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
[] unless config["urls"] paths = -> return config["paths"] if config["paths"] [''] unless config["paths"] locale = -> grunt.fatal("Locale key is mandatory") unless config["locale"] config["locale"] if config["locale"] strategy = -> config["strategy"] if config["strategy"] exports.params ...
CoffeeScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
57a0c4ea5823c5a5e6da03de61709ea0027c20d0
459
https://github.com/jrcryer/grunt-pagespeed/blob/57a0c4ea5823c5a5e6da03de61709ea0027c20d0/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:2:raw_corpus
raw_corpus
exports.threshold = -> return DEFAULT_THRESHOLD unless config["threshold"] config["threshold"] return exports
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
57a0c4ea5823c5a5e6da03de61709ea0027c20d0
459
https://github.com/jrcryer/grunt-pagespeed/blob/57a0c4ea5823c5a5e6da03de61709ea0027c20d0/tasks/lib/config.coffee
51
56
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.threshold = -> return DEFAULT_THRESHOLD unless config["threshold"] config["threshold"] return exports ```
exports.threshold = function() { if (!config["threshold"]) { return DEFAULT_THRESHOLD; } return config["threshold"]; }; return exports;
CoffeeScript
JavaScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
57a0c4ea5823c5a5e6da03de61709ea0027c20d0
459
https://github.com/jrcryer/grunt-pagespeed/blob/57a0c4ea5823c5a5e6da03de61709ea0027c20d0/tasks/lib/config.coffee
51
56
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.threshold = function() { if (!config["threshold"]) { return DEFAULT_THRESHOLD; } return config["threshold"]; }; return exports; ```
exports.threshold = -> return DEFAULT_THRESHOLD unless config["threshold"] config["threshold"] return exports
JavaScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
57a0c4ea5823c5a5e6da03de61709ea0027c20d0
459
https://github.com/jrcryer/grunt-pagespeed/blob/57a0c4ea5823c5a5e6da03de61709ea0027c20d0/tasks/lib/config.coffee
51
56
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:2:completion
completion
exports.threshold = -> return DEFAULT_THRESHOLD unless config["threshold"]
config["threshold"] return exports
CoffeeScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
57a0c4ea5823c5a5e6da03de61709ea0027c20d0
459
https://github.com/jrcryer/grunt-pagespeed/blob/57a0c4ea5823c5a5e6da03de61709ea0027c20d0/tasks/lib/config.coffee
51
56
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:raw_corpus
raw_corpus
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
91552891db8bbf875f9dfd5d05c1a74a8afb92eb
459
https://github.com/jrcryer/grunt-pagespeed/blob/91552891db8bbf875f9dfd5d05c1a74a8afb92eb/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70...
// grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var DEFAULT_THRESHOLD, config, exports, key, locale, paths, strategy, url, urls; exports = {}; config =...
CoffeeScript
JavaScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
91552891db8bbf875f9dfd5d05c1a74a8afb92eb
459
https://github.com/jrcryer/grunt-pagespeed/blob/91552891db8bbf875f9dfd5d05c1a74a8afb92eb/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var DEFAULT_THRESHOLD, config, exports, key, locale,...
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
JavaScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
91552891db8bbf875f9dfd5d05c1a74a8afb92eb
459
https://github.com/jrcryer/grunt-pagespeed/blob/91552891db8bbf875f9dfd5d05c1a74a8afb92eb/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:completion
completion
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
return config["urls"] if config["urls"] [] unless config["urls"] paths = -> return config["paths"] if config["paths"] [''] unless config["paths"] locale = -> config["locale"] if config["locale"] strategy = -> config["strategy"] if config["strategy"] exports.params = (options) -> conf...
CoffeeScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
91552891db8bbf875f9dfd5d05c1a74a8afb92eb
459
https://github.com/jrcryer/grunt-pagespeed/blob/91552891db8bbf875f9dfd5d05c1a74a8afb92eb/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:raw_corpus
raw_corpus
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> _ = grunt.util._ exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("...
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
8717917f807bdee6719ddc55c69a0e580b9cb6d6
459
https://github.com/jrcryer/grunt-pagespeed/blob/8717917f807bdee6719ddc55c69a0e580b9cb6d6/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> _ = grunt.util._ exports = {} config = ...
// grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var DEFAULT_THRESHOLD, _, config, exports, key, locale, paths, strategy, url, urls; _ = grunt.util._; e...
CoffeeScript
JavaScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
8717917f807bdee6719ddc55c69a0e580b9cb6d6
459
https://github.com/jrcryer/grunt-pagespeed/blob/8717917f807bdee6719ddc55c69a0e580b9cb6d6/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var DEFAULT_THRESHOLD, _, config, exports, key, loca...
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> _ = grunt.util._ exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("...
JavaScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
8717917f807bdee6719ddc55c69a0e580b9cb6d6
459
https://github.com/jrcryer/grunt-pagespeed/blob/8717917f807bdee6719ddc55c69a0e580b9cb6d6/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:completion
completion
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> _ = grunt.util._ exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("...
return config["urls"] if config["urls"] [] unless config["urls"] paths = -> return config["paths"] if config["paths"] [''] unless config["paths"] locale = -> config["locale"] if config["locale"] strategy = -> config["strategy"] if config["strategy"] exports.params = (options) -> conf...
CoffeeScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
8717917f807bdee6719ddc55c69a0e580b9cb6d6
459
https://github.com/jrcryer/grunt-pagespeed/blob/8717917f807bdee6719ddc55c69a0e580b9cb6d6/tasks/lib/config.coffee
1
50
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:raw_corpus
raw_corpus
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
0fd25dcc4148f4e235fdaca820faf0e6a185faa8
459
https://github.com/jrcryer/grunt-pagespeed/blob/0fd25dcc4148f4e235fdaca820faf0e6a185faa8/tasks/lib/config.coffee
1
44
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70...
// grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var DEFAULT_THRESHOLD, config, exports, key, locale, strategy, url; exports = {}; config = {}; DEFAUL...
CoffeeScript
JavaScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
0fd25dcc4148f4e235fdaca820faf0e6a185faa8
459
https://github.com/jrcryer/grunt-pagespeed/blob/0fd25dcc4148f4e235fdaca820faf0e6a185faa8/tasks/lib/config.coffee
1
44
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var DEFAULT_THRESHOLD, config, exports, key, locale,...
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
JavaScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
0fd25dcc4148f4e235fdaca820faf0e6a185faa8
459
https://github.com/jrcryer/grunt-pagespeed/blob/0fd25dcc4148f4e235fdaca820faf0e6a185faa8/tasks/lib/config.coffee
1
44
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:completion
completion
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} DEFAULT_THRESHOLD = 70 key = -> grunt.fatal("API key is mandatory") unle...
locale = -> config["locale"] if config["locale"] strategy = -> config["strategy"] if config["strategy"] exports.params = (options) -> config = options params = {} params["key"] = key() if key() params["url"] = url() if url() params["locale"] = locale() if locale() params["strategy...
CoffeeScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
0fd25dcc4148f4e235fdaca820faf0e6a185faa8
459
https://github.com/jrcryer/grunt-pagespeed/blob/0fd25dcc4148f4e235fdaca820faf0e6a185faa8/tasks/lib/config.coffee
1
44
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:raw_corpus
raw_corpus
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} key = -> grunt.fatal("API key is mandatory") unless config["key"] conf...
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
47d3fa0347b3babdbc341bac60370578add8d204
459
https://github.com/jrcryer/grunt-pagespeed/blob/47d3fa0347b3babdbc341bac60370578add8d204/tasks/lib/config.coffee
1
39
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} key = -> grunt.fa...
// grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var config, exports, key, locale, strategy, url; exports = {}; config = {}; key = function() { if...
CoffeeScript
JavaScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
47d3fa0347b3babdbc341bac60370578add8d204
459
https://github.com/jrcryer/grunt-pagespeed/blob/47d3fa0347b3babdbc341bac60370578add8d204/tasks/lib/config.coffee
1
39
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // grunt-pagespeed // http://www.jamescryer.com/grunt-pagespeed // Copyright (c) 2013 James Cryer // http://www.jamescryer.com // Licensed under the MIT license. 'use strict'; exports.init = function(grunt) { var config, exports, key, locale, strategy, url; e...
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} key = -> grunt.fatal("API key is mandatory") unless config["key"] conf...
JavaScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
47d3fa0347b3babdbc341bac60370578add8d204
459
https://github.com/jrcryer/grunt-pagespeed/blob/47d3fa0347b3babdbc341bac60370578add8d204/tasks/lib/config.coffee
1
39
jrcryer/grunt-pagespeed:tasks/lib/config.coffee:1:completion
completion
# # grunt-pagespeed # http://www.jamescryer.com/grunt-pagespeed # # Copyright (c) 2013 James Cryer # http://www.jamescryer.com # Licensed under the MIT license. # 'use strict'; exports.init = (grunt) -> exports = {} config = {} key = -> grunt.fatal("API key is mandatory") unless config["key"] conf...
url = -> config["url"] if config["url"] locale = -> config["locale"] if config["locale"] strategy = -> config["strategy"] if config["strategy"] exports.params = (options) -> config = options params = {} params["key"] = key() if key() params["url"] = url() if url() params["local...
CoffeeScript
CoffeeScript
jrcryer/grunt-pagespeed
tasks/lib/config.coffee
MIT
47d3fa0347b3babdbc341bac60370578add8d204
459
https://github.com/jrcryer/grunt-pagespeed/blob/47d3fa0347b3babdbc341bac60370578add8d204/tasks/lib/config.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:raw_corpus
raw_corpus
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript { MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> s...
var MessageActionType, userinput, viewstate; ({MessageActionType} = require('hangupsjs')); viewstate = require('../src/ui/models/viewstate'); userinput = require('../src/ui/models/userinput'); describe('userinput', function() { describe('buildChatMessage', function() { it('takes a text and does good', functio...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MessageActionType, userinput, viewstate; ({MessageActionType} = require('hangupsjs')); viewstate = require('../src/ui/models/viewstate'); userinput = require('../src/ui/models/userinput'); describe('userinput', function() { describe('buildChatMessage', fu...
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:completion
completion
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
eql msg.otr, 2 it 'recognizes /me messages', -> sender = { first_name: 'John' } msg = userinput.buildChatMessage sender, '/me says hello' eql msg.message_action_type, [[MessageActionType.ME_ACTION, '']] eql msg.segs, [[0,'John says hello']] eql msg.se...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:2:raw_corpus
raw_corpus
it 'does text', -> userinput.parse mb, 'foo' eql mb.text.args, [['foo']] eql coll, 't' it 'does text with whitespace', -> userinput.parse mb, ' \n \n foo' eql mb.text.args, [[' '],[' '],[' foo']] eql mb.linebreak.args, [[],[]] ...
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
41
79
yakyak/yakyak:test/test-userinput.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'does text', -> userinput.parse mb, 'foo' eql mb.text.args, [['foo']] eql coll, 't' it 'does text with whitespace', -> userinput.parse mb, ' \n \n foo' eql mb.text.args, [[' '],[' '],[' foo...
it('does text', function() { userinput.parse(mb, 'foo'); eql(mb.text.args, [['foo']]); return eql(coll, 't'); }); it('does text with whitespace', function() { userinput.parse(mb, ' \n \n foo'); eql(mb.text.args, [[' '], [' '], [' foo']]); eql(mb.linebreak.args, [[], []]); return eql(coll, 'tntnt'); });...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
41
79
yakyak/yakyak:test/test-userinput.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('does text', function() { userinput.parse(mb, 'foo'); eql(mb.text.args, [['foo']]); return eql(coll, 't'); }); it('does text with whitespace', function() { userinput.parse(mb, ' \n \n foo'); eql(mb.text.args, [[' '], [' '], [' foo']]); eql(mb.line...
it 'does text', -> userinput.parse mb, 'foo' eql mb.text.args, [['foo']] eql coll, 't' it 'does text with whitespace', -> userinput.parse mb, ' \n \n foo' eql mb.text.args, [[' '],[' '],[' foo']] eql mb.linebreak.args, [[],[]] ...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
41
79
yakyak/yakyak:test/test-userinput.coffee:2:completion
completion
it 'does text', -> userinput.parse mb, 'foo' eql mb.text.args, [['foo']] eql coll, 't' it 'does text with whitespace', -> userinput.parse mb, ' \n \n foo' eql mb.text.args, [[' '],[' '],[' foo']] eql mb.linebreak.args, [[],[]] ...
eql mb.linebreak.args, [[]] eql mb.text.args, [['foo'],['bar']] eql coll, 'tnt' it 'does not ignore last linebreak', -> userinput.parse mb, 'foo\n' eql mb.text.args, [['foo']] eql mb.linebreak.args, [[]] eql coll, 'tn' it 'does no...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
41
79
yakyak/yakyak:test/test-userinput.coffee:3:raw_corpus
raw_corpus
it 'finds links in text', -> userinput.parse mb, 'a http://www.abc.com b' eql mb.text.args, [['a '],[' b']] eql mb.link.args, [['http://www.abc.com','http://www.abc.com']] eql coll, 'tlt' it 'finds multiple links in text', -> userinput.parse mb, 'a ht...
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
81
92
yakyak/yakyak:test/test-userinput.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'finds links in text', -> userinput.parse mb, 'a http://www.abc.com b' eql mb.text.args, [['a '],[' b']] eql mb.link.args, [['http://www.abc.com','http://www.abc.com']] eql coll, 'tlt' it 'finds multiple...
it('finds links in text', function() { userinput.parse(mb, 'a http://www.abc.com b'); eql(mb.text.args, [['a '], [' b']]); eql(mb.link.args, [['http://www.abc.com', 'http://www.abc.com']]); return eql(coll, 'tlt'); }); it('finds multiple links in text', function() { userinput.parse(mb, 'a http://www.abc.com ...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
81
92
yakyak/yakyak:test/test-userinput.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('finds links in text', function() { userinput.parse(mb, 'a http://www.abc.com b'); eql(mb.text.args, [['a '], [' b']]); eql(mb.link.args, [['http://www.abc.com', 'http://www.abc.com']]); return eql(coll, 'tlt'); }); it('finds multiple links in text', fu...
it 'finds links in text', -> userinput.parse mb, 'a http://www.abc.com b' eql mb.text.args, [['a '],[' b']] eql mb.link.args, [['http://www.abc.com','http://www.abc.com']] eql coll, 'tlt' it 'finds multiple links in text', -> userinput.parse mb, 'a ht...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
81
92
yakyak/yakyak:test/test-userinput.coffee:3:completion
completion
it 'finds links in text', -> userinput.parse mb, 'a http://www.abc.com b' eql mb.text.args, [['a '],[' b']] eql mb.link.args, [['http://www.abc.com','http://www.abc.com']] eql coll, 'tlt'
it 'finds multiple links in text', -> userinput.parse mb, 'a http://www.abc.com b https://foo.bar c' eql mb.text.args, [['a '],[' b '],[' c']] eql mb.link.args, [['http://www.abc.com','http://www.abc.com'], ['https://foo.bar','https://foo.bar']] eql coll, ...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/test/test-userinput.coffee
81
92
yakyak/yakyak:test/test-userinput.coffee:1:raw_corpus
raw_corpus
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20
3,762
https://github.com/yakyak/yakyak/blob/b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript { MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> s...
var MessageActionType, userinput, viewstate; ({MessageActionType} = require('hangupsjs')); viewstate = require('../src/ui/models/viewstate'); userinput = require('../src/ui/models/userinput'); describe('userinput', function() { describe('buildChatMessage', function() { it('takes a text and does good', functio...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-userinput.coffee
MIT
b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20
3,762
https://github.com/yakyak/yakyak/blob/b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MessageActionType, userinput, viewstate; ({MessageActionType} = require('hangupsjs')); viewstate = require('../src/ui/models/viewstate'); userinput = require('../src/ui/models/userinput'); describe('userinput', function() { describe('buildChatMessage', fu...
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20
3,762
https://github.com/yakyak/yakyak/blob/b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:completion
completion
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
eql msg.otr, 2 it 'recognizes /me messages', -> sender = { first_name: 'John' } msg = userinput.buildChatMessage sender, '/me says hello' eql msg.message_action_type, [[MessageActionType.ME_ACTION, '']] eql msg.segs, [[0,'John says hello']] eql msg.se...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20
3,762
https://github.com/yakyak/yakyak/blob/b8f86e4ef0d6426c8c024f0cdb3cb1b5b70a8d20/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:raw_corpus
raw_corpus
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
7c27744b130ebc8b4227920847c7a92ea384aaf5
3,762
https://github.com/yakyak/yakyak/blob/7c27744b130ebc8b4227920847c7a92ea384aaf5/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript { MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> s...
var MessageActionType, userinput, viewstate; ({MessageActionType} = require('hangupsjs')); viewstate = require('../src/ui/models/viewstate'); userinput = require('../src/ui/models/userinput'); describe('userinput', function() { describe('buildChatMessage', function() { it('takes a text and does good', functio...
CoffeeScript
JavaScript
yakyak/yakyak
test/test-userinput.coffee
MIT
7c27744b130ebc8b4227920847c7a92ea384aaf5
3,762
https://github.com/yakyak/yakyak/blob/7c27744b130ebc8b4227920847c7a92ea384aaf5/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MessageActionType, userinput, viewstate; ({MessageActionType} = require('hangupsjs')); viewstate = require('../src/ui/models/viewstate'); userinput = require('../src/ui/models/userinput'); describe('userinput', function() { describe('buildChatMessage', fu...
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
JavaScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
7c27744b130ebc8b4227920847c7a92ea384aaf5
3,762
https://github.com/yakyak/yakyak/blob/7c27744b130ebc8b4227920847c7a92ea384aaf5/test/test-userinput.coffee
1
39
yakyak/yakyak:test/test-userinput.coffee:1:completion
completion
{ MessageActionType } = require 'hangupsjs' viewstate = require '../src/ui/models/viewstate' userinput = require '../src/ui/models/userinput' describe 'userinput', -> describe 'buildChatMessage', -> it 'takes a text and does good', -> sender = { firstName: 'John' } viewstate.selec...
eql msg.otr, 2 it 'recognizes /me messages', -> sender = { first_name: 'John' } msg = userinput.buildChatMessage sender, '/me says hello' eql msg.message_action_type, [[MessageActionType.ME_ACTION, '']] eql msg.segs, [[0,'John says hello']] eql msg.se...
CoffeeScript
CoffeeScript
yakyak/yakyak
test/test-userinput.coffee
MIT
7c27744b130ebc8b4227920847c7a92ea384aaf5
3,762
https://github.com/yakyak/yakyak/blob/7c27744b130ebc8b4227920847c7a92ea384aaf5/test/test-userinput.coffee
1
39
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:1:raw_corpus
raw_corpus
should = require 'should' async = require 'async' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request} = app { RoomModel } = limbo.use 'talk' describe 'Tag#Create/Update/Read/Remove', -> before prepare it 'should create a tag and receive a broadcast notification', (done) -> async.au...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
1
50
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should = require 'should' async = require 'async' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request} = app { RoomModel } = limbo.use 'talk' describe 'Tag#Create/Update/Read/Remove', -> before prepare it 'should create a tag and r...
var RoomModel, app, async, cleanup, limbo, prepare, request, should; should = require('should'); async = require('async'); limbo = require('limbo'); app = require('../app'); ({prepare, cleanup, request} = app); ({RoomModel} = limbo.use('talk')); describe('Tag#Create/Update/Read/Remove', function() { before(pre...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
1
50
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var RoomModel, app, async, cleanup, limbo, prepare, request, should; should = require('should'); async = require('async'); limbo = require('limbo'); app = require('../app'); ({prepare, cleanup, request} = app); ({RoomModel} = limbo.use('talk')); describe('Ta...
should = require 'should' async = require 'async' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request} = app { RoomModel } = limbo.use 'talk' describe 'Tag#Create/Update/Read/Remove', -> before prepare it 'should create a tag and receive a broadcast notification', (done) -> async.au...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
1
50
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:1:completion
completion
should = require 'should' async = require 'async' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request} = app { RoomModel } = limbo.use 'talk' describe 'Tag#Create/Update/Read/Remove', -> before prepare it 'should create a tag and receive a broadcast notification', (done) -> async.au...
options = method: 'POST' url: "/tags" body: JSON.stringify _teamId: app.team1._id _sessionUserId: app.user1._id name: '团队笔记' request options, callback , done it 'should update a tag and receive a broadcast notification', (done) -> asy...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
1
50
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:3:raw_corpus
raw_corpus
it 'should read a tag list of team', (done) -> options = method: 'GET' url: "/tags" qs: _teamId: app.team1._id _sessionUserId: app.user1._id request options, (err, res, tags) -> tags.length.should.eql 1 tags.forEach (tag) -> tag.name.should.eql "新笔记" done err...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
55
86
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should read a tag list of team', (done) -> options = method: 'GET' url: "/tags" qs: _teamId: app.team1._id _sessionUserId: app.user1._id request options, (err, res, tags) -> tags.length.should.eql 1 tags....
it('should read a tag list of team', function(done) { var options; options = { method: 'GET', url: "/tags", qs: { _teamId: app.team1._id, _sessionUserId: app.user1._id } }; return request(options, function(err, res, tags) { tags.length.should.eql(1); tags.forEach(function(tag...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
55
86
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should read a tag list of team', function(done) { var options; options = { method: 'GET', url: "/tags", qs: { _teamId: app.team1._id, _sessionUserId: app.user1._id } }; return request(options, function(err, res, tags) { t...
it 'should read a tag list of team', (done) -> options = method: 'GET' url: "/tags" qs: _teamId: app.team1._id _sessionUserId: app.user1._id request options, (err, res, tags) -> tags.length.should.eql 1 tags.forEach (tag) -> tag.name.should.eql "新笔记" done err...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
55
86
jianliaoim/talk-os:talk-api2x/test/controllers/tag.coffee:3:completion
completion
it 'should read a tag list of team', (done) -> options = method: 'GET' url: "/tags" qs: _teamId: app.team1._id _sessionUserId: app.user1._id request options, (err, res, tags) -> tags.length.should.eql 1 tags.forEach (tag) -> tag.name.should.eql "新笔记" done err...
broadcast: (callback) -> app.broadcast = (channel, event, data) -> event.should.eql "tag:remove" channel.should.eql "team:#{app.team1._id}" data.should.have.properties 'name', '_creatorId' callback() removeTag: (callback) -> options = method: 'DELE...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/tag.coffee
55
86
snd/url-pattern:common.coffee:1:raw_corpus
raw_corpus
module.exports = common = getNames: (arg) -> return [] if arg instanceof RegExp regex = /:([^\/]+)/g names = [] results = regex.exec arg while results? names.push results[1] results = regex.exec arg names toRegexString: (arg) -> ...
CoffeeScript
snd/url-pattern
common.coffee
MIT
3b934d491e99dd3dc23b84ef3cc70243545720a4
588
https://github.com/snd/url-pattern/blob/3b934d491e99dd3dc23b84ef3cc70243545720a4/common.coffee
1
18
snd/url-pattern:common.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = common = getNames: (arg) -> return [] if arg instanceof RegExp regex = /:([^\/]+)/g names = [] results = regex.exec arg while results? names.push results[1] results = regex.ex...
var common; module.exports = common = { getNames: function(arg) { var names, regex, results; if (arg instanceof RegExp) { return []; } regex = /:([^\/]+)/g; names = []; results = regex.exec(arg); while (results != null) { names.push(results[1]); results = regex.exec(arg)...
CoffeeScript
JavaScript
snd/url-pattern
common.coffee
MIT
3b934d491e99dd3dc23b84ef3cc70243545720a4
588
https://github.com/snd/url-pattern/blob/3b934d491e99dd3dc23b84ef3cc70243545720a4/common.coffee
1
18
snd/url-pattern:common.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var common; module.exports = common = { getNames: function(arg) { var names, regex, results; if (arg instanceof RegExp) { return []; } regex = /:([^\/]+)/g; names = []; results = regex.exec(arg); while (results != null) { ...
module.exports = common = getNames: (arg) -> return [] if arg instanceof RegExp regex = /:([^\/]+)/g names = [] results = regex.exec arg while results? names.push results[1] results = regex.exec arg names toRegexString: (arg) -> ...
JavaScript
CoffeeScript
snd/url-pattern
common.coffee
MIT
3b934d491e99dd3dc23b84ef3cc70243545720a4
588
https://github.com/snd/url-pattern/blob/3b934d491e99dd3dc23b84ef3cc70243545720a4/common.coffee
1
18
snd/url-pattern:common.coffee:1:completion
completion
module.exports = common = getNames: (arg) -> return [] if arg instanceof RegExp regex = /:([^\/]+)/g names = [] results = regex.exec arg
while results? names.push results[1] results = regex.exec arg names toRegexString: (arg) -> common.getNames(arg).forEach (name) -> arg = arg.replace(':' + name, '([^\/]+)') '^' + arg.replace(/\*/g, '.*') + '$'
CoffeeScript
CoffeeScript
snd/url-pattern
common.coffee
MIT
3b934d491e99dd3dc23b84ef3cc70243545720a4
588
https://github.com/snd/url-pattern/blob/3b934d491e99dd3dc23b84ef3cc70243545720a4/common.coffee
1
18
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:1:raw_corpus
raw_corpus
React = require 'react' cx = require 'classnames' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' keyboard = require '../util/keyboard' LightDropdown = React.createFactory require '../module/light-dropdown' div = React.createFactory 'div' entries = ['all-types', 'type-file...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' cx = require 'classnames' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' keyboard = require '../util/keyboard' LightDropdown = React.createFactory require '../module/light-dropdown' div = Reac...
var LightDropdown, PureRenderMixin, React, T, cx, div, entries, keyboard, lang; React = require('react'); cx = require('classnames'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); keyboard = require('../util/keyboard'); LightDropdown = React.createFactory(require(...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var LightDropdown, PureRenderMixin, React, T, cx, div, entries, keyboard, lang; React = require('react'); cx = require('classnames'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); keyboard = require('../util/ke...
React = require 'react' cx = require 'classnames' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' keyboard = require '../util/keyboard' LightDropdown = React.createFactory require '../module/light-dropdown' div = React.createFactory 'div' entries = ['all-types', 'type-file...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:1:completion
completion
React = require 'react' cx = require 'classnames' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' keyboard = require '../util/keyboard' LightDropdown = React.createFactory require '../module/light-dropdown' div = React.createFactory 'div' entries = ['all-types', 'type-file...
# events onItemClick: (type) -> @props.onChange type onMenuToggle: -> @setState showMenu: (not @state.showMenu) # renderers renderItems: -> entries.map (item) => onClick = => @onItemClick item if @props.type className = cx 'item', 'is-selected': item is @props.type else...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:2:raw_corpus
raw_corpus
show: @state.showMenu onToggle: @onMenuToggle @renderItems()
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
51
53
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript show: @state.showMenu onToggle: @onMenuToggle @renderItems() ```
({ show: this.state.showMenu({ onToggle: this.onMenuToggle }, this.renderItems()) });
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
51
53
jianliaoim/talk-os:talk-web/client/app/filter-type.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ show: this.state.showMenu({ onToggle: this.onMenuToggle }, this.renderItems()) }); ```
show: @state.showMenu onToggle: @onMenuToggle @renderItems()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/filter-type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/filter-type.coffee
51
53
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'team-activity' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired activity: React.PropTypes.instanceOf(Immutable.Map).isRequired showRemove: React.PropTypes.bool.isRequired # events onClick: -> switch @props.activity.get('typ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
18
67
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'team-activity' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired activity: React.PropTypes.instanceOf(Immutable.Map).isRequired showRemove: React.PropTypes.bool.isRequired # ...
module.exports = React.createClass({ displayName: 'team-activity', propTypes: { team: React.PropTypes.instanceOf(Immutable.Map).isRequired, activity: React.PropTypes.instanceOf(Immutable.Map).isRequired, showRemove: React.PropTypes.bool.isRequired }, // events onClick: function() { var target;...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
18
67
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'team-activity', propTypes: { team: React.PropTypes.instanceOf(Immutable.Map).isRequired, activity: React.PropTypes.instanceOf(Immutable.Map).isRequired, showRemove: React.PropTypes.bool.isRequired ...
module.exports = React.createClass displayName: 'team-activity' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired activity: React.PropTypes.instanceOf(Immutable.Map).isRequired showRemove: React.PropTypes.bool.isRequired # events onClick: -> switch @props.activity.get('typ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
18
67
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:1:completion
completion
module.exports = React.createClass displayName: 'team-activity' propTypes: team: React.PropTypes.instanceOf(Immutable.Map).isRequired activity: React.PropTypes.instanceOf(Immutable.Map).isRequired showRemove: React.PropTypes.bool.isRequired # events onClick: -> switch @props.activity.get('typ...
event.preventDefault() window.open urlParse event.target.getAttribute('href'), true # renderers renderStory: (creator, info) -> target = @props.activity.get('target') switch target.get('category') when 'topic' then @renderIdea creator, info when 'file' fileData = target.get('data')...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
18
67
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:2:raw_corpus
raw_corpus
div className: 'detail-title', fileStory.get('title') div className: 'detail-text', fileStory.get('text') renderImage: (creator, info) -> fileStory = @props.activity.get('target') div className: 'activity-details', div className: 'activity-info', creator.get('name') ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
68
117
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript div className: 'detail-title', fileStory.get('title') div className: 'detail-text', fileStory.get('text') renderImage: (creator, info) -> fileStory = @props.activity.get('target') div className: 'activity-details', div clas...
div({ className: 'detail-title' }, fileStory.get('title')); div({ className: 'detail-text' }, fileStory.get('text')); ({ renderImage: function(creator, info) { var fileStory; fileStory = this.props.activity.get('target'); return div({ className: 'activity-details' }, div({ className:...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
68
117
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript div({ className: 'detail-title' }, fileStory.get('title')); div({ className: 'detail-text' }, fileStory.get('text')); ({ renderImage: function(creator, info) { var fileStory; fileStory = this.props.activity.get('target'); return div({ clas...
div className: 'detail-title', fileStory.get('title') div className: 'detail-text', fileStory.get('text') renderImage: (creator, info) -> fileStory = @props.activity.get('target') div className: 'activity-details', div className: 'activity-info', creator.get('name') ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
68
117
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:2:completion
completion
div className: 'detail-title', fileStory.get('title') div className: 'detail-text', fileStory.get('text') renderImage: (creator, info) -> fileStory = @props.activity.get('target') div className: 'activity-details', div className: 'activity-info', creator.get('name') ...
div className: 'activity-details', div className: 'activity-info', creator.get('name') Space width: 8 info div className: 'detail-title', linkStory.get('title') div className: 'detail-link', a href: url, target: '_blank', onClick: @onLinkClick, url renderIdea...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
68
117
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:3:raw_corpus
raw_corpus
div className: 'activity-details', div className: 'activity-info', creator.get('name') Space width: 8 info div className: 'detail-title', '#', topicName if purpose? and purpose.trim().length > 0 div className: 'detail-text', purpose renderInvitation: (creator, info) ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
118
167
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript div className: 'activity-details', div className: 'activity-info', creator.get('name') Space width: 8 info div className: 'detail-title', '#', topicName if purpose? and purpose.trim().length > 0 div className: 'de...
div({ className: 'activity-details' }, div({ className: 'activity-info' }, creator.get('name'), Space({ width: 8 }), info), div({ className: 'detail-title' }, '#', topicName), (typeof purpose !== "undefined" && purpose !== null) && purpose.trim().length > 0 ? div({ className: 'detail-text' }, purpose) : void ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
118
167
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript div({ className: 'activity-details' }, div({ className: 'activity-info' }, creator.get('name'), Space({ width: 8 }), info), div({ className: 'detail-title' }, '#', topicName), (typeof purpose !== "undefined" && purpose !== null) && purpose.trim().length > 0...
div className: 'activity-details', div className: 'activity-info', creator.get('name') Space width: 8 info div className: 'detail-title', '#', topicName if purpose? and purpose.trim().length > 0 div className: 'detail-text', purpose renderInvitation: (creator, info) ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
118
167
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:3:completion
completion
div className: 'activity-details', div className: 'activity-info', creator.get('name') Space width: 8 info div className: 'detail-title', '#', topicName if purpose? and purpose.trim().length > 0 div className: 'detail-text', purpose renderInvitation: (creator, info) ...
when 'link' div className: 'activity-icon img-circle img-32 is-link', Icon size: 18, name: 'chain' when 'file' div className: 'activity-icon img-circle img-32 is-file', Icon size: 18, name: 'paperclip-lean' when 'room' div className: 'activity-...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
118
167
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:4:raw_corpus
raw_corpus
@renderIcon() Space width: 24 switch @props.activity.get('type') when 'story' then @renderStory creator, content when 'room' then @renderRoom creator, content else @renderInvitation creator, content RelativeTime data: @props.activity.get('createdAt') if @props.showRemove ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
168
176
jianliaoim/talk-os:talk-web/client/app/team-activity.coffee:4:completion
completion
@renderIcon() Space width: 24 switch @props.activity.get('type') when 'story' then @renderStory creator, content
when 'room' then @renderRoom creator, content else @renderInvitation creator, content RelativeTime data: @props.activity.get('createdAt') if @props.showRemove and (not isLog) Icon size: 16, name: 'remove', className: 'activity-remove', onClick: @onRemove
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-activity.coffee
168
176
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:raw_corpus
raw_corpus
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminal) -> @focus = @terminal.isFocused() @terminal.blur() super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true onConfirm: (input) -> if atom.config....
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
1e555ee3a49902b203134072ff079ae580fdff10
478
https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/input-dialog.coffee
1
27
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:completion
completion
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminal) -> @focus = @terminal.isFocused() @terminal.blur() super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true
onConfirm: (input) -> if atom.config.get('terminal-plus.toggles.runInsertedText') eol = os.EOL else eol = '' data = "#{input}#{eol}" @terminal.input data @cancel() cancel: -> @terminal.focus() if @focus super()
CoffeeScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
1e555ee3a49902b203134072ff079ae580fdff10
478
https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/input-dialog.coffee
1
27
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:raw_corpus
raw_corpus
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminalView) -> @focus = @terminalView.isFocused() @terminalView.blur() super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true onConfirm: (input) -> if ...
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
f2b278c2eb50780533b7a5e1fca6c8b2d7f27c5b
478
https://github.com/jeremyramin/terminal-plus/blob/f2b278c2eb50780533b7a5e1fca6c8b2d7f27c5b/lib/input-dialog.coffee
1
27
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:completion
completion
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminalView) -> @focus = @terminalView.isFocused() @terminalView.blur() super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true
onConfirm: (input) -> if atom.config.get('terminal-plus.toggles.runInsertedText') eol = os.EOL else eol = '' data = "#{input}#{eol}" @terminalView.input data @cancel() cancel: -> @terminalView.focus() if @focus super()
CoffeeScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
f2b278c2eb50780533b7a5e1fca6c8b2d7f27c5b
478
https://github.com/jeremyramin/terminal-plus/blob/f2b278c2eb50780533b7a5e1fca6c8b2d7f27c5b/lib/input-dialog.coffee
1
27
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:raw_corpus
raw_corpus
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminalView) -> super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true onConfirm: (input) -> if atom.config.get('terminal-plus.toggles.runInsertedText') eo...
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
040c0e72707d0d66f86550afc8ba4ffb60037176
478
https://github.com/jeremyramin/terminal-plus/blob/040c0e72707d0d66f86550afc8ba4ffb60037176/lib/input-dialog.coffee
1
20
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminalView) -> super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true onConfirm: (input) -> if atom.con...
var Dialog, InputDialog, os; Dialog = require("./dialog"); os = require("os"); module.exports = InputDialog = class InputDialog extends Dialog { constructor(terminalView) { super({ prompt: "Insert Text", iconClass: "icon-keyboard", stayOpen: true }); this.terminalView = terminalView; ...
CoffeeScript
JavaScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
040c0e72707d0d66f86550afc8ba4ffb60037176
478
https://github.com/jeremyramin/terminal-plus/blob/040c0e72707d0d66f86550afc8ba4ffb60037176/lib/input-dialog.coffee
1
20
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Dialog, InputDialog, os; Dialog = require("./dialog"); os = require("os"); module.exports = InputDialog = class InputDialog extends Dialog { constructor(terminalView) { super({ prompt: "Insert Text", iconClass: "icon-keyboard", stayOp...
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminalView) -> super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true onConfirm: (input) -> if atom.config.get('terminal-plus.toggles.runInsertedText') eo...
JavaScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
040c0e72707d0d66f86550afc8ba4ffb60037176
478
https://github.com/jeremyramin/terminal-plus/blob/040c0e72707d0d66f86550afc8ba4ffb60037176/lib/input-dialog.coffee
1
20
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:completion
completion
Dialog = require "./dialog" os = require "os" module.exports = class InputDialog extends Dialog constructor: (@terminalView) -> super prompt: "Insert Text" iconClass: "icon-keyboard" stayOpen: true
onConfirm: (input) -> if atom.config.get('terminal-plus.toggles.runInsertedText') eol = os.EOL else eol = '' data = "#{input}#{eol}" @terminalView.input data @cancel()
CoffeeScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
040c0e72707d0d66f86550afc8ba4ffb60037176
478
https://github.com/jeremyramin/terminal-plus/blob/040c0e72707d0d66f86550afc8ba4ffb60037176/lib/input-dialog.coffee
1
20
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:raw_corpus
raw_corpus
{TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Insert Text', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(mini: true) @label 'Escape (Esc) to exit', st...
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
122f0e5843febbd6d45873f2c2a53da17dc2a5ac
478
https://github.com/jeremyramin/terminal-plus/blob/122f0e5843febbd6d45873f2c2a53da17dc2a5ac/lib/input-dialog.coffee
1
32
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Insert Text', outlet: 'promptText' @subview 'miniEditor', new TextEdito...
var InputDialog, TextEditorView, View; ({TextEditorView, View} = require('atom-space-pen-views')); module.exports = InputDialog = class InputDialog extends View { static content() { return this.div({ class: 'terminal-plus input-dialog' }, () => { this.label('Insert Text', { outlet: 'prom...
CoffeeScript
JavaScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
122f0e5843febbd6d45873f2c2a53da17dc2a5ac
478
https://github.com/jeremyramin/terminal-plus/blob/122f0e5843febbd6d45873f2c2a53da17dc2a5ac/lib/input-dialog.coffee
1
32
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var InputDialog, TextEditorView, View; ({TextEditorView, View} = require('atom-space-pen-views')); module.exports = InputDialog = class InputDialog extends View { static content() { return this.div({ class: 'terminal-plus input-dialog' }, () => { ...
{TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Insert Text', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(mini: true) @label 'Escape (Esc) to exit', st...
JavaScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
122f0e5843febbd6d45873f2c2a53da17dc2a5ac
478
https://github.com/jeremyramin/terminal-plus/blob/122f0e5843febbd6d45873f2c2a53da17dc2a5ac/lib/input-dialog.coffee
1
32
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:completion
completion
{TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Insert Text', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(mini: true) @label 'Escape (Esc) to exit', st...
@close() 'core:cancel': => @cancel() attach: -> @panel = atom.workspace.addModalPanel(item: this.element) @miniEditor.focus() @miniEditor.getModel().scrollToCursorPosition() close: -> panelToDestroy = @panel @panel = null panelToDestroy?.destroy() atom.workspace.getActivePane().a...
CoffeeScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
122f0e5843febbd6d45873f2c2a53da17dc2a5ac
478
https://github.com/jeremyramin/terminal-plus/blob/122f0e5843febbd6d45873f2c2a53da17dc2a5ac/lib/input-dialog.coffee
1
32
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:raw_corpus
raw_corpus
{TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Input', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(mini: true) @label 'Escape (Esc) to exit', style: '...
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
edc2595496780694aa416e7a8636a92a91c5d694
478
https://github.com/jeremyramin/terminal-plus/blob/edc2595496780694aa416e7a8636a92a91c5d694/lib/input-dialog.coffee
1
31
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Input', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(...
var InputDialog, TextEditorView, View; ({TextEditorView, View} = require('atom-space-pen-views')); module.exports = InputDialog = class InputDialog extends View { static content() { return this.div({ class: 'terminal-plus input-dialog' }, () => { this.label('Input', { outlet: 'promptText...
CoffeeScript
JavaScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
edc2595496780694aa416e7a8636a92a91c5d694
478
https://github.com/jeremyramin/terminal-plus/blob/edc2595496780694aa416e7a8636a92a91c5d694/lib/input-dialog.coffee
1
31
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var InputDialog, TextEditorView, View; ({TextEditorView, View} = require('atom-space-pen-views')); module.exports = InputDialog = class InputDialog extends View { static content() { return this.div({ class: 'terminal-plus input-dialog' }, () => { ...
{TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Input', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(mini: true) @label 'Escape (Esc) to exit', style: '...
JavaScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
edc2595496780694aa416e7a8636a92a91c5d694
478
https://github.com/jeremyramin/terminal-plus/blob/edc2595496780694aa416e7a8636a92a91c5d694/lib/input-dialog.coffee
1
31
jeremyramin/terminal-plus:lib/input-dialog.coffee:1:completion
completion
{TextEditorView, View} = require 'atom-space-pen-views' module.exports = class InputDialog extends View @content: () -> @div class: 'terminal-plus input-dialog', => @label 'Input', outlet: 'promptText' @subview 'miniEditor', new TextEditorView(mini: true) @label 'Escape (Esc) to exit', style: '...
@close() 'core:cancel': => @cancel() attach: -> @panel = atom.workspace.addModalPanel(item: this.element) @miniEditor.focus() @miniEditor.getModel().scrollToCursorPosition() close: -> panelToDestroy = @panel @panel = null panelToDestroy?.destroy() atom.workspace.getActivePane().a...
CoffeeScript
CoffeeScript
jeremyramin/terminal-plus
lib/input-dialog.coffee
MIT
edc2595496780694aa416e7a8636a92a91c5d694
478
https://github.com/jeremyramin/terminal-plus/blob/edc2595496780694aa416e7a8636a92a91c5d694/lib/input-dialog.coffee
1
31
elving/swag:test/comparisons_test.coffee:1:raw_corpus
raw_corpus
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'is', -> describe '{{#is bender "great"}} \n Kiss my shiny metal ass! \n {{else}} \n Never mind :( \n {{/is}}', -> it 'should render a block if the condition is...
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
1
43
elving/swag:test/comparisons_test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'is', -> describe '{{#is bender "great"}} \n Kiss my shiny metal ass! \n {{else}} \n Never mind :( \n {{/is}}',...
var Handlebars, Swag; require('should'); Handlebars = require('handlebars'); Swag = require('../lib/swag'); Swag.registerHelpers(Handlebars); describe('is', function() { return describe('{{#is bender "great"}} \n Kiss my shiny metal ass! \n {{else}} \n Never mind :( \n {{/is}}', function() { return it('shoul...
CoffeeScript
JavaScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
1
43
elving/swag:test/comparisons_test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Handlebars, Swag; require('should'); Handlebars = require('handlebars'); Swag = require('../lib/swag'); Swag.registerHelpers(Handlebars); describe('is', function() { return describe('{{#is bender "great"}} \n Kiss my shiny metal ass! \n {{else}} \n Never...
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'is', -> describe '{{#is bender "great"}} \n Kiss my shiny metal ass! \n {{else}} \n Never mind :( \n {{/is}}', -> it 'should render a block if the condition is...
JavaScript
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
1
43
elving/swag:test/comparisons_test.coffee:1:completion
completion
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'is', -> describe '{{#is bender "great"}} \n Kiss my shiny metal ass! \n {{else}} \n Never mind :( \n {{/is}}', -> it 'should render a block if the condition is...
describe '{{#isnt number 2}} \n Kiss my great metal ass! \n {{else}} \n Never mind :( \n {{/isnt}}', -> it 'should render a block if the condition is not true.', -> source = '{{#isnt number 2}}Kiss my great metal ass!{{else}}Never mind :({{/isnt}}' template = Ha...
CoffeeScript
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
1
43
elving/swag:test/comparisons_test.coffee:2:raw_corpus
raw_corpus
template(context).should.equal 'Kiss my glorious metal ass!' describe 'gte', -> describe '{{#gte number 8}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/gte}}', -> it 'should render a block if the value is greater or equal than a given number.', -> so...
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
45
84
elving/swag:test/comparisons_test.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript template(context).should.equal 'Kiss my glorious metal ass!' describe 'gte', -> describe '{{#gte number 8}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/gte}}', -> it 'should render a block if the value is ...
template(context).should.equal('Kiss my glorious metal ass!'); describe('gte', function() { return describe('{{#gte number 8}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/gte}}', function() { return it('should render a block if the value is greater or equal than a given number.', function() ...
CoffeeScript
JavaScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
45
84
elving/swag:test/comparisons_test.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript template(context).should.equal('Kiss my glorious metal ass!'); describe('gte', function() { return describe('{{#gte number 8}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/gte}}', function() { return it('should render a block if the value...
template(context).should.equal 'Kiss my glorious metal ass!' describe 'gte', -> describe '{{#gte number 8}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/gte}}', -> it 'should render a block if the value is greater or equal than a given number.', -> so...
JavaScript
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
45
84
elving/swag:test/comparisons_test.coffee:2:completion
completion
template(context).should.equal 'Kiss my glorious metal ass!' describe 'gte', -> describe '{{#gte number 8}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/gte}}', -> it 'should render a block if the value is greater or equal than a given number.', -> so...
{{/lt}}', -> it 'should render a block if the value is less than a given number.', -> source = '{{#lt number 8}}Kiss my golden metal ass!{{else}}Never mind :({{/lt}}' template = Handlebars.compile(source) context = number: 2 template(context).should.equal 'Kis...
CoffeeScript
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
45
84
elving/swag:test/comparisons_test.coffee:3:raw_corpus
raw_corpus
describe 'or', -> describe '{{#or great magnificent}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/or}}', -> it 'should render a block if one of the values is truthy.', -> source = '{{#or great magnificent}}Kiss my perfect metal ass!{{else}}Never min...
CoffeeScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
86
110
elving/swag:test/comparisons_test.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'or', -> describe '{{#or great magnificent}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/or}}', -> it 'should render a block if one of the values is truthy.', -> source = '{{#or great...
describe('or', function() { return describe('{{#or great magnificent}} \n Kiss my perfect metal ass! \n {{else}} \n Never mind :( \n {{/or}}', function() { return it('should render a block if one of the values is truthy.', function() { var context, source, template; source = '{{#or great magnificent}}...
CoffeeScript
JavaScript
elving/swag
test/comparisons_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/comparisons_test.coffee
86
110