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
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:completion
completion
module.exports = currentStreak: 0 reached: false maxStreakReached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @opacityObserver?.di...
setup: (editorElement) -> if not @container @maxStreak = @getMaxStreak() @container = @createElement "streak-container" @title = @createElement "title", @container @title.textContent = "Combo" @max = @createElement "max", @container @max.textContent = "Max #{@maxStreak}" @c...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:raw_corpus
raw_corpus
editorElement.querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStrea...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:completion
completion
editorElement.querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStrea...
@renderStreak() endStreak: -> @currentStreak = 0 @reached = false @maxStreakReached = false @container.classList.remove "reached" @renderStreak() renderStreak: -> @counter.textContent = @currentStreak @counter.classList.remove "bump" defer => @counter.classList.add "bump" ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:raw_corpus
raw_corpus
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] setTimeout => ...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
105
140
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclam...
({ showExclamation: function(text = null) { var exclamation; exclamation = document.createElement("span"); exclamation.classList.add("exclamation"); if (text === null) { text = sample(this.getConfig("exclamationTexts")); } exclamation.textContent = text; this.exclamations.insertBefor...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
105
140
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ showExclamation: function(text = null) { var exclamation; exclamation = document.createElement("span"); exclamation.classList.add("exclamation"); if (text === null) { text = sample(this.getConfig("exclamationTexts")); } exclamatio...
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] setTimeout => ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
105
140
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:completion
completion
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] setTimeout => ...
maxStreak increaseMaxStreak: -> localStorage.setItem "activate-power-mode.maxStreak", @currentStreak @maxStreak = @currentStreak @max.textContent = "Max #{@maxStreak}" @showExclamation "NEW MAX!!!" if @maxStreakReached is false @maxStreakReached = true resetMaxStreak: -> localStorage.setIt...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/33cd77ad2f3ae30dd8577a1925e4aa805fed3b5b/lib/combo-mode.coffee
105
140
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:raw_corpus
raw_corpus
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] setTimeout => ...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
12f93c3bd572d8e8698ae376ec03700dafa9ea7b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/12f93c3bd572d8e8698ae376ec03700dafa9ea7b/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclam...
({ showExclamation: function(text = null) { var exclamation; exclamation = document.createElement("span"); exclamation.classList.add("exclamation"); if (text === null) { text = sample(this.getConfig("exclamationTexts")); } exclamation.textContent = text; this.exclamations.insertBefor...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
12f93c3bd572d8e8698ae376ec03700dafa9ea7b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/12f93c3bd572d8e8698ae376ec03700dafa9ea7b/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ showExclamation: function(text = null) { var exclamation; exclamation = document.createElement("span"); exclamation.classList.add("exclamation"); if (text === null) { text = sample(this.getConfig("exclamationTexts")); } exclamatio...
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] setTimeout => ...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
12f93c3bd572d8e8698ae376ec03700dafa9ea7b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/12f93c3bd572d8e8698ae376ec03700dafa9ea7b/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:completion
completion
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] setTimeout => ...
getMaxStreak: -> maxStreak = localStorage.getItem "activate-power-mode.maxStreak" maxStreak = 0 if maxStreak is null maxStreak increaseMaxStreak: -> localStorage.setItem "activate-power-mode.maxStreak", @currentStreak @maxStreak = @currentStreak @max.textContent = "Max #{@maxStreak}" @sho...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
12f93c3bd572d8e8698ae376ec03700dafa9ea7b
3,570
https://github.com/JoelBesada/activate-power-mode/blob/12f93c3bd572d8e8698ae376ec03700dafa9ea7b/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:raw_corpus
raw_corpus
editorElement.querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStrea...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ec7915d236c421cbcca3711bc675a6fe129952ee
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec7915d236c421cbcca3711bc675a6fe129952ee/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:completion
completion
editorElement.querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStrea...
@renderStreak() endStreak: -> @currentStreak = 0 @reached = false @maxStreakReached = false @container.classList.remove "reached" @renderStreak() renderStreak: -> @counter.textContent = @currentStreak @counter.classList.remove "bump" defer => @counter.classList.add "bump" ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ec7915d236c421cbcca3711bc675a6fe129952ee
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec7915d236c421cbcca3711bc675a6fe129952ee/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:raw_corpus
raw_corpus
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] requestAnimationFr...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ec7915d236c421cbcca3711bc675a6fe129952ee
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec7915d236c421cbcca3711bc675a6fe129952ee/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclam...
({ showExclamation: function(text = null) { var exclamation; exclamation = document.createElement("span"); exclamation.classList.add("exclamation"); if (text === null) { text = sample(this.getConfig("exclamationTexts")); } exclamation.textContent = text; this.exclamations.insertBefor...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ec7915d236c421cbcca3711bc675a6fe129952ee
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec7915d236c421cbcca3711bc675a6fe129952ee/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ showExclamation: function(text = null) { var exclamation; exclamation = document.createElement("span"); exclamation.classList.add("exclamation"); if (text === null) { text = sample(this.getConfig("exclamationTexts")); } exclamatio...
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] requestAnimationFr...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ec7915d236c421cbcca3711bc675a6fe129952ee
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec7915d236c421cbcca3711bc675a6fe129952ee/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:completion
completion
showExclamation: (text = null) -> exclamation = document.createElement "span" exclamation.classList.add "exclamation" text = sample @getConfig "exclamationTexts" if text is null exclamation.textContent = text @exclamations.insertBefore exclamation, @exclamations.childNodes[0] requestAnimationFr...
getMaxStreak: -> maxStreak = localStorage.getItem "activate-power-mode.maxStreak" maxStreak = 0 if maxStreak is null maxStreak increaseMaxStreak: -> localStorage.setItem "activate-power-mode.maxStreak", @currentStreak @maxStreak = @currentStreak @max.textContent = "Max #{@maxStreak}" @sho...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ec7915d236c421cbcca3711bc675a6fe129952ee
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec7915d236c421cbcca3711bc675a6fe129952ee/lib/combo-mode.coffee
105
133
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:raw_corpus
raw_corpus
(editorElement.shadowRoot ? editorElement).querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedE...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
9a85f8860708d5a0fec6e9d36a7cb55febbe01ba
3,570
https://github.com/JoelBesada/activate-power-mode/blob/9a85f8860708d5a0fec6e9d36a7cb55febbe01ba/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:completion
completion
(editorElement.shadowRoot ? editorElement).querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedE...
@renderStreak() endStreak: -> @currentStreak = 0 @reached = false @maxStreakReached = false @container.classList.remove "reached" @renderStreak() renderStreak: -> @counter.textContent = @currentStreak @counter.classList.remove "bump" defer => @counter.classList.add "bump" ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
9a85f8860708d5a0fec6e9d36a7cb55febbe01ba
3,570
https://github.com/JoelBesada/activate-power-mode/blob/9a85f8860708d5a0fec6e9d36a7cb55febbe01ba/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:raw_corpus
raw_corpus
(editorElement.shadowRoot ? editorElement).querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedE...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ef0368484fa72f80a51275c6cefa4d6dc9e55e5c
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ef0368484fa72f80a51275c6cefa4d6dc9e55e5c/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:completion
completion
(editorElement.shadowRoot ? editorElement).querySelector(".scroll-view").appendChild @container if @currentStreak leftTimeout = @streakTimeout - (performance.now() - @lastStreak) @refreshStreakBar leftTimeout @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedE...
@renderStreak() endStreak: -> @currentStreak = 0 @reached = false @maxStreakReached = false @container.classList.remove "reached" @renderStreak() renderStreak: -> @counter.textContent = @currentStreak @counter.classList.remove "bump" defer => @counter.classList.add "bump" ...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
ef0368484fa72f80a51275c6cefa4d6dc9e55e5c
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ef0368484fa72f80a51275c6cefa4d6dc9e55e5c/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:raw_corpus
raw_corpus
module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @opacityObserver?.dispose() @currentStreak...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dis...
module.exports = { currentStreak: 0, reached: false, reset: function() { var ref, ref1; return (ref = this.container) != null ? (ref1 = ref.parentNode) != null ? ref1.removeChild(this.container) : void 0 : void 0; }, destroy: function() { var reached, ref, ref1, ref2; this.reset(); this.co...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { currentStreak: 0, reached: false, reset: function() { var ref, ref1; return (ref = this.container) != null ? (ref1 = ref.parentNode) != null ? ref1.removeChild(this.container) : void 0 : void 0; }, destroy: function() { var ...
module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @opacityObserver?.dispose() @currentStreak...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:completion
completion
module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @opacityObserver?.dispose() @currentStreak...
@container = @createElement "streak-container" @title = @createElement "title", @container @title.textContent = "Combo" @counter = @createElement "counter", @container @bar = @createElement "bar", @container @exclamations = @createElement "exclamations", @container @streakTimeoutObs...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:raw_corpus
raw_corpus
@renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStreak++ @showExclamation() if @currentStreak > 0 and @currentStreak % @getConfig("exclamationEvery") is 0 if @currentStreak >= @getConfig("activationThreshold") and not @reached @reached = tr...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStreak++ @showExclamation() if @currentStreak > 0 and @currentStreak % @getConfig("exclamationEvery") is 0 if @currentStreak >= @getConfig("a...
this.renderStreak()({ increaseStreak: function() { this.lastStreak = performance.now(); this.debouncedEndStreak(); this.currentStreak++; if (this.currentStreak > 0 && this.currentStreak % this.getConfig("exclamationEvery") === 0) { this.showExclamation(); } if (this.currentStreak >= this...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.renderStreak()({ increaseStreak: function() { this.lastStreak = performance.now(); this.debouncedEndStreak(); this.currentStreak++; if (this.currentStreak > 0 && this.currentStreak % this.getConfig("exclamationEvery") === 0) { this.show...
@renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStreak++ @showExclamation() if @currentStreak > 0 and @currentStreak % @getConfig("exclamationEvery") is 0 if @currentStreak >= @getConfig("activationThreshold") and not @reached @reached = tr...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:completion
completion
@renderStreak() increaseStreak: -> @lastStreak = performance.now() @debouncedEndStreak() @currentStreak++ @showExclamation() if @currentStreak > 0 and @currentStreak % @getConfig("exclamationEvery") is 0 if @currentStreak >= @getConfig("activationThreshold") and not @reached @reached = tr...
@counter.textContent = @currentStreak @counter.classList.remove "bump" defer => @counter.classList.add "bump" refreshStreakBar: (leftTimeout = @streakTimeout) -> scale = leftTimeout / @streakTimeout @bar.style.transition = "none" @bar.style.transform = "scaleX(#{scale})" setTimeout =>...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:raw_corpus
raw_corpus
hasReached: -> @reached getConfig: (config) -> atom.config.get "activate-power-mode.comboMode.#{config}"
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
105
110
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hasReached: -> @reached getConfig: (config) -> atom.config.get "activate-power-mode.comboMode.#{config}" ```
({ hasReached: function() { return this.reached; }, getConfig: function(config) { return atom.config.get(`activate-power-mode.comboMode.${config}`); } });
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
105
110
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ hasReached: function() { return this.reached; }, getConfig: function(config) { return atom.config.get(`activate-power-mode.comboMode.${config}`); } }); ```
hasReached: -> @reached getConfig: (config) -> atom.config.get "activate-power-mode.comboMode.#{config}"
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
105
110
JoelBesada/activate-power-mode:lib/combo-mode.coffee:3:completion
completion
hasReached: -> @reached
getConfig: (config) -> atom.config.get "activate-power-mode.comboMode.#{config}"
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
3ca47f4367c637d714fa90c32009233900fc6cfb
3,570
https://github.com/JoelBesada/activate-power-mode/blob/3ca47f4367c637d714fa90c32009233900fc6cfb/lib/combo-mode.coffee
105
110
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:raw_corpus
raw_corpus
module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @currentStreak = 0 reached = false crea...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dis...
module.exports = { currentStreak: 0, reached: false, reset: function() { var ref, ref1; return (ref = this.container) != null ? (ref1 = ref.parentNode) != null ? ref1.removeChild(this.container) : void 0 : void 0; }, destroy: function() { var reached, ref, ref1; this.reset(); this.containe...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { currentStreak: 0, reached: false, reset: function() { var ref, ref1; return (ref = this.container) != null ? (ref1 = ref.parentNode) != null ? ref1.removeChild(this.container) : void 0 : void 0; }, destroy: function() { var ...
module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @currentStreak = 0 reached = false crea...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:1:completion
completion
module.exports = currentStreak: 0 reached: false reset: -> @container?.parentNode?.removeChild @container destroy: -> @reset() @container = null @debouncedEndStreak?.cancel() @debouncedEndStreak = null @streakTimeoutObserver?.dispose() @currentStreak = 0 reached = false crea...
@title = @createElement "title", @container @title.textContent = "Combo" @counter = @createElement "counter", @container @bar = @createElement "bar", @container @exclamations = @createElement "exclamations", @container @streakTimeoutObserver?.dispose() @streakTimeoutObserver = atom....
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1/lib/combo-mode.coffee
5
54
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:raw_corpus
raw_corpus
@debouncedEndStreak() @currentStreak++ @showExclamation() if @currentStreak > 0 and @currentStreak % @getConfig("exclamationEvery") is 0 if @currentStreak >= @getConfig("activationThreshold") and not @reached @reached = true @container.classList.add "reached" @refreshStreakBar() @ren...
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1/lib/combo-mode.coffee
55
104
JoelBesada/activate-power-mode:lib/combo-mode.coffee:2:completion
completion
@debouncedEndStreak() @currentStreak++ @showExclamation() if @currentStreak > 0 and @currentStreak % @getConfig("exclamationEvery") is 0 if @currentStreak >= @getConfig("activationThreshold") and not @reached @reached = true @container.classList.add "reached" @refreshStreakBar() @ren...
refreshStreakBar: (leftTimeout = @streakTimeout) -> scale = leftTimeout / @streakTimeout @bar.style.transition = "none" @bar.style.transform = "scaleX(#{scale})" setTimeout => @bar.style.transform = "" @bar.style.transition = "transform #{leftTimeout}ms linear" , 100 showExclamation:...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/combo-mode.coffee
MIT
5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5cab4b164a2a9a4b3643d52aae8a6622e3ff12d1/lib/combo-mode.coffee
55
104
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:raw_corpus
raw_corpus
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter @meshbluEventEmitter.log = -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandle...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
1
41
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter @meshbluEventEmitter.log = -> describe 'initialize', ->...
var EventEmitter, MeshbluSocketIOHandler; ({EventEmitter} = require('events')); MeshbluSocketIOHandler = require('../../lib/MeshbluSocketIOHandler'); describe('MeshbluSocketIOHandler', function() { beforeEach(function() { this.meshbluEventEmitter = new EventEmitter(); return this.meshbluEventEmitter.log = ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
1
41
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EventEmitter, MeshbluSocketIOHandler; ({EventEmitter} = require('events')); MeshbluSocketIOHandler = require('../../lib/MeshbluSocketIOHandler'); describe('MeshbluSocketIOHandler', function() { beforeEach(function() { this.meshbluEventEmitter = new Eve...
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter @meshbluEventEmitter.log = -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandle...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
1
41
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:completion
completion
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter @meshbluEventEmitter.log = -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandle...
@socket = new EventEmitter @authDevice = sinon.stub().yields new Error 'not authorized' @sut = new MeshbluSocketIOHandler authDevice: @authDevice, meshbluEventEmitter: @meshbluEventEmitter @sut.initialize @socket @socket.emit 'identity', {uuid: 'something', token: 'something-else'}, (@r...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
1
41
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:raw_corpus
raw_corpus
it 'should call authDevice', -> expect(@authDevice).to.have.been.calledWith 'device', 'wrong' it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I d...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
43
82
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should call authDevice', -> expect(@authDevice).to.have.been.calledWith 'device', 'wrong' it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevic...
it('should call authDevice', function() { return expect(this.authDevice).to.have.been.calledWith('device', 'wrong'); }); it('should call the callback with the device', function() { return expect(this.callback).to.have.been.calledWith([ null, { uuid: 'device' } ]); }); describe('when authDevice...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
43
82
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should call authDevice', function() { return expect(this.authDevice).to.have.been.calledWith('device', 'wrong'); }); it('should call the callback with the device', function() { return expect(this.callback).to.have.been.calledWith([ null, { uu...
it 'should call authDevice', -> expect(@authDevice).to.have.been.calledWith 'device', 'wrong' it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I d...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
43
82
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:completion
completion
it 'should call authDevice', -> expect(@authDevice).to.have.been.calledWith 'device', 'wrong' it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I d...
it 'should set authedDevice on the handler with the token', -> expect(@sut.authedDevice.uuid).to.equal '23955' expect(@sut.authedDevice.token).to.equal '$###' describe 'update', -> describe 'when authedDevice yields an error', -> beforeEach -> @socket = new EventEmitter @au...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
43
82
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:3:raw_corpus
raw_corpus
describe 'when authedDevice yields an null and a device', -> beforeEach -> @socket = new EventEmitter @onError = sinon.spy() @socket.on 'error', @onError @device = {uuid: '1345'} @authDevice = sinon.stub().yields null, @device @updateIfAuthorized = sinon.stub() ...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
84
120
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'when authedDevice yields an null and a device', -> beforeEach -> @socket = new EventEmitter @onError = sinon.spy() @socket.on 'error', @onError @device = {uuid: '1345'} @authDevice = sinon.stub().yields nul...
describe('when authedDevice yields an null and a device', function() { beforeEach(function() { this.socket = new EventEmitter(); this.onError = sinon.spy(); this.socket.on('error', this.onError); this.device = { uuid: '1345' }; this.authDevice = sinon.stub().yields(null, this.device); ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
84
120
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('when authedDevice yields an null and a device', function() { beforeEach(function() { this.socket = new EventEmitter(); this.onError = sinon.spy(); this.socket.on('error', this.onError); this.device = { uuid: '1345' }; this....
describe 'when authedDevice yields an null and a device', -> beforeEach -> @socket = new EventEmitter @onError = sinon.spy() @socket.on 'error', @onError @device = {uuid: '1345'} @authDevice = sinon.stub().yields null, @device @updateIfAuthorized = sinon.stub() ...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
84
120
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:3:completion
completion
describe 'when authedDevice yields an null and a device', -> beforeEach -> @socket = new EventEmitter @onError = sinon.spy() @socket.on 'error', @onError @device = {uuid: '1345'} @authDevice = sinon.stub().yields null, @device @updateIfAuthorized = sinon.stub() ...
expect(@authDevice).to.have.been.calledWith '1345', 'toooooken' it 'should call updateIfAuthorized', -> expect(@updateIfAuthorized).to.have.been.calledWith @device, {uuid: '1345'}, {$set: {online: true}} describe 'when updateIfAuthorized yields an error', -> beforeEach -> @update...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
eb9d1e784b89276d59e1c4402d112c9618cd99c1
815
https://github.com/octoblu/meshblu/blob/eb9d1e784b89276d59e1c4402d112c9618cd99c1/test/lib/MeshbluSocketIOHandler-spec.coffee
84
120
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:raw_corpus
raw_corpus
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler meshbluEventEmitter: @meshbluEve...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
1710db739f82289a92f0a05da491bf2522e44dd8
815
https://github.com/octoblu/meshblu/blob/1710db739f82289a92f0a05da491bf2522e44dd8/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter describe 'initialize', -> beforeEach -> @sut = ne...
var EventEmitter, MeshbluSocketIOHandler; ({EventEmitter} = require('events')); MeshbluSocketIOHandler = require('../../lib/MeshbluSocketIOHandler'); describe('MeshbluSocketIOHandler', function() { beforeEach(function() { return this.meshbluEventEmitter = new EventEmitter(); }); describe('initialize', func...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
1710db739f82289a92f0a05da491bf2522e44dd8
815
https://github.com/octoblu/meshblu/blob/1710db739f82289a92f0a05da491bf2522e44dd8/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EventEmitter, MeshbluSocketIOHandler; ({EventEmitter} = require('events')); MeshbluSocketIOHandler = require('../../lib/MeshbluSocketIOHandler'); describe('MeshbluSocketIOHandler', function() { beforeEach(function() { return this.meshbluEventEmitter = ...
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler meshbluEventEmitter: @meshbluEve...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
1710db739f82289a92f0a05da491bf2522e44dd8
815
https://github.com/octoblu/meshblu/blob/1710db739f82289a92f0a05da491bf2522e44dd8/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:completion
completion
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> beforeEach -> @meshbluEventEmitter = new EventEmitter describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler meshbluEventEmitter: @meshbluEve...
@authDevice = sinon.stub().yields new Error 'not authorized' @sut = new MeshbluSocketIOHandler authDevice: @authDevice, meshbluEventEmitter: @meshbluEventEmitter @sut.initialize @socket @socket.emit 'identity', {uuid: 'something', token: 'something-else'}, (@result) => it 'should call the...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
1710db739f82289a92f0a05da491bf2522e44dd8
815
https://github.com/octoblu/meshblu/blob/1710db739f82289a92f0a05da491bf2522e44dd8/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:raw_corpus
raw_corpus
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler @socket = new EventEmitter @sut.initialize @socket it 'should set @socket', ...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler @socket = new EventEmitter ...
var EventEmitter, MeshbluSocketIOHandler; ({EventEmitter} = require('events')); MeshbluSocketIOHandler = require('../../lib/MeshbluSocketIOHandler'); describe('MeshbluSocketIOHandler', function() { describe('initialize', function() { beforeEach(function() { this.sut = new MeshbluSocketIOHandler(); ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EventEmitter, MeshbluSocketIOHandler; ({EventEmitter} = require('events')); MeshbluSocketIOHandler = require('../../lib/MeshbluSocketIOHandler'); describe('MeshbluSocketIOHandler', function() { describe('initialize', function() { beforeEach(function() ...
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler @socket = new EventEmitter @sut.initialize @socket it 'should set @socket', ...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:1:completion
completion
{EventEmitter} = require 'events' MeshbluSocketIOHandler = require '../../lib/MeshbluSocketIOHandler' describe 'MeshbluSocketIOHandler', -> describe 'initialize', -> beforeEach -> @sut = new MeshbluSocketIOHandler @socket = new EventEmitter @sut.initialize @socket it 'should set @socket', ...
@sut.initialize @socket @socket.emit 'identity', {uuid: 'something', token: 'something-else'}, (@result) => it 'should call the callback with the error', -> [error,data] = @result expect(error).to.deep.equal message: 'not authorized', status: 401 describe 'when authDevice dont yield...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
1
40
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:raw_corpus
raw_corpus
it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I dunt read too gud', -> beforeEach -> @socket = new EventEmitter @device = {some: 'devic...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
42
84
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I dunt read too gud', -> beforeEach -> @s...
it('should call the callback with the device', function() { return expect(this.callback).to.have.been.calledWith([ null, { uuid: 'device' } ]); }); describe('when authDevice dont yields an error, and do yield a device gud, an I dunt read too gud', function() { beforeEach(function() { this.s...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
42
84
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should call the callback with the device', function() { return expect(this.callback).to.have.been.calledWith([ null, { uuid: 'device' } ]); }); describe('when authDevice dont yields an error, and do yield a device gud, an I dunt read too ...
it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I dunt read too gud', -> beforeEach -> @socket = new EventEmitter @device = {some: 'devic...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
42
84
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:2:completion
completion
it 'should call the callback with the device', -> expect(@callback).to.have.been.calledWith [null, {uuid: 'device'}] describe 'when authDevice dont yields an error, and do yield a device gud, an I dunt read too gud', -> beforeEach -> @socket = new EventEmitter @device = {some: 'devic...
describe 'update', -> describe 'when authedDevice yields an error', -> beforeEach -> @socket = new EventEmitter @authDevice = sinon.stub().yields new Error @sut = new MeshbluSocketIOHandler authDevice: @authDevice @sut.initialize @socket @sut = sinon.spy() @s...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
42
84
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:3:raw_corpus
raw_corpus
@device = {uuid: '1345'} @authDevice = sinon.stub().yields null, @device @updateIfAuthorized = sinon.stub() @sut = new MeshbluSocketIOHandler authDevice: @authDevice, updateIfAuthorized: @updateIfAuthorized @sut.initialize @socket @sut.authedDevice = uuid: '1345', token: 'tooooo...
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
86
116
octoblu/meshblu:test/lib/MeshbluSocketIOHandler-spec.coffee:3:completion
completion
@device = {uuid: '1345'} @authDevice = sinon.stub().yields null, @device @updateIfAuthorized = sinon.stub() @sut = new MeshbluSocketIOHandler authDevice: @authDevice, updateIfAuthorized: @updateIfAuthorized @sut.initialize @socket @sut.authedDevice = uuid: '1345', token: 'tooooo...
expect(@updateIfAuthorized).to.have.been.calledWith @device, {uuid: '1345'}, {$set: {online: true}} describe 'when updateIfAuthorized yields an error', -> beforeEach -> @updateIfAuthorized.yield new Error('not acceptable') it 'should emit an error', -> expect(@updateIfAuthori...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/MeshbluSocketIOHandler-spec.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/test/lib/MeshbluSocketIOHandler-spec.coffee
86
116
elving/swag:test/inflections_test.coffee:1:raw_corpus
raw_corpus
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> source = '{{inflect enem...
CoffeeScript
elving/swag
test/inflections_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/inflections_test.coffee
1
31
elving/swag:test/inflections_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 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word base...
var Handlebars, Swag; require('should'); Handlebars = require('handlebars'); Swag = require('../lib/swag'); Swag.registerHelpers(Handlebars); describe('inflect', function() { describe('{{inflect enemies "enemy" "enemies"}}', function() { return it('should return the plural or singular form of a word based on...
CoffeeScript
JavaScript
elving/swag
test/inflections_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/inflections_test.coffee
1
31
elving/swag:test/inflections_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('inflect', function() { describe('{{inflect enemies "enemy" "enemies"}}', function() { return it('shoul...
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> source = '{{inflect enem...
JavaScript
CoffeeScript
elving/swag
test/inflections_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/inflections_test.coffee
1
31
elving/swag:test/inflections_test.coffee:1:completion
completion
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' Swag.registerHelpers Handlebars describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> source = '{{inflect enem...
describe '{{inflect friends "friend" "friends" true}}', -> it 'should return the plural or singular form of a word based on a value and include the count.', -> source = '{{inflect friends "friend" "friends" true}}' template = Handlebars.compile(source) context = friends: 1...
CoffeeScript
CoffeeScript
elving/swag
test/inflections_test.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/inflections_test.coffee
1
31
elving/swag:test/inflections_test.coffee:1:raw_corpus
raw_corpus
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> source = '{{inflect enemies "enemy" "enemies"}}' ...
CoffeeScript
elving/swag
test/inflections_test.coffee
MIT
5e45f8e30f1605c8b521997024c9a49806571fc8
675
https://github.com/elving/swag/blob/5e45f8e30f1605c8b521997024c9a49806571fc8/test/inflections_test.coffee
1
29
elving/swag:test/inflections_test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> so...
var Handlebars, Swag; require('should'); Handlebars = require('handlebars'); Swag = require('../lib/swag'); describe('inflect', function() { describe('{{inflect enemies "enemy" "enemies"}}', function() { return it('should return the plural or singular form of a word based on a value.', function() { var ...
CoffeeScript
JavaScript
elving/swag
test/inflections_test.coffee
MIT
5e45f8e30f1605c8b521997024c9a49806571fc8
675
https://github.com/elving/swag/blob/5e45f8e30f1605c8b521997024c9a49806571fc8/test/inflections_test.coffee
1
29
elving/swag:test/inflections_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'); describe('inflect', function() { describe('{{inflect enemies "enemy" "enemies"}}', function() { return it('should return the plural or singular for...
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> source = '{{inflect enemies "enemy" "enemies"}}' ...
JavaScript
CoffeeScript
elving/swag
test/inflections_test.coffee
MIT
5e45f8e30f1605c8b521997024c9a49806571fc8
675
https://github.com/elving/swag/blob/5e45f8e30f1605c8b521997024c9a49806571fc8/test/inflections_test.coffee
1
29
elving/swag:test/inflections_test.coffee:1:completion
completion
require 'should' Handlebars = require 'handlebars' Swag = require '../lib/swag' describe 'inflect', -> describe '{{inflect enemies "enemy" "enemies"}}', -> it 'should return the plural or singular form of a word based on a value.', -> source = '{{inflect enemies "enemy" "enemies"}}' ...
describe '{{inflect friends "friend" "friends" true}}', -> it 'should return the plural or singular form of a word based on a value and include the count.', -> source = '{{inflect friends "friend" "friends" true}}' template = Handlebars.compile(source) context = friends: 1...
CoffeeScript
CoffeeScript
elving/swag
test/inflections_test.coffee
MIT
5e45f8e30f1605c8b521997024c9a49806571fc8
675
https://github.com/elving/swag/blob/5e45f8e30f1605c8b521997024c9a49806571fc8/test/inflections_test.coffee
1
29
maxwells/bootstrap-tags:src/templates/templates.coffee:1:raw_corpus
raw_corpus
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.Template = (version, templateName, options) -> if Tags.Templates[version]? return Tags.Templates[version][templateName](options) if Tags.Templates[version][templateName]? Tags.Templates.shared[templateName](options)
CoffeeScript
maxwells/bootstrap-tags
src/templates/templates.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/templates.coffee
1
6
maxwells/bootstrap-tags:src/templates/templates.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.Template = (version, templateName, options) -> if Tags.Templates[version]? return Tags.Templates[version][templateName](options) if Tags.Templates[version][templateName]? Tags.Templates.shared[templa...
window.Tags || (window.Tags = {}); Tags.Templates || (Tags.Templates = {}); Tags.Templates.Template = function(version, templateName, options) { if (Tags.Templates[version] != null) { if (Tags.Templates[version][templateName] != null) { return Tags.Templates[version][templateName](options); } } re...
CoffeeScript
JavaScript
maxwells/bootstrap-tags
src/templates/templates.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/templates.coffee
1
6
maxwells/bootstrap-tags:src/templates/templates.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript window.Tags || (window.Tags = {}); Tags.Templates || (Tags.Templates = {}); Tags.Templates.Template = function(version, templateName, options) { if (Tags.Templates[version] != null) { if (Tags.Templates[version][templateName] != null) { return Tags.Te...
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.Template = (version, templateName, options) -> if Tags.Templates[version]? return Tags.Templates[version][templateName](options) if Tags.Templates[version][templateName]? Tags.Templates.shared[templateName](options)
JavaScript
CoffeeScript
maxwells/bootstrap-tags
src/templates/templates.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/templates.coffee
1
6
maxwells/bootstrap-tags:src/templates/templates.coffee:1:completion
completion
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.Template = (version, templateName, options) ->
if Tags.Templates[version]? return Tags.Templates[version][templateName](options) if Tags.Templates[version][templateName]? Tags.Templates.shared[templateName](options)
CoffeeScript
CoffeeScript
maxwells/bootstrap-tags
src/templates/templates.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/templates.coffee
1
6
jianliaoim/talk-os:talk-web/client/app/tag.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'tag' mixins: [mixinSubscribe, PureRenderMixin] propTypes: tag: T.instanceOf(Immutable.Map) editable: T.bool onTagClick: T.func tagSelected: T.string _teamId: T.string.isRequired getDefaultProps: -> editable: false onTagClick: -> g...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
29
78
jianliaoim/talk-os:talk-web/client/app/tag.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'tag' mixins: [mixinSubscribe, PureRenderMixin] propTypes: tag: T.instanceOf(Immutable.Map) editable: T.bool onTagClick: T.func tagSelected: T.string _teamId: T.string.isRequired getDef...
module.exports = React.createClass({ displayName: 'tag', mixins: [mixinSubscribe, PureRenderMixin], propTypes: { tag: T.instanceOf(Immutable.Map), editable: T.bool, onTagClick: T.func, tagSelected: T.string, _teamId: T.string.isRequired }, getDefaultProps: function() { return { e...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
29
78
jianliaoim/talk-os:talk-web/client/app/tag.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'tag', mixins: [mixinSubscribe, PureRenderMixin], propTypes: { tag: T.instanceOf(Immutable.Map), editable: T.bool, onTagClick: T.func, tagSelected: T.string, _teamId: T.string.isRequired ...
module.exports = React.createClass displayName: 'tag' mixins: [mixinSubscribe, PureRenderMixin] propTypes: tag: T.instanceOf(Immutable.Map) editable: T.bool onTagClick: T.func tagSelected: T.string _teamId: T.string.isRequired getDefaultProps: -> editable: false onTagClick: -> g...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
29
78
jianliaoim/talk-os:talk-web/client/app/tag.coffee:1:completion
completion
module.exports = React.createClass displayName: 'tag' mixins: [mixinSubscribe, PureRenderMixin] propTypes: tag: T.instanceOf(Immutable.Map) editable: T.bool onTagClick: T.func tagSelected: T.string _teamId: T.string.isRequired getDefaultProps: -> editable: false onTagClick: -> g...
hasAuth: (tag) -> currentUserId = @state.user.get('_id') userContact = @state.contacts.find (contact) -> contact.get('_id') is currentUserId hasAuth = (userContact?.get('role') in ['owner', 'admin']) or (tag.get('_creatorId') is currentUserId) getContacts: -> query.contactsBy(recorder.getState(...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
29
78
jianliaoim/talk-os:talk-web/client/app/tag.coffee:2:raw_corpus
raw_corpus
else notifyActions.error l('tag-modify-fail-message') onEditClick: (event) -> event.stopPropagation() @setState showEditor: true onEditorClose: -> @setState showEditor: false onDeleteClick: -> @setState showDeleter: true onDeleterClose: -> @setState showDeleter: false s...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
79
128
jianliaoim/talk-os:talk-web/client/app/tag.coffee:2:completion
completion
else notifyActions.error l('tag-modify-fail-message') onEditClick: (event) -> event.stopPropagation() @setState showEditor: true onEditorClose: -> @setState showEditor: false onDeleteClick: -> @setState showDeleter: true onDeleterClose: -> @setState showDeleter: false s...
onCloseClick: @onEditorClose show: @state.showEditor div className: 'content', span className:'rich-line', l('tag-name') input className: 'input', type: 'text', ref: 'input', autoFocus: true, defaultValue: @props.tag.get('name') div className: 'button-group', button classNa...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
79
128
jianliaoim/talk-os:talk-web/client/app/tag.coffee:3:raw_corpus
raw_corpus
span className: 'dot' span className: 'name', tag.get('name') Icon name: 'edit', className: 'edit', size: 14, onClick: @onEditClick @renderEditor() @renderDeleter() else div className: className, onClick: @onTagClick, span className: 'dot' span c...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
129
141
jianliaoim/talk-os:talk-web/client/app/tag.coffee:3:completion
completion
span className: 'dot' span className: 'name', tag.get('name') Icon name: 'edit', className: 'edit', size: 14, onClick: @onEditClick @renderEditor() @renderDeleter() else
div className: className, onClick: @onTagClick, span className: 'dot' span className: 'name', tag.get('name') else div className: className, onClick: @onTagClick, span className: 'dot' span className: 'name', tag.get('name')
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/tag.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/tag.coffee
129
141
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:raw_corpus
raw_corpus
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element #...
var NodeType, XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = (function() { class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTDNotation` // `parent` the parent...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var NodeType, XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = (function() { class XMLDTDNotation extends XMLNode { // Initializes a new i...
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:completion
completion
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
throw new Error "Public or system identifiers are required for an external entity. " + @debugInfo(name) @name = @stringify.name name @type = NodeType.NotationDeclaration @pubID = @stringify.dtdPubID value.pubID if value.pubID? @sysID = @stringify.dtdSysID value.sysID if value.sysID? # DOM level 1 ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:raw_corpus
raw_corpus
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element #...
var NodeType, XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTDNotation` // `parent` the parent `XMLDocType` elemen...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var NodeType, XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTD...
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:completion
completion
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
throw new Error "Public or system identifiers are required for an external entity. " + @debugInfo(name) @name = @stringify.name name @type = NodeType.NotationDeclaration @pubID = @stringify.dtdPubID value.pubID if value.pubID? @sysID = @stringify.dtdSysID value.sysID if value.sysID? # DOM level 1 ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
6f18c8edefd0f3ed1192e4129fb1b032b8c9918f
926
https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDNotation.coffee
1
40
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:raw_corpus
raw_corpus
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDNotation.coffee
1
36
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element #...
var NodeType, XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTDNotation` // `parent` the parent `XMLDocType` elemen...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDNotation.coffee
1
36
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var NodeType, XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); NodeType = require('./NodeType'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTD...
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDNotation.coffee
1
36
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:completion
completion
XMLNode = require './XMLNode' NodeType = require './NodeType' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object wi...
throw new Error "Missing DTD notation name. " + @debugInfo(name) if not value.pubID and not value.sysID throw new Error "Public or system identifiers are required for an external entity. " + @debugInfo(name) @name = @stringify.name name @type = NodeType.NotationDeclaration @pubID = @stringify.dtd...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDNotation.coffee
1
36
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:raw_corpus
raw_corpus
XMLNode = require './XMLNode' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object with external entity details # `...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDNotation.coffee
1
34
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript XMLNode = require './XMLNode' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation...
var XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTDNotation` // `parent` the parent `XMLDocType` element // `name` the name of the notation // `...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDNotation.coffee
1
34
oozcitak/xmlbuilder-js:src/XMLDTDNotation.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLDTDNotation, XMLNode; XMLNode = require('./XMLNode'); // Represents a NOTATION entry in the DTD module.exports = XMLDTDNotation = class XMLDTDNotation extends XMLNode { // Initializes a new instance of `XMLDTDNotation` // `parent` the parent `XMLDocTy...
XMLNode = require './XMLNode' # Represents a NOTATION entry in the DTD module.exports = class XMLDTDNotation extends XMLNode # Initializes a new instance of `XMLDTDNotation` # # `parent` the parent `XMLDocType` element # `name` the name of the notation # `value` an object with external entity details # `...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLDTDNotation.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDNotation.coffee
1
34