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
ichord/At.js:src/app.coffee:1:raw_corpus
raw_corpus
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.setIframe() this.listen() createContainer: (doc) -> if (@$el = $("#atwho-container", doc)).length == 0 ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.setIframe() this.listen() createContainer: (doc) -> ...
var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.setIframe(); this.listen(); } createContainer(doc) { if ((this.$el = $...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.setIframe(); this.listen...
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.setIframe() this.listen() createContainer: (doc) -> if (@$el = $("#atwho-container", doc)).length == 0 ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:completion
completion
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.setIframe() this.listen() createContainer: (doc) -> if (@$el = $("#atwho-container", doc)).length == 0 ...
this.createContainer if @iframeStandalone then @document else document controller: (at) -> if @alias_maps[at] current = @controllers[@alias_maps[at]] else for current_flag, c of @controllers if current_flag is at current = c break if current then current else @con...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
2
51
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
# TODO: it will produce rubbish alias map, reduse this. @alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
# TODO: it will produce rubbish alias map, reduse this. @alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => ...
@$el.remove() dispatch: -> $.map @controllers, (c) => if delay = c.get_opt('delay') clearTimeout @delayedCallback @delayedCallback = setTimeout(=> this.set_context_for c.at if c.look_up() , delay) else this.set_context_for c.at if c.look_up() on_keyup: (e)...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.view return if not (view and view.visible()) switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
102
130
ichord/At.js:src/app.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.view return if not (view and view.visible()) switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when...
({ on_keydown: function(e) { var ref, view; // return if not (view = this.controller().view).visible() view = (ref = this.controller()) != null ? ref.view : void 0; if (!(view && view.visible())) { return; } switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); ...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
102
130
ichord/At.js:src/app.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ on_keydown: function(e) { var ref, view; // return if not (view = this.controller().view).visible() view = (ref = this.controller()) != null ? ref.view : void 0; if (!(view && view.visible())) { return; } switch (e.keyCode) { ...
on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.view return if not (view and view.visible()) switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
102
130
ichord/At.js:src/app.coffee:3:completion
completion
on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.view return if not (view and view.visible()) switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev...
when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choose(...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0
5,250
https://github.com/ichord/At.js/blob/ce60958d2719f8fb5deb1bb1d2589fdc34a55fd0/src/app.coffee
102
130
ichord/At.js:src/app.coffee:1:raw_corpus
raw_corpus
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe...
var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.iframe = null; this.setIframe(); this.listen(); } setIframe(iframe) { ...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.iframe = null; this.setI...
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:completion
completion
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
current = @controllers[@alias_maps[at]] else for current_flag, c of @controllers if current_flag is at current = c break if current then current else @controllers[@current_flag] set_context_for: (at) -> @current_flag = at this # At.js can register multiple at cha...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
2
51
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
# binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide(e) .on 'blur.atwhoInner', (e) => c.vi...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
# binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide(e) .on 'blur.atwhoInner', (e) => c.vi...
this.set_context_for c.at if c.look_up() , delay) else this.set_context_for c.at if c.look_up() on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() ...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
102
124
ichord/At.js:src/app.coffee:3:completion
completion
e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault()
view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choose(e) else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
1f13a168bb7b5dbf19f2159d7839a0d11448b75e
5,250
https://github.com/ichord/At.js/blob/1f13a168bb7b5dbf19f2159d7839a0d11448b75e/src/app.coffee
102
124
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
2c47d7a9e7e6386e60c7b66ed2811d861988949c
5,250
https://github.com/ichord/At.js/blob/2c47d7a9e7e6386e60c7b66ed2811d861988949c/src/app.coffee
102
125
ichord/At.js:src/app.coffee:3:completion
completion
e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev()
when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choosing = true view.choose(e) else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
2c47d7a9e7e6386e60c7b66ed2811d861988949c
5,250
https://github.com/ichord/At.js/blob/2c47d7a9e7e6386e60c7b66ed2811d861988949c/src/app.coffee
102
125
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
# binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide(e) .on 'blur.atwhoInner', (e) => c.vi...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
4d3fb8fcebea1bee5314b2022f37a9554bbc8b57
5,250
https://github.com/ichord/At.js/blob/4d3fb8fcebea1bee5314b2022f37a9554bbc8b57/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view...
// binding jQuery events of `inputor`'s ({ listen: function() { return this.$inputor.on('keyup.atwhoInner', (e) => { return this.on_keyup(e); }).on('keydown.atwhoInner', (e) => { return this.on_keydown(e); }).on('scroll.atwhoInner', (e) => { var ref; return (ref = this.controller()...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
4d3fb8fcebea1bee5314b2022f37a9554bbc8b57
5,250
https://github.com/ichord/At.js/blob/4d3fb8fcebea1bee5314b2022f37a9554bbc8b57/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // binding jQuery events of `inputor`'s ({ listen: function() { return this.$inputor.on('keyup.atwhoInner', (e) => { return this.on_keyup(e); }).on('keydown.atwhoInner', (e) => { return this.on_keydown(e); }).on('scroll.atwhoInner', (e) =>...
# binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide(e) .on 'blur.atwhoInner', (e) => c.vi...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
4d3fb8fcebea1bee5314b2022f37a9554bbc8b57
5,250
https://github.com/ichord/At.js/blob/4d3fb8fcebea1bee5314b2022f37a9554bbc8b57/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
# binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide(e) .on 'blur.atwhoInner', (e) => c.vi...
else this.set_context_for c.at if c.look_up() on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() when KEY_CODE.P, KEY_CODE.N this.dispatch() if not ...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
4d3fb8fcebea1bee5314b2022f37a9554bbc8b57
5,250
https://github.com/ichord/At.js/blob/4d3fb8fcebea1bee5314b2022f37a9554bbc8b57/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
4d3fb8fcebea1bee5314b2022f37a9554bbc8b57
5,250
https://github.com/ichord/At.js/blob/4d3fb8fcebea1bee5314b2022f37a9554bbc8b57/src/app.coffee
102
123
ichord/At.js:src/app.coffee:3:completion
completion
when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N
return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choosing = true view.choose(e) else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
4d3fb8fcebea1bee5314b2022f37a9554bbc8b57
5,250
https://github.com/ichord/At.js/blob/4d3fb8fcebea1bee5314b2022f37a9554bbc8b57/src/app.coffee
102
123
ichord/At.js:src/app.coffee:1:raw_corpus
raw_corpus
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe...
var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.iframe = null; this.setIframe(); this.listen(); } setIframe(iframe) { ...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.iframe = null; this.setI...
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:completion
completion
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
controller: (at) -> if @alias_maps[at] current = @controllers[@alias_maps[at]] else for current_flag, c of @controllers if current_flag is at current = c break if current then current else @controllers[@current_flag] set_context_for: (at) -> @current_flag = at...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
2
51
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
@alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => ...
this.alias_maps[setting.alias] = flag(setting.alias ? (controller.init(setting), this) : void 0); ({ // binding jQuery events of `inputor`'s listen: function() { return this.$inputor.on('keyup.atwhoInner', (e) => { return this.on_keyup(e); }).on('keydown.atwhoInner', (e) => { return this.on_key...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.alias_maps[setting.alias] = flag(setting.alias ? (controller.init(setting), this) : void 0); ({ // binding jQuery events of `inputor`'s listen: function() { return this.$inputor.on('keyup.atwhoInner', (e) => { return this.on_keyup(e); }).on(...
@alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
@alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) ...
clearTimeout @delayedCallback @delayedCallback = setTimeout(=> this.set_context_for c.at if c.look_up() , delay) else this.set_context_for c.at if c.look_up() on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.vi...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P re...
switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); view.hide(e); break; case KEY_CODE.UP: e.preventDefault(); view.prev(); break; case KEY_CODE.DOWN: e.preventDefault(); view.next(); break; case KEY_CODE.P: if (!e.ctrlKey) { return; } e.preventDefau...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); view.hide(e); break; case KEY_CODE.UP: e.preventDefault(); view.prev(); break; case KEY_CODE.DOWN: e.preventDefault(); view.next(); break; case KEY_CODE.P: i...
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:completion
completion
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault()
view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choosing = true view.choose(e) else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
d9bbb2ab46b710d7036bb3801f0883990bbeadfd
5,250
https://github.com/ichord/At.js/blob/d9bbb2ab46b710d7036bb3801f0883990bbeadfd/src/app.coffee
102
127
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
@alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => ...
this.alias_maps[setting.alias] = flag(setting.alias ? (controller.init(setting), this) : void 0); ({ // binding jQuery events of `inputor`'s listen: function() { return this.$inputor.on('keyup.atwhoInner', (e) => { return this.on_keyup(e); }).on('keydown.atwhoInner', (e) => { return this.on_key...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.alias_maps[setting.alias] = flag(setting.alias ? (controller.init(setting), this) : void 0); ({ // binding jQuery events of `inputor`'s listen: function() { return this.$inputor.on('keyup.atwhoInner', (e) => { return this.on_keyup(e); }).on(...
@alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
@alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) => this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) ...
clearTimeout @delayedCallback @delayedCallback = setTimeout(=> this.set_context_for c.at if c.look_up() , delay) else this.set_context_for c.at if c.look_up() on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.vi...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(null, e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(null, e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P ...
switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); view.hide(null, e); break; case KEY_CODE.UP: e.preventDefault(); view.prev(); break; case KEY_CODE.DOWN: e.preventDefault(); view.next(); break; case KEY_CODE.P: if (!e.ctrlKey) { return; } e.preven...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); view.hide(null, e); break; case KEY_CODE.UP: e.preventDefault(); view.prev(); break; case KEY_CODE.DOWN: e.preventDefault(); view.next(); break; case KEY_CODE.P:...
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(null, e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:completion
completion
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide(null, e) when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault()
view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choosing = true view.choose(e) else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb
5,250
https://github.com/ichord/At.js/blob/ca238d9a4d3e5c5a965ee4af88ce90a4c3b644bb/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() v...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
da256dbb2004fa2ee02818f92bef79d72291e44b
5,250
https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P ret...
switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); view.hide(); break; case KEY_CODE.UP: e.preventDefault(); view.prev(); break; case KEY_CODE.DOWN: e.preventDefault(); view.next(); break; case KEY_CODE.P: if (!e.ctrlKey) { return; } e.preventDefaul...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
da256dbb2004fa2ee02818f92bef79d72291e44b
5,250
https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); view.hide(); break; case KEY_CODE.UP: e.preventDefault(); view.prev(); break; case KEY_CODE.DOWN: e.preventDefault(); view.next(); break; case KEY_CODE.P: if...
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() v...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
da256dbb2004fa2ee02818f92bef79d72291e44b
5,250
https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/src/app.coffee
102
127
ichord/At.js:src/app.coffee:3:completion
completion
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault()
view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choosing = true view.choose() else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
da256dbb2004fa2ee02818f92bef79d72291e44b
5,250
https://github.com/ichord/At.js/blob/da256dbb2004fa2ee02818f92bef79d72291e44b/src/app.coffee
102
127
ichord/At.js:src/app.coffee:1:raw_corpus
raw_corpus
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe...
var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.iframe = null; this.setIframe(); this.listen(); } setIframe(iframe) { ...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.iframe = null; this.setI...
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:completion
completion
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) @iframe = null this.setIframe() this.listen() setIframe: (iframe) -> if iframe @window = iframe.conten...
controller: (at) -> @controllers[@alias_maps[at] || at || @current_flag] set_context_for: (at) -> @current_flag = at this # At.js can register multiple at char (flag) to every inputor such as "@" and ":" # Along with their own `settings` so that it works differently. # After register, we still can...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
2
51
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> for _, c of @controllers ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> for _, c of @controllers ...
switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() when KEY_CODE.P, KEY_CODE.N this.dispatch() if not e.ctrlKey else this.dispatch() # coffeescript will return ev...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
102
119
ichord/At.js:src/app.coffee:3:completion
completion
e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault()
view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choosing = true view.choose() else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
fb1f1535c43a073c0b4c177018ae8929a7e6bf25
5,250
https://github.com/ichord/At.js/blob/fb1f1535c43a073c0b4c177018ae8929a7e6bf25/src/app.coffee
102
119
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
bf938db68ab4c82f0ed885fec602241e38c49191
5,250
https://github.com/ichord/At.js/blob/bf938db68ab4c82f0ed885fec602241e38c49191/src/app.coffee
102
118
ichord/At.js:src/app.coffee:3:completion
completion
e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey
e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choose() else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
bf938db68ab4c82f0ed885fec602241e38c49191
5,250
https://github.com/ichord/At.js/blob/bf938db68ab4c82f0ed885fec602241e38c49191/src/app.coffee
102
118
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> for _, c of @controllers ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
79bbef4efbf2556826e171308075acca4a4d8494
5,250
https://github.com/ichord/At.js/blob/79bbef4efbf2556826e171308075acca4a4d8494/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.contr...
this.on_keyup(e).on('keydown.atwhoInner', (e) => { return this.on_keydown(e); }).on('scroll.atwhoInner', (e) => { var ref; return (ref = this.controller()) != null ? ref.view.hide() : void 0; }).on('blur.atwhoInner', (e) => { var c; if (c = this.controller()) { return c.view.hide(c.get_opt("display_timeou...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
79bbef4efbf2556826e171308075acca4a4d8494
5,250
https://github.com/ichord/At.js/blob/79bbef4efbf2556826e171308075acca4a4d8494/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.on_keyup(e).on('keydown.atwhoInner', (e) => { return this.on_keydown(e); }).on('scroll.atwhoInner', (e) => { var ref; return (ref = this.controller()) != null ? ref.view.hide() : void 0; }).on('blur.atwhoInner', (e) => { var c; if (c = this.controlle...
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> for _, c of @controllers ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
79bbef4efbf2556826e171308075acca4a4d8494
5,250
https://github.com/ichord/At.js/blob/79bbef4efbf2556826e171308075acca4a4d8494/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> for _, c of @controllers ...
when KEY_CODE.P, KEY_CODE.N this.dispatch() if not e.ctrlKey else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.view return if not (view and view.visible()...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
79bbef4efbf2556826e171308075acca4a4d8494
5,250
https://github.com/ichord/At.js/blob/79bbef4efbf2556826e171308075acca4a4d8494/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choose() else $.noop() return
CoffeeScript
ichord/At.js
src/app.coffee
MIT
79bbef4efbf2556826e171308075acca4a4d8494
5,250
https://github.com/ichord/At.js/blob/79bbef4efbf2556826e171308075acca4a4d8494/src/app.coffee
102
112
ichord/At.js:src/app.coffee:3:completion
completion
when KEY_CODE.N return if not e.ctrlKey e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER
return if not view.visible() e.preventDefault() view.choose() else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
79bbef4efbf2556826e171308075acca4a4d8494
5,250
https://github.com/ichord/At.js/blob/79bbef4efbf2556826e171308075acca4a4d8494/src/app.coffee
102
112
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> c.destroy() for _, c of @cont...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
cc1c239f48df65b5d172b26e11de8af5e56c69ee
5,250
https://github.com/ichord/At.js/blob/cc1c239f48df65b5d172b26e11de8af5e56c69ee/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.contr...
this.on_keyup(e).on('keydown.atwhoInner', (e) => { return this.on_keydown(e); }).on('scroll.atwhoInner', (e) => { var ref; return (ref = this.controller()) != null ? ref.view.hide() : void 0; }).on('blur.atwhoInner', (e) => { var c; if (c = this.controller()) { return c.view.hide(c.get_opt("display_timeou...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
cc1c239f48df65b5d172b26e11de8af5e56c69ee
5,250
https://github.com/ichord/At.js/blob/cc1c239f48df65b5d172b26e11de8af5e56c69ee/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.on_keyup(e).on('keydown.atwhoInner', (e) => { return this.on_keydown(e); }).on('scroll.atwhoInner', (e) => { var ref; return (ref = this.controller()) != null ? ref.view.hide() : void 0; }).on('blur.atwhoInner', (e) => { var c; if (c = this.controlle...
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> c.destroy() for _, c of @cont...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
cc1c239f48df65b5d172b26e11de8af5e56c69ee
5,250
https://github.com/ichord/At.js/blob/cc1c239f48df65b5d172b26e11de8af5e56c69ee/src/app.coffee
52
101
ichord/At.js:src/app.coffee:2:completion
completion
this.on_keyup(e) .on 'keydown.atwhoInner', (e) => this.on_keydown(e) .on 'scroll.atwhoInner', (e) => this.controller()?.view.hide() .on 'blur.atwhoInner', (e) => c.view.hide(c.get_opt("display_timeout")) if c = this.controller() shutdown: -> c.destroy() for _, c of @cont...
else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.view return if not (view and view.visible()) switch e.keyCode when KEY_CODE.ESC e.preventDefault() ...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
cc1c239f48df65b5d172b26e11de8af5e56c69ee
5,250
https://github.com/ichord/At.js/blob/cc1c239f48df65b5d172b26e11de8af5e56c69ee/src/app.coffee
52
101
ichord/At.js:src/app.coffee:3:raw_corpus
raw_corpus
e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choose() else $.noop() return
CoffeeScript
ichord/At.js
src/app.coffee
MIT
cc1c239f48df65b5d172b26e11de8af5e56c69ee
5,250
https://github.com/ichord/At.js/blob/cc1c239f48df65b5d172b26e11de8af5e56c69ee/src/app.coffee
102
110
ichord/At.js:src/app.coffee:3:completion
completion
e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible()
e.preventDefault() view.choose() else $.noop() return
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
cc1c239f48df65b5d172b26e11de8af5e56c69ee
5,250
https://github.com/ichord/At.js/blob/cc1c239f48df65b5d172b26e11de8af5e56c69ee/src/app.coffee
102
110
ichord/At.js:src/app.coffee:1:raw_corpus
raw_corpus
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.listen() controller: (at) -> @controllers[@alias_maps[at] || at || @current_flag] set_context_for: (at) -> ...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.listen() controller: (at) -> @controllers[@alias_maps[...
var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.listen(); } controller(at) { return this.controllers[this.alias_maps[at] |...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var App; App = class App { // @param inputor [HTML DOM Object] `input` or `textarea` constructor(inputor) { this.current_flag = null; this.controllers = {}; this.alias_maps = {}; this.$inputor = $(inputor); this.listen(); } controller(...
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.listen() controller: (at) -> @controllers[@alias_maps[at] || at || @current_flag] set_context_for: (at) -> ...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
2
51
ichord/At.js:src/app.coffee:1:completion
completion
class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.listen() controller: (at) -> @controllers[@alias_maps[at] || at || @current_flag] set_context_for: (at) -> ...
controller = @controllers[flag] ||= new Controller(this, flag) # TODO: it will produce rubbish alias map, reduse this. @alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwhoInner', (e) =>...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
2
51
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() when KEY_CODE.P, KEY_CODE.N this.dispatch() if not e.ctrlKey else this.dispatch() # coffee...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
52
94
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() when KEY_CODE.P, KEY_CODE.N this.dispatch() if not ...
({ on_keyup: function(e) { var ref; switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); if ((ref = this.controller()) != null) { ref.view.hide(); } break; case KEY_CODE.DOWN: case KEY_CODE.UP: case KEY_CODE.CTRL: $.noop(); ...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
52
94
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ on_keyup: function(e) { var ref; switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); if ((ref = this.controller()) != null) { ref.view.hide(); } break; case KEY_CODE.DOWN: case KEY_COD...
on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() when KEY_CODE.P, KEY_CODE.N this.dispatch() if not e.ctrlKey else this.dispatch() # coffee...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
52
94
ichord/At.js:src/app.coffee:2:completion
completion
on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP, KEY_CODE.CTRL $.noop() when KEY_CODE.P, KEY_CODE.N this.dispatch() if not e.ctrlKey else this.dispatch() # coffee...
view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.P return if not e.ctrlKey e.preventDefault() view.prev() when KEY_CODE.N return if not e.ctrlKey e.p...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
ab9bd63d344e5bd67fbd5482caac03fb22bd1898
5,250
https://github.com/ichord/At.js/blob/ab9bd63d344e5bd67fbd5482caac03fb22bd1898/src/app.coffee
52
94
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP $.noop() else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/app.coffee
52
84
ichord/At.js:src/app.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP $.noop() else this.dispatch() # coffeescript will return everywhere!! ...
({ on_keyup: function(e) { var ref; switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); if ((ref = this.controller()) != null) { ref.view.hide(); } break; case KEY_CODE.DOWN: case KEY_CODE.UP: $.noop(); break; default: ...
CoffeeScript
JavaScript
ichord/At.js
src/app.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/app.coffee
52
84
ichord/At.js:src/app.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ on_keyup: function(e) { var ref; switch (e.keyCode) { case KEY_CODE.ESC: e.preventDefault(); if ((ref = this.controller()) != null) { ref.view.hide(); } break; case KEY_CODE.DOWN: case KEY_COD...
on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP $.noop() else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view...
JavaScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/app.coffee
52
84
ichord/At.js:src/app.coffee:2:completion
completion
on_keyup: (e) -> switch e.keyCode when KEY_CODE.ESC e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP $.noop() else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view...
switch e.keyCode when KEY_CODE.ESC e.preventDefault() view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.pre...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/app.coffee
52
84
ichord/At.js:src/app.coffee:1:raw_corpus
raw_corpus
# At.js central contoller(searching, matching, evaluating and rendering.) class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.listen() controller: (at) -> @control...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/app.coffee
1
50
ichord/At.js:src/app.coffee:1:completion
completion
# At.js central contoller(searching, matching, evaluating and rendering.) class App # @param inputor [HTML DOM Object] `input` or `textarea` constructor: (inputor) -> @current_flag = null @controllers = {} @alias_maps = {} @$inputor = $(inputor) this.listen() controller: (at) -> @control...
controller = @controllers[flag] ||= new Controller(this, flag) # TODO: it will produce rubbish alias map, reduse this. @alias_maps[setting.alias] = flag if setting.alias controller.init setting this # binding jQuery events of `inputor`'s listen: -> @$inputor .on 'keyup.atwho', (e) => ...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/app.coffee
1
50
ichord/At.js:src/app.coffee:2:raw_corpus
raw_corpus
e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP $.noop() else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.vie...
CoffeeScript
ichord/At.js
src/app.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/app.coffee
51
80
ichord/At.js:src/app.coffee:2:completion
completion
e.preventDefault() this.controller()?.view.hide() when KEY_CODE.DOWN, KEY_CODE.UP $.noop() else this.dispatch() # coffeescript will return everywhere!! return on_keydown: (e) -> # return if not (view = this.controller().view).visible() view = this.controller()?.vie...
e.preventDefault() view.hide() when KEY_CODE.UP e.preventDefault() view.prev() when KEY_CODE.DOWN e.preventDefault() view.next() when KEY_CODE.TAB, KEY_CODE.ENTER return if not view.visible() e.preventDefault() view.choose() else ...
CoffeeScript
CoffeeScript
ichord/At.js
src/app.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/app.coffee
51
80
twilson63/express-coffee:lib/coffee/lib/coffee-test.coffee:1:raw_corpus
raw_corpus
sys: require 'sys' nodeunit: require '../../nodeunit/lib/nodeunit' assert: require 'assert' red: (str) -> "\033[31m$str\033[39m" green: (str) -> "\033[32m$str\033[39m" bold: (str) -> "\033[1m$str\033[22m" class Mock constructor: -> @expectations = [] expect: (name, fn) -> this[name]: or @mockFn(name) ...
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-test.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-test.coffee
1
50
twilson63/express-coffee:lib/coffee/lib/coffee-test.coffee:1:completion
completion
sys: require 'sys' nodeunit: require '../../nodeunit/lib/nodeunit' assert: require 'assert' red: (str) -> "\033[31m$str\033[39m" green: (str) -> "\033[32m$str\033[39m" bold: (str) -> "\033[1m$str\033[22m" class Mock constructor: -> @expectations = [] expect: (name, fn) -> this[name]: or @mockFn(name) ...
befores: [] exports.before: (fn) -> befores.push fn afters: [] exports.after: (fn) -> afters.push fn exports.run: (name) -> sys.puts bold "\n$name" nodeunit.runModule tests, { name: name testStart: -> fn() for fn in befores testDone: (name, assertions) -> fn() for fn in afters if...
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-test.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-test.coffee
1
50
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:1:raw_corpus
raw_corpus
module.exports = UserSchema = new Schema password: type: String createdAt: type: Date, default: Date.now updatedAt: type: Date, default: Date.now , read: 'secondaryPreferred' toObject: virtuals: true getters: true transform: (doc, ret, options) -> delete ret.password ret toJSON: ...
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
8
57
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = UserSchema = new Schema password: type: String createdAt: type: Date, default: Date.now updatedAt: type: Date, default: Date.now , read: 'secondaryPreferred' toObject: virtuals: true getters: true transform: (doc, ret, optio...
var UserSchema; module.exports = UserSchema = new Schema({ password: { type: String }, createdAt: { type: Date, default: Date.now }, updatedAt: { type: Date, default: Date.now } }, { read: 'secondaryPreferred', toObject: { virtuals: true, getters: true, transform: functi...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
8
57
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var UserSchema; module.exports = UserSchema = new Schema({ password: { type: String }, createdAt: { type: Date, default: Date.now }, updatedAt: { type: Date, default: Date.now } }, { read: 'secondaryPreferred', toObject: { v...
module.exports = UserSchema = new Schema password: type: String createdAt: type: Date, default: Date.now updatedAt: type: Date, default: Date.now , read: 'secondaryPreferred' toObject: virtuals: true getters: true transform: (doc, ret, options) -> delete ret.password ret toJSON: ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
8
57
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:1:completion
completion
module.exports = UserSchema = new Schema password: type: String createdAt: type: Date, default: Date.now updatedAt: type: Date, default: Date.now , read: 'secondaryPreferred' toObject: virtuals: true getters: true transform: (doc, ret, options) -> delete ret.password ret toJSON: ...
.set (@_wasNew) -> @_wasNew UserSchema.virtual 'login' .get -> @_login .set (@_login) -> @_login UserSchema.virtual 'unions' .get -> @_unions or [] .set (@_unions) -> @_unions UserSchema.virtual 'phoneNumber' .get -> @_phoneNumber .set (@_phoneNumber) -> @_phoneNumber UserSchema.virtual 'emailAddress' ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
8
57
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:2:raw_corpus
raw_corpus
UserSchema.virtual 'name' .get -> @_name .set (@_name) -> @_name UserSchema.virtual 'showname' .get -> @_showname .set (@_showname) -> @_showname ##################### METHODS #####################
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
58
67
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript UserSchema.virtual 'name' .get -> @_name .set (@_name) -> @_name UserSchema.virtual 'showname' .get -> @_showname .set (@_showname) -> @_showname ##################### METHODS ##################### ```
UserSchema.virtual('name').get(function() { return this._name; }).set(function(_name) { this._name = _name; return this._name; }); UserSchema.virtual('showname').get(function() { return this._showname; }).set(function(_showname) { this._showname = _showname; return this._showname; }); //##################...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
58
67
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript UserSchema.virtual('name').get(function() { return this._name; }).set(function(_name) { this._name = _name; return this._name; }); UserSchema.virtual('showname').get(function() { return this._showname; }).set(function(_showname) { this._showname = _shown...
UserSchema.virtual 'name' .get -> @_name .set (@_name) -> @_name UserSchema.virtual 'showname' .get -> @_showname .set (@_showname) -> @_showname ##################### METHODS #####################
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
58
67
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:2:completion
completion
UserSchema.virtual 'name' .get -> @_name .set (@_name) -> @_name
UserSchema.virtual 'showname' .get -> @_showname .set (@_showname) -> @_showname ##################### METHODS #####################
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
58
67
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:3:raw_corpus
raw_corpus
UserSchema.methods.genAccountToken = (payload = {}) -> jwt.sign _.assign({}, payload, _id: @_id), config.accountCookieSecret , expiresIn: config.accountCookieExpires noTimestamp: true
CoffeeScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
69
74
jianliaoim/talk-os:talk-account/server/schemas/user.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript UserSchema.methods.genAccountToken = (payload = {}) -> jwt.sign _.assign({}, payload, _id: @_id), config.accountCookieSecret , expiresIn: config.accountCookieExpires noTimestamp: true ```
UserSchema.methods.genAccountToken = function(payload = {}) { return jwt.sign(_.assign({}, payload, { _id: this._id }), config.accountCookieSecret, { expiresIn: config.accountCookieExpires, noTimestamp: true }); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/server/schemas/user.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/server/schemas/user.coffee
69
74