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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:switchConv', ->
messages.scrollToBottom()
handle 'update:beforeHi... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 1603aeb4cc20c273c8aadcd3d8047e73a5966810 | 3,762 | https://github.com/yakyak/yakyak/blob/1603aeb4cc20c273c8aadcd3d8047e73a5966810/src/ui/views/controller.coffee | 116 | 147 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:switchConv', ... | var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
return trayicon(models);
};
handle('update:switchConv', function() {
return me... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 1603aeb4cc20c273c8aadcd3d8047e73a5966810 | 3,762 | https://github.com/yakyak/yakyak/blob/1603aeb4cc20c273c8aadcd3d8047e73a5966810/src/ui/views/controller.coffee | 116 | 147 |
yakyak/yakyak:src/ui/views/controller.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
return trayicon(models);
}... | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:switchConv', ->
messages.scrollToBottom()
handle 'update:beforeHi... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 1603aeb4cc20c273c8aadcd3d8047e73a5966810 | 3,762 | https://github.com/yakyak/yakyak/blob/1603aeb4cc20c273c8aadcd3d8047e73a5966810/src/ui/views/controller.coffee | 116 | 147 |
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:switchConv', ->
messages.scrollToBottom() | handle 'update:beforeHistory', ->
applayout.recordMainPos()
handle 'update:afterHistory', ->
applayout.adjustMainPos()
handle 'update:beforeImg', ->
applayout.recordMainPos()
handle 'update:afterImg', ->
if viewstate.atbottom
messages.scrollToBottom()
else
applayout.adjustMainPos()
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 1603aeb4cc20c273c8aadcd3d8047e73a5966810 | 3,762 | https://github.com/yakyak/yakyak/blob/1603aeb4cc20c273c8aadcd3d8047e73a5966810/src/ui/views/controller.coffee | 116 | 147 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
menu viewstate
dockicon viewstate
handle 'update:switchConv', ->
messages... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 5b4bfd0792db2f03868e47d18add91c153a6c38b | 3,762 | https://github.com/yakyak/yakyak/blob/5b4bfd0792db2f03868e47d18add91c153a6c38b/src/ui/views/controller.coffee | 113 | 146 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
menu viewstate
dockic... | var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
trayicon(models);
menu(viewstate);
return dockicon(viewstate);
};
handle('up... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 5b4bfd0792db2f03868e47d18add91c153a6c38b | 3,762 | https://github.com/yakyak/yakyak/blob/5b4bfd0792db2f03868e47d18add91c153a6c38b/src/ui/views/controller.coffee | 113 | 146 |
yakyak/yakyak:src/ui/views/controller.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
trayicon(models);
menu(v... | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
menu viewstate
dockicon viewstate
handle 'update:switchConv', ->
messages... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 5b4bfd0792db2f03868e47d18add91c153a6c38b | 3,762 | https://github.com/yakyak/yakyak/blob/5b4bfd0792db2f03868e47d18add91c153a6c38b/src/ui/views/controller.coffee | 113 | 146 |
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
menu viewstate
dockicon viewstate
handle 'update:switchConv', ->
messages... | handle 'update:beforeHistory', ->
applayout.recordMainPos()
handle 'update:afterHistory', ->
applayout.adjustMainPos()
handle 'update:beforeImg', ->
applayout.recordMainPos()
handle 'update:afterImg', ->
if viewstate.atbottom
messages.scrollToBottom()
else
applayout.adjustMainPos()
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 5b4bfd0792db2f03868e47d18add91c153a6c38b | 3,762 | https://github.com/yakyak/yakyak/blob/5b4bfd0792db2f03868e47d18add91c153a6c38b/src/ui/views/controller.coffee | 113 | 146 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->
menu viewstate
redraw()
handle 'update:switchCo... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | d31f9da5eed0ed2ced367714eb2380425723154f | 3,762 | https://github.com/yakyak/yakyak/blob/d31f9da5eed0ed2ced367714eb2380425723154f/src/ui/views/controller.coffee | 113 | 148 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->... | var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
return trayicon(models);
};
handle('update:language', function() {
menu(viewst... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | d31f9da5eed0ed2ced367714eb2380425723154f | 3,762 | https://github.com/yakyak/yakyak/blob/d31f9da5eed0ed2ced367714eb2380425723154f/src/ui/views/controller.coffee | 113 | 148 |
yakyak/yakyak:src/ui/views/controller.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
return trayicon(models);
}... | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->
menu viewstate
redraw()
handle 'update:switchCo... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | d31f9da5eed0ed2ced367714eb2380425723154f | 3,762 | https://github.com/yakyak/yakyak/blob/d31f9da5eed0ed2ced367714eb2380425723154f/src/ui/views/controller.coffee | 113 | 148 |
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->
menu viewstate
redraw()
handle 'update:switchCo... | messages.scrollToBottom()
handle 'update:beforeHistory', ->
applayout.recordMainPos()
handle 'update:afterHistory', ->
applayout.adjustMainPos()
handle 'update:beforeImg', ->
applayout.recordMainPos()
handle 'update:afterImg', ->
if viewstate.atbottom
messages.scrollToBottom()
else
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | d31f9da5eed0ed2ced367714eb2380425723154f | 3,762 | https://github.com/yakyak/yakyak/blob/d31f9da5eed0ed2ced367714eb2380425723154f/src/ui/views/controller.coffee | 113 | 148 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->
menu viewstate
handle 'update:switchConv', ->
m... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 327eb24fbc1f941dbf4e6328908de7a92254193b | 3,762 | https://github.com/yakyak/yakyak/blob/327eb24fbc1f941dbf4e6328908de7a92254193b/src/ui/views/controller.coffee | 113 | 147 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->... | var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
return trayicon(models);
};
handle('update:language', function() {
return menu... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 327eb24fbc1f941dbf4e6328908de7a92254193b | 3,762 | https://github.com/yakyak/yakyak/blob/327eb24fbc1f941dbf4e6328908de7a92254193b/src/ui/views/controller.coffee | 113 | 147 |
yakyak/yakyak:src/ui/views/controller.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
startup(models);
return trayicon(models);
}... | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->
menu viewstate
handle 'update:switchConv', ->
m... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 327eb24fbc1f941dbf4e6328908de7a92254193b | 3,762 | https://github.com/yakyak/yakyak/blob/327eb24fbc1f941dbf4e6328908de7a92254193b/src/ui/views/controller.coffee | 113 | 147 |
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
startup models
trayicon models
handle 'update:language', ->
menu viewstate
handle 'update:switchConv', -> | messages.scrollToBottom()
handle 'update:beforeHistory', ->
applayout.recordMainPos()
handle 'update:afterHistory', ->
applayout.adjustMainPos()
handle 'update:beforeImg', ->
applayout.recordMainPos()
handle 'update:afterImg', ->
if viewstate.atbottom
messages.scrollToBottom()
else
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 327eb24fbc1f941dbf4e6328908de7a92254193b | 3,762 | https://github.com/yakyak/yakyak/blob/327eb24fbc1f941dbf4e6328908de7a92254193b/src/ui/views/controller.coffee | 113 | 147 |
yakyak/yakyak:src/ui/views/controller.coffee:2:raw_corpus | raw_corpus | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 32 | 42 | ||
yakyak/yakyak:src/ui/views/controller.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
d... | var setConvMin;
setConvMin = function(convmin) {
if (convmin) {
document.querySelector('.left').classList.add("minimal");
return document.querySelector('.leftresize').classList.add("minimal");
} else {
document.querySelector('.left').classList.remove("minimal");
return document.querySelector('.left... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 32 | 42 |
yakyak/yakyak:src/ui/views/controller.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var setConvMin;
setConvMin = function(convmin) {
if (convmin) {
document.querySelector('.left').classList.add("minimal");
return document.querySelector('.leftresize').classList.add("minimal");
} else {
document.querySelector('.left').classList.remo... | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 32 | 42 |
yakyak/yakyak:src/ui/views/controller.coffee:2:completion | completion | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else | document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("minimal")
# draw startup elements on applayout only if
# it is on the startup process or until contacts are loaded
# (and 1.5s afterwards to keep an animation) | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 32 | 42 |
yakyak/yakyak:src/ui/views/controller.coffee:3:raw_corpus | raw_corpus | drawStartup = ->
startup models if startup?
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
drawStartup()
handle 'update:viewstate', ->
setLeftSize viewstate.leftSize
setConvMin viewstate.showConvMin
if... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 43 | 92 | ||
yakyak/yakyak:src/ui/views/controller.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
drawStartup = ->
startup models if startup?
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
drawStartup()
handle 'update:viewstate', ->
setLeftSize views... | var drawStartup;
drawStartup = function() {
if (typeof startup !== "undefined" && startup !== null) {
startup(models);
}
return applayout.last(startup);
};
// remove startup from applayout after animations finishes
handle('remove_startup', function() {
var startup;
startup = function(models) {
retur... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 43 | 92 |
yakyak/yakyak:src/ui/views/controller.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var drawStartup;
drawStartup = function() {
if (typeof startup !== "undefined" && startup !== null) {
startup(models);
}
return applayout.last(startup);
};
// remove startup from applayout after animations finishes
handle('remove_startup', function() {
... | drawStartup = ->
startup models if startup?
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
drawStartup()
handle 'update:viewstate', ->
setLeftSize viewstate.leftSize
setConvMin viewstate.showConvMin
if... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 43 | 92 |
yakyak/yakyak:src/ui/views/controller.coffee:3:completion | completion | drawStartup = ->
startup models if startup?
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
drawStartup()
handle 'update:viewstate', ->
setLeftSize viewstate.leftSize
setConvMin viewstate.showConvMin
if... | document.body.style.zoom = viewstate.zoom
document.body.style.setProperty('--zoom', viewstate.zoom)
else if viewstate.state == viewstate.STATE_NORMAL
redraw()
applayout.lfoot controls
applayout.listhead listhead
applayout.left convlist
applayout.convhead convhead
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 43 | 92 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | else if viewstate.state == viewstate.STATE_ADD_CONVERSATION
redraw()
applayout.left convlist
applayout.main convadd
applayout.maininfo null
applayout.foot null
else
console.log 'unknown viewstate.state', viewstate.state
handle 'update:entity', ->
redraw()
handle... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 93 | 114 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | else if viewstate.state == viewstate.STATE_ADD_CONVERSATION
redraw()
applayout.left convlist
applayout.main convadd
applayout.maininfo null
applayout.foot null
else
console.log 'unknown viewstate.state', viewstate.state
handle 'update:entity', ->
redraw() | handle 'update:conv', ->
redraw()
handle 'update:searchedentities', ->
redraw()
handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw() | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 34b945d85539fe5553bc8c33c8ba82acb5947a33 | 3,762 | https://github.com/yakyak/yakyak/blob/34b945d85539fe5553bc8c33c8ba82acb5947a33/src/ui/views/controller.coffee | 93 | 114 |
yakyak/yakyak:src/ui/views/controller.coffee:3:raw_corpus | raw_corpus | drawStartup = ->
startup models
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
applayout.last null
handle 'update:viewstate', ->
setLeftSize viewstate.leftSize
setConvMin viewstate.showConvMin
if views... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 94eb199a74687583609426b8193743298ce89d83 | 3,762 | https://github.com/yakyak/yakyak/blob/94eb199a74687583609426b8193743298ce89d83/src/ui/views/controller.coffee | 43 | 92 | ||
yakyak/yakyak:src/ui/views/controller.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
drawStartup = ->
startup models
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
applayout.last null
handle 'update:viewstate', ->
setLeftSize viewstate.l... | var drawStartup;
drawStartup = function() {
startup(models);
return applayout.last(startup);
};
// remove startup from applayout after animations finishes
handle('remove_startup', function() {
var startup;
startup = function(models) {
return null;
};
return applayout.last(null);
});
handle('update:vi... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 94eb199a74687583609426b8193743298ce89d83 | 3,762 | https://github.com/yakyak/yakyak/blob/94eb199a74687583609426b8193743298ce89d83/src/ui/views/controller.coffee | 43 | 92 |
yakyak/yakyak:src/ui/views/controller.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var drawStartup;
drawStartup = function() {
startup(models);
return applayout.last(startup);
};
// remove startup from applayout after animations finishes
handle('remove_startup', function() {
var startup;
startup = function(models) {
return null;
}... | drawStartup = ->
startup models
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
applayout.last null
handle 'update:viewstate', ->
setLeftSize viewstate.leftSize
setConvMin viewstate.showConvMin
if views... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 94eb199a74687583609426b8193743298ce89d83 | 3,762 | https://github.com/yakyak/yakyak/blob/94eb199a74687583609426b8193743298ce89d83/src/ui/views/controller.coffee | 43 | 92 |
yakyak/yakyak:src/ui/views/controller.coffee:3:completion | completion | drawStartup = ->
startup models
applayout.last startup
# remove startup from applayout after animations finishes
handle 'remove_startup', ->
startup = (models) -> null
applayout.last null
handle 'update:viewstate', ->
setLeftSize viewstate.leftSize
setConvMin viewstate.showConvMin
if views... | applayout.main null
applayout.maininfo null
applayout.foot null
document.body.style.zoom = viewstate.zoom
document.body.style.setProperty('--zoom', viewstate.zoom)
else if viewstate.state == viewstate.STATE_NORMAL
redraw()
applayout.lfoot controls
applayout.li... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 94eb199a74687583609426b8193743298ce89d83 | 3,762 | https://github.com/yakyak/yakyak/blob/94eb199a74687583609426b8193743298ce89d83/src/ui/views/controller.coffee | 43 | 92 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | applayout.convhead null
applayout.maininfo null
applayout.foot null
else if viewstate.state == viewstate.STATE_ADD_CONVERSATION
redraw()
applayout.left convlist
applayout.main convadd
applayout.maininfo null
applayout.foot null
else
console.log 'un... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 94eb199a74687583609426b8193743298ce89d83 | 3,762 | https://github.com/yakyak/yakyak/blob/94eb199a74687583609426b8193743298ce89d83/src/ui/views/controller.coffee | 93 | 117 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | applayout.convhead null
applayout.maininfo null
applayout.foot null
else if viewstate.state == viewstate.STATE_ADD_CONVERSATION
redraw()
applayout.left convlist
applayout.main convadd
applayout.maininfo null
applayout.foot null
else
console.log 'un... | handle 'update:entity', ->
redraw()
handle 'update:conv', ->
redraw()
handle 'update:searchedentities', ->
redraw()
handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw() | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 94eb199a74687583609426b8193743298ce89d83 | 3,762 | https://github.com/yakyak/yakyak/blob/94eb199a74687583609426b8193743298ce89d83/src/ui/views/controller.coffee | 93 | 117 |
yakyak/yakyak:src/ui/views/controller.coffee:2:raw_corpus | raw_corpus | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 32 | 47 | ||
yakyak/yakyak:src/ui/views/controller.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
d... | var afterStartup, setConvMin;
setConvMin = function(convmin) {
if (convmin) {
document.querySelector('.left').classList.add("minimal");
return document.querySelector('.leftresize').classList.add("minimal");
} else {
document.querySelector('.left').classList.remove("minimal");
return document.queryS... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 32 | 47 |
yakyak/yakyak:src/ui/views/controller.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var afterStartup, setConvMin;
setConvMin = function(convmin) {
if (convmin) {
document.querySelector('.left').classList.add("minimal");
return document.querySelector('.leftresize').classList.add("minimal");
} else {
document.querySelector('.left').... | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 32 | 47 |
yakyak/yakyak:src/ui/views/controller.coffee:3:raw_corpus | raw_corpus | drawStartup = (timeout = 1500) ->
if afterStartup
applayout.last null
else if viewstate.loadedContacts
applayout.last startup
#
# async timeout to allow animation to end
# afterwards
setTimeout ->
applayout.last null
afterStartup = true
... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 48 | 97 | ||
yakyak/yakyak:src/ui/views/controller.coffee:3:completion | completion | drawStartup = (timeout = 1500) ->
if afterStartup
applayout.last null
else if viewstate.loadedContacts
applayout.last startup
#
# async timeout to allow animation to end
# afterwards
setTimeout ->
applayout.last null
afterStartup = true
... | drawStartup()
#
applayout.left null
applayout.convhead null
applayout.main null
applayout.maininfo null
applayout.foot null
document.body.style.zoom = viewstate.zoom
document.body.style.setProperty('--zoom', viewstate.zoom)
else if viewstate.state == v... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 48 | 97 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | redraw()
about models
applayout.left convlist
applayout.main about
applayout.convhead null
applayout.maininfo null
applayout.foot null
else if viewstate.state == viewstate.STATE_ADD_CONVERSATION
redraw()
applayout.left convlist
applayout.main c... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 98 | 126 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | redraw()
about models
applayout.left convlist
applayout.main about
applayout.convhead null
applayout.maininfo null
applayout.foot null
else if viewstate.state == viewstate.STATE_ADD_CONVERSATION
redraw()
applayout.left convlist
applayout.main c... | console.log 'unknown viewstate.state', viewstate.state
handle 'update:entity', ->
redraw()
handle 'update:conv', ->
redraw()
handle 'update:searchedentities', ->
redraw()
handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw() | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 6ebaffea8a700884e5a55aa9db9246d50a7e7776 | 3,762 | https://github.com/yakyak/yakyak/blob/6ebaffea8a700884e5a55aa9db9246d50a7e7776/src/ui/views/controller.coffee | 98 | 126 |
yakyak/yakyak:src/ui/views/controller.coffee:3:raw_corpus | raw_corpus | drawStartup = (timeout = 1500) ->
if afterStartup
applayout.last null
else if viewstate.loadedContacts
applayout.last startup
#
# async timeout to allow animation to end
# afterwards
setTimeout ->
applayout.last null
afterStartup = true
... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 7a118cf26e6fa1f6d51e2f66058ce419d93cb31e | 3,762 | https://github.com/yakyak/yakyak/blob/7a118cf26e6fa1f6d51e2f66058ce419d93cb31e/src/ui/views/controller.coffee | 48 | 97 | ||
yakyak/yakyak:src/ui/views/controller.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
drawStartup = (timeout = 1500) ->
if afterStartup
applayout.last null
else if viewstate.loadedContacts
applayout.last startup
#
# async timeout to allow animation to end
# afterwards
setTimeout ->
... | var drawStartup;
drawStartup = function(timeout = 1500) {
if (afterStartup) {
return applayout.last(null);
} else if (viewstate.loadedContacts) {
applayout.last(startup);
// async timeout to allow animation to end
// afterwards
return setTimeout(function() {
var afterStartup;
appla... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 7a118cf26e6fa1f6d51e2f66058ce419d93cb31e | 3,762 | https://github.com/yakyak/yakyak/blob/7a118cf26e6fa1f6d51e2f66058ce419d93cb31e/src/ui/views/controller.coffee | 48 | 97 |
yakyak/yakyak:src/ui/views/controller.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var drawStartup;
drawStartup = function(timeout = 1500) {
if (afterStartup) {
return applayout.last(null);
} else if (viewstate.loadedContacts) {
applayout.last(startup);
// async timeout to allow animation to end
// afterwards
return setT... | drawStartup = (timeout = 1500) ->
if afterStartup
applayout.last null
else if viewstate.loadedContacts
applayout.last startup
#
# async timeout to allow animation to end
# afterwards
setTimeout ->
applayout.last null
afterStartup = true
... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 7a118cf26e6fa1f6d51e2f66058ce419d93cb31e | 3,762 | https://github.com/yakyak/yakyak/blob/7a118cf26e6fa1f6d51e2f66058ce419d93cb31e/src/ui/views/controller.coffee | 48 | 97 |
yakyak/yakyak:src/ui/views/controller.coffee:3:completion | completion | drawStartup = (timeout = 1500) ->
if afterStartup
applayout.last null
else if viewstate.loadedContacts
applayout.last startup
#
# async timeout to allow animation to end
# afterwards
setTimeout ->
applayout.last null
afterStartup = true
... | # show startup screen
drawStartup()
#
applayout.left null
applayout.convhead null
applayout.main null
applayout.maininfo null
applayout.foot null
document.body.style.zoom = viewstate.zoom
document.body.style.setProperty('--zoom', viewstate.zoom)
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 7a118cf26e6fa1f6d51e2f66058ce419d93cb31e | 3,762 | https://github.com/yakyak/yakyak/blob/7a118cf26e6fa1f6d51e2f66058ce419d93cb31e/src/ui/views/controller.coffee | 48 | 97 |
yakyak/yakyak:src/ui/views/controller.coffee:2:raw_corpus | raw_corpus | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 52 | 101 | ||
yakyak/yakyak:src/ui/views/controller.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
d... | var setConvMin;
setConvMin = function(convmin) {
if (convmin) {
document.querySelector('.left').classList.add("minimal");
return document.querySelector('.leftresize').classList.add("minimal");
} else {
document.querySelector('.left').classList.remove("minimal");
return document.querySelector('.left... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 52 | 101 |
yakyak/yakyak:src/ui/views/controller.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var setConvMin;
setConvMin = function(convmin) {
if (convmin) {
document.querySelector('.left').classList.add("minimal");
return document.querySelector('.leftresize').classList.add("minimal");
} else {
document.querySelector('.left').classList.remo... | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 52 | 101 |
yakyak/yakyak:src/ui/views/controller.coffee:2:completion | completion | setConvMin = (convmin) ->
if convmin
document.querySelector('.left').classList.add("minimal")
document.querySelector('.leftresize').classList.add("minimal")
else
document.querySelector('.left').classList.remove("minimal")
document.querySelector('.leftresize').classList.remove("mi... | redraw()
applayout.lfoot controls
applayout.listhead listhead
applayout.left convlist
applayout.convhead convhead
applayout.main messages
applayout.maininfo typinginfo
applayout.foot input
menu viewstate
trayicon models
dockicon viewstate
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 52 | 101 |
yakyak/yakyak:src/ui/views/controller.coffee:3:raw_corpus | raw_corpus | handle 'update:searchedentities', ->
redraw()
handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw() | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 102 | 109 | ||
yakyak/yakyak:src/ui/views/controller.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
handle 'update:searchedentities', ->
redraw()
handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw()
``` | handle('update:searchedentities', function() {
return redraw();
});
handle('update:selectedEntities', function() {
return redraw();
});
handle('update:convsettings', function() {
return redraw();
}); | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 102 | 109 |
yakyak/yakyak:src/ui/views/controller.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
handle('update:searchedentities', function() {
return redraw();
});
handle('update:selectedEntities', function() {
return redraw();
});
handle('update:convsettings', function() {
return redraw();
});
``` | handle 'update:searchedentities', ->
redraw()
handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw() | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 102 | 109 |
yakyak/yakyak:src/ui/views/controller.coffee:3:completion | completion | handle 'update:searchedentities', ->
redraw() | handle 'update:selectedEntities', ->
redraw()
handle 'update:convsettings', -> redraw() | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 102 | 109 |
yakyak/yakyak:src/ui/views/controller.coffee:4:raw_corpus | raw_corpus | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
trayicon models
handle 'update:switchConv', ->
messages.scrollToBottom()
handle 'update:beforeHistory', ->
appl... | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 111 | 141 | ||
yakyak/yakyak:src/ui/views/controller.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
trayicon models
handle 'update:switchConv', ->
messages.scr... | var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
return trayicon(models);
};
handle('update:switchConv', function() {
return messages.scrollToBott... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 111 | 141 |
yakyak/yakyak:src/ui/views/controller.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var redraw;
redraw = function() {
notifications(models);
convhead(models);
controls(models);
convlist(models);
listhead(models);
messages(models);
typinginfo(models);
input(models);
convadd(models);
return trayicon(models);
};
handle('update:s... | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
trayicon models
handle 'update:switchConv', ->
messages.scrollToBottom()
handle 'update:beforeHistory', ->
appl... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 111 | 141 |
yakyak/yakyak:src/ui/views/controller.coffee:4:completion | completion | redraw = ->
notifications models
convhead models
controls models
convlist models
listhead models
messages models
typinginfo models
input models
convadd models
trayicon models
handle 'update:switchConv', ->
messages.scrollToBottom() | handle 'update:beforeHistory', ->
applayout.recordMainPos()
handle 'update:afterHistory', ->
applayout.adjustMainPos()
handle 'update:beforeImg', ->
applayout.recordMainPos()
handle 'update:afterImg', ->
if viewstate.atbottom
messages.scrollToBottom()
else
applayout.adjustMainPos()
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/views/controller.coffee | MIT | 39e8c438d6f6401e39be9bb77e20643e0401c3e7 | 3,762 | https://github.com/yakyak/yakyak/blob/39e8c438d6f6401e39be9bb77e20643e0401c3e7/src/ui/views/controller.coffee | 111 | 141 |
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:raw_corpus | raw_corpus | {LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
localStorage = new LocalStorage('./scratch11')
test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
test.equal(localStorage.getItem('***test***'), 'foo')
localStorage._deleteLocation()
test.end()
) | CoffeeScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/special-characters-in-keys-test.coffee | 1 | 13 | ||
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
localStorage = new LocalStorage('./scratch11')
test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
test.equal(localStorage.getItem('***test***'),... | var LocalStorage, tape;
({LocalStorage} = require('../'));
tape = require('tape');
tape('use key with asterix', (test) => {
var localStorage;
localStorage = new LocalStorage('./scratch11');
test.doesNotThrow(() => {
return localStorage.setItem("***test***", 'foo');
});
test.equal(localStorage.getItem('... | CoffeeScript | JavaScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/special-characters-in-keys-test.coffee | 1 | 13 |
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage, tape;
({LocalStorage} = require('../'));
tape = require('tape');
tape('use key with asterix', (test) => {
var localStorage;
localStorage = new LocalStorage('./scratch11');
test.doesNotThrow(() => {
return localStorage.setItem("***test... | {LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
localStorage = new LocalStorage('./scratch11')
test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
test.equal(localStorage.getItem('***test***'), 'foo')
localStorage._deleteLocation()
test.end()
) | JavaScript | CoffeeScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/special-characters-in-keys-test.coffee | 1 | 13 |
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:completion | completion | {LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
localStorage = new LocalStorage('./scratch11') | test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
test.equal(localStorage.getItem('***test***'), 'foo')
localStorage._deleteLocation()
test.end()
) | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/special-characters-in-keys-test.coffee | 1 | 13 |
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:raw_corpus | raw_corpus | {LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
# localStorage = new LocalStorage('./scratch11')
# test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
# test.equal(localStorage.getItem('***test***'), 'foo')
# localStorage._deleteLocation()
test.... | CoffeeScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 61e680b1b42878c67eec4a8c3e34c29c9570e04c | 460 | https://github.com/lmaccherone/node-localstorage/blob/61e680b1b42878c67eec4a8c3e34c29c9570e04c/test/special-characters-in-keys-test.coffee | 1 | 13 | ||
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
# localStorage = new LocalStorage('./scratch11')
# test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
# test.equal(localStorage.getItem('***test... | var LocalStorage, tape;
({LocalStorage} = require('../'));
tape = require('tape');
tape('use key with asterix', (test) => {
// localStorage = new LocalStorage('./scratch11')
// test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
// test.equal(localStorage.getItem('***test***'), 'foo')
// lo... | CoffeeScript | JavaScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 61e680b1b42878c67eec4a8c3e34c29c9570e04c | 460 | https://github.com/lmaccherone/node-localstorage/blob/61e680b1b42878c67eec4a8c3e34c29c9570e04c/test/special-characters-in-keys-test.coffee | 1 | 13 |
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage, tape;
({LocalStorage} = require('../'));
tape = require('tape');
tape('use key with asterix', (test) => {
// localStorage = new LocalStorage('./scratch11')
// test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
// test.eq... | {LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
# localStorage = new LocalStorage('./scratch11')
# test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
# test.equal(localStorage.getItem('***test***'), 'foo')
# localStorage._deleteLocation()
test.... | JavaScript | CoffeeScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 61e680b1b42878c67eec4a8c3e34c29c9570e04c | 460 | https://github.com/lmaccherone/node-localstorage/blob/61e680b1b42878c67eec4a8c3e34c29c9570e04c/test/special-characters-in-keys-test.coffee | 1 | 13 |
lmaccherone/node-localstorage:test/special-characters-in-keys-test.coffee:1:completion | completion | {LocalStorage} = require('../')
tape = require('tape')
tape('use key with asterix', (test) =>
# localStorage = new LocalStorage('./scratch11') | # test.doesNotThrow(() => localStorage.setItem("***test***", 'foo'))
# test.equal(localStorage.getItem('***test***'), 'foo')
# localStorage._deleteLocation()
test.end()
) | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | test/special-characters-in-keys-test.coffee | MIT | 61e680b1b42878c67eec4a8c3e34c29c9570e04c | 460 | https://github.com/lmaccherone/node-localstorage/blob/61e680b1b42878c67eec4a8c3e34c29c9570e04c/test/special-characters-in-keys-test.coffee | 1 | 13 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:raw_corpus | raw_corpus | describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
atom.config.set('pigments.autocompleteScopes', ['*'])
... | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 1 | 39 | ||
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
... | describe('autocomplete provider', function() {
var autocompleteMain, autocompleteManager, completionDelay, editor, editorView, jasmineContent, pigments, project;
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = [];
return beforeEach(function() {
... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 1 | 39 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('autocomplete provider', function() {
var autocompleteMain, autocompleteManager, completionDelay, editor, editorView, jasmineContent, pigments, project;
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineConte... | describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
atom.config.set('pigments.autocompleteScopes', ['*'])
... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 1 | 39 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:completion | completion | describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
atom.config.set('pigments.autocompleteScopes', ['*'])
... | workspaceElement = atom.views.getView(atom.workspace)
jasmineContent.appendChild(workspaceElement)
waitsForPromise 'autocomplete-plus activation', ->
atom.packages.activatePackage('autocomplete-plus').then (pkg) ->
autocompleteMain = pkg.mainModule
waitsForPromise 'pigments activation', -... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 1 | 39 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:raw_corpus | raw_corpus | waitsForPromise 'pigments project initialized', ->
project = pigments.getProject()
project.initialize()
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCallThrough()
spyOn(autocompleteManager, 'displaySuggestions').an... | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 41 | 82 | ||
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
waitsForPromise 'pigments project initialized', ->
project = pigments.getProject()
project.initialize()
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCallThrough()
... | waitsForPromise('pigments project initialized', function() {
var project;
project = pigments.getProject();
return project.initialize();
});
runs(function() {
var autocompleteManager;
autocompleteManager = autocompleteMain.autocompleteManager;
spyOn(autocompleteManager, 'findSuggestions').andCallThrough();
... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 41 | 82 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
waitsForPromise('pigments project initialized', function() {
var project;
project = pigments.getProject();
return project.initialize();
});
runs(function() {
var autocompleteManager;
autocompleteManager = autocompleteMain.autocompleteManager;
spyOn(aut... | waitsForPromise 'pigments project initialized', ->
project = pigments.getProject()
project.initialize()
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCallThrough()
spyOn(autocompleteManager, 'displaySuggestions').an... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 41 | 82 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:completion | completion | waitsForPromise 'pigments project initialized', ->
project = pigments.getProject()
project.initialize()
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCallThrough()
spyOn(autocompleteManager, 'displaySuggestions').an... | autocompleteManager.displaySuggestions.calls.length is 1
waitsFor -> editorView.querySelector('.autocomplete-plus li')?
runs ->
popup = editorView.querySelector('.autocomplete-plus')
expect(popup).toExist()
expect(popup.querySelector('span.word').textContent).toEqual('base-color')
... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 41 | 82 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:3:raw_corpus | raw_corpus | advanceClock(completionDelay)
waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
waitsFor -> editorView.querySelector('.autocomplete-plus li')?
runs ->
atom.commands.dispatch(editorView, 'autocomplete-plus:confirm')
expect(editor.getText()).not.toContain '@... | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 84 | 125 | ||
abe33/atom-pigments:spec/pigments-provider-spec.coffee:3:completion | completion | advanceClock(completionDelay)
waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
waitsFor -> editorView.querySelector('.autocomplete-plus li')?
runs ->
atom.commands.dispatch(editorView, 'autocomplete-plus:confirm')
expect(editor.getText()).not.toContain '@... | waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
waitsFor -> editorView.querySelector('.autocomplete-plus li')?
runs ->
atom.commands.dispatch(editorView, 'autocomplete-plus:confirm')
expect(editor.getText()).toContain '$other-color'
expect(editor.getTex... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 84 | 125 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:4:raw_corpus | raw_corpus | advanceClock(completionDelay)
waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
runs ->
expect(editorView.querySelector('.autocomplete-plus')).not.toExist()
describe 'when extendAutocompleteToVariables is true', ->
beforeEach ->
atom.config.set('pigments.ext... | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 127 | 166 | ||
abe33/atom-pigments:spec/pigments-provider-spec.coffee:4:completion | completion | advanceClock(completionDelay)
waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
runs ->
expect(editorView.querySelector('.autocomplete-plus')).not.toExist()
describe 'when extendAutocompleteToVariables is true', ->
beforeEach ->
atom.config.set('pigments.ext... | editor.insertText('t')
editor.insertText('t')
editor.insertText('o')
editor.insertText('n')
editor.insertText('-')
editor.insertText('p')
advanceClock(completionDelay)
waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 823df31054163e197dfb73d76c211bbd05eeeda1 | 518 | https://github.com/abe33/atom-pigments/blob/823df31054163e197dfb73d76c211bbd05eeeda1/spec/pigments-provider-spec.coffee | 127 | 166 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:raw_corpus | raw_corpus | describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
atom.config.set('pigments.autocompleteScopes', ['*'])
... | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 1 | 42 | ||
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
... | describe('autocomplete provider', function() {
var autocompleteMain, autocompleteManager, completionDelay, editor, editorView, jasmineContent, pigments, project;
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = [];
return beforeEach(function() {
... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 1 | 42 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('autocomplete provider', function() {
var autocompleteMain, autocompleteManager, completionDelay, editor, editorView, jasmineContent, pigments, project;
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineConte... | describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
atom.config.set('pigments.autocompleteScopes', ['*'])
... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 1 | 42 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:1:completion | completion | describe 'autocomplete provider', ->
[completionDelay, editor, editorView, pigments, autocompleteMain, autocompleteManager, jasmineContent, project] = []
beforeEach ->
runs ->
jasmineContent = document.body.querySelector('#jasmine-content')
atom.config.set('pigments.autocompleteScopes', ['*'])
... | jasmineContent.appendChild(workspaceElement)
autocompleteMain = atom.packages.loadPackage('autocomplete-plus').mainModule
spyOn(autocompleteMain, 'consumeProvider').andCallThrough()
pigments = atom.packages.loadPackage('pigments').mainModule
spyOn(pigments, 'provideAutocomplete').andCallThrough... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 1 | 42 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:raw_corpus | raw_corpus | waitsFor ->
autocompleteMain.autocompleteManager?.ready and
pigments.provideAutocomplete.calls.length is 1 and
autocompleteMain.consumeProvider.calls.length is 1
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCal... | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 44 | 86 | ||
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
waitsFor ->
autocompleteMain.autocompleteManager?.ready and
pigments.provideAutocomplete.calls.length is 1 and
autocompleteMain.consumeProvider.calls.length is 1
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
... | waitsFor(function() {
var ref;
return ((ref = autocompleteMain.autocompleteManager) != null ? ref.ready : void 0) && pigments.provideAutocomplete.calls.length === 1 && autocompleteMain.consumeProvider.calls.length === 1;
});
runs(function() {
var autocompleteManager;
autocompleteManager = autocompleteMain.auto... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 44 | 86 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
waitsFor(function() {
var ref;
return ((ref = autocompleteMain.autocompleteManager) != null ? ref.ready : void 0) && pigments.provideAutocomplete.calls.length === 1 && autocompleteMain.consumeProvider.calls.length === 1;
});
runs(function() {
var autocomplet... | waitsFor ->
autocompleteMain.autocompleteManager?.ready and
pigments.provideAutocomplete.calls.length is 1 and
autocompleteMain.consumeProvider.calls.length is 1
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCal... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 44 | 86 |
abe33/atom-pigments:spec/pigments-provider-spec.coffee:2:completion | completion | waitsFor ->
autocompleteMain.autocompleteManager?.ready and
pigments.provideAutocomplete.calls.length is 1 and
autocompleteMain.consumeProvider.calls.length is 1
runs ->
autocompleteManager = autocompleteMain.autocompleteManager
spyOn(autocompleteManager, 'findSuggestions').andCal... | waitsFor ->
autocompleteManager.displaySuggestions.calls.length is 1
waitsFor -> editorView.querySelector('.autocomplete-plus li')?
runs ->
popup = editorView.querySelector('.autocomplete-plus')
expect(popup).toExist()
expect(popup.querySelector('span.word').textContent).to... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/pigments-provider-spec.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-provider-spec.coffee | 44 | 86 |
nicolaskruchten/pivottable:pivot.ru.coffee:1:raw_corpus | raw_corpus | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | CoffeeScript | nicolaskruchten/pivottable | pivot.ru.coffee | MIT | 8268bef0893dfd7bca0843430b786b2ef1f2ba00 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/8268bef0893dfd7bca0843430b786b2ef1f2ba00/pivot.ru.coffee | 1 | 50 | ||
nicolaskruchten/pivottable:pivot.ru.coffee:1:completion | completion | callWithJQuery = (pivotModule) ->
if typeof exports is "object" and typeof module is "object" # CommonJS
pivotModule require("jquery")
else if typeof define is "function" and define.amd # AMD
define ["jquery"], pivotModule
# Plain browser env
else
pivotModule jQuery
callWithJQue... | filterResults: "Значение фильтра",
totals: "Всего",
vs: "на",
by: "с"
aggregators:
"Счет": tpl.count(frFmtInt),
"Счет уникальных": tpl.countUnique(frFmtInt),
"Список уникальных": tpl.listUnique(", "),
"Сумма": tpl.sum(frFmt),
... | CoffeeScript | CoffeeScript | nicolaskruchten/pivottable | pivot.ru.coffee | MIT | 8268bef0893dfd7bca0843430b786b2ef1f2ba00 | 4,440 | https://github.com/nicolaskruchten/pivottable/blob/8268bef0893dfd7bca0843430b786b2ef1f2ba00/pivot.ru.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/config/default.coffee:1:raw_corpus | raw_corpus | path = require 'path'
module.exports = config =
debug: true
apiHost: 'localhost:7001'
accountId: 'aid'
apiVersion: 'v2'
webHost: 'localhost:7001'
sessionDomain: '.localhost'
guestHost: 'localhost:7001'
schema: 'http'
mongodb: 'mongodb://localhost:27017/talk'
redisHost: 'localhost'
redisPort: 6379... | CoffeeScript | jianliaoim/talk-os | talk-api2x/config/default.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/config/default.coffee | 1 | 44 | ||
jianliaoim/talk-os:talk-api2x/config/default.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
path = require 'path'
module.exports = config =
debug: true
apiHost: 'localhost:7001'
accountId: 'aid'
apiVersion: 'v2'
webHost: 'localhost:7001'
sessionDomain: '.localhost'
guestHost: 'localhost:7001'
schema: 'http'
mongodb: 'mongodb://localho... | var config, path;
path = require('path');
module.exports = config = {
debug: true,
apiHost: 'localhost:7001',
accountId: 'aid',
apiVersion: 'v2',
webHost: 'localhost:7001',
sessionDomain: '.localhost',
guestHost: 'localhost:7001',
schema: 'http',
mongodb: 'mongodb://localhost:27017/talk',
redisHos... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/config/default.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/config/default.coffee | 1 | 44 |
jianliaoim/talk-os:talk-api2x/config/default.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var config, path;
path = require('path');
module.exports = config = {
debug: true,
apiHost: 'localhost:7001',
accountId: 'aid',
apiVersion: 'v2',
webHost: 'localhost:7001',
sessionDomain: '.localhost',
guestHost: 'localhost:7001',
schema: 'http',
... | path = require 'path'
module.exports = config =
debug: true
apiHost: 'localhost:7001'
accountId: 'aid'
apiVersion: 'v2'
webHost: 'localhost:7001'
sessionDomain: '.localhost'
guestHost: 'localhost:7001'
schema: 'http'
mongodb: 'mongodb://localhost:27017/talk'
redisHost: 'localhost'
redisPort: 6379... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/config/default.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/config/default.coffee | 1 | 44 |
jianliaoim/talk-os:talk-api2x/config/default.coffee:1:completion | completion | path = require 'path'
module.exports = config =
debug: true
apiHost: 'localhost:7001'
accountId: 'aid'
apiVersion: 'v2'
webHost: 'localhost:7001'
sessionDomain: '.localhost'
guestHost: 'localhost:7001'
schema: 'http'
mongodb: 'mongodb://localhost:27017/talk'
redisHost: 'localhost'
redisPort: 6379... | talkAccountPageUrl: 'http://localhost:7001/page'
cdnPrefix: 'https://dn-talk.oss.aliyuncs.com'
checkToken: 'Check token for heartbeat statement'
serviceConfig:
apiHost: 'http://localhost:7001/v2'
cdnPrefix: "http://localhost:7001/v2/services-static"
talkAccountApiUrl: 'http://localhost:7001/account'
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/config/default.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/config/default.coffee | 1 | 44 |
yakyak/yakyak:src/ui/models/connection.coffee:1:raw_corpus | raw_corpus | merge = (t, os...) -> t[k] = v for k,v of o when v not in [null, undefined] for o in os; t
info =
connecting: 'Connecting…'
connected: 'Connected'
connect_failed: 'Not connected'
unknown: 'Unknown' | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 16 | 22 | ||
yakyak/yakyak:src/ui/models/connection.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
merge = (t, os...) -> t[k] = v for k,v of o when v not in [null, undefined] for o in os; t
info =
connecting: 'Connecting…'
connected: 'Connected'
connect_failed: 'Not connected'
unknown: 'Unknown'
``` | var info, merge;
merge = function(t, ...os) {
var i, k, len, o, v;
for (i = 0, len = os.length; i < len; i++) {
o = os[i];
for (k in o) {
v = o[k];
if (v !== null && v !== (void 0)) {
t[k] = v;
}
}
}
return t;
};
info = {
connecting: 'Connecting…',
connected: 'Connect... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 16 | 22 |
yakyak/yakyak:src/ui/models/connection.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var info, merge;
merge = function(t, ...os) {
var i, k, len, o, v;
for (i = 0, len = os.length; i < len; i++) {
o = os[i];
for (k in o) {
v = o[k];
if (v !== null && v !== (void 0)) {
t[k] = v;
}
}
}
return t;
};
info... | merge = (t, os...) -> t[k] = v for k,v of o when v not in [null, undefined] for o in os; t
info =
connecting: 'Connecting…'
connected: 'Connected'
connect_failed: 'Not connected'
unknown: 'Unknown' | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 16 | 22 |
yakyak/yakyak:src/ui/models/connection.coffee:2:raw_corpus | raw_corpus | module.exports = exp =
state: null # current connection state
eventState: null # current event state
lastActive: tryparse(localStorage.lastActive) ? 0 # last activity timestamp
wasConnected: false
setState: (state) ->
return if @state == state
@state = state
if @wasCo... | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 24 | 73 | ||
yakyak/yakyak:src/ui/models/connection.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = exp =
state: null # current connection state
eventState: null # current event state
lastActive: tryparse(localStorage.lastActive) ? 0 # last activity timestamp
wasConnected: false
setState: (state) ->
return if... | var exp, ref;
module.exports = exp = {
state: null, // current connection state
eventState: null, // current event state
lastActive: (ref = tryparse(localStorage.lastActive)) != null ? ref : 0, // last activity timestamp
wasConnected: false,
setState: function(state) {
if (this.state === state) {
r... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 24 | 73 |
yakyak/yakyak:src/ui/models/connection.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var exp, ref;
module.exports = exp = {
state: null, // current connection state
eventState: null, // current event state
lastActive: (ref = tryparse(localStorage.lastActive)) != null ? ref : 0, // last activity timestamp
wasConnected: false,
setState: fu... | module.exports = exp =
state: null # current connection state
eventState: null # current event state
lastActive: tryparse(localStorage.lastActive) ? 0 # last activity timestamp
wasConnected: false
setState: (state) ->
return if @state == state
@state = state
if @wasCo... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 24 | 73 |
yakyak/yakyak:src/ui/models/connection.coffee:2:completion | completion | module.exports = exp =
state: null # current connection state
eventState: null # current event state
lastActive: tryparse(localStorage.lastActive) ? 0 # last activity timestamp
wasConnected: false
setState: (state) ->
return if @state == state
@state = state
if @wasCo... | setEventState: (state) ->
return if @eventState == state
@eventState = state
if state == EVENT_STATE.IN_SYNC
@setLastActive Date.now() unless @lastActive
else if state == EVENT_STATE.MISSING_SOME
# if we have a gap of more than 40 seconds we try getting
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 24 | 73 |
yakyak/yakyak:src/ui/models/connection.coffee:4:raw_corpus | raw_corpus | checkEventState = ->
elapsed = Date.now() - exp.lastActive
clearTimeout checkTimer if checkTimer
if elapsed >= TIME_ALL
wrapAction -> exp.setEventState EVENT_STATE.MISSING_ALL
else if elapsed >= TIME_SOME
wrapAction -> exp.setEventState EVENT_STATE.MISSING_SOME
else
wrapActio... | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 76 | 85 | ||
yakyak/yakyak:src/ui/models/connection.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
checkEventState = ->
elapsed = Date.now() - exp.lastActive
clearTimeout checkTimer if checkTimer
if elapsed >= TIME_ALL
wrapAction -> exp.setEventState EVENT_STATE.MISSING_ALL
else if elapsed >= TIME_SOME
wrapAction -> exp.setEvent... | var checkEventState;
checkEventState = function() {
var checkTimer, elapsed;
elapsed = Date.now() - exp.lastActive;
if (checkTimer) {
clearTimeout(checkTimer);
}
if (elapsed >= TIME_ALL) {
wrapAction(function() {
return exp.setEventState(EVENT_STATE.MISSING_ALL);
});
} else if (elapsed >=... | CoffeeScript | JavaScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 76 | 85 |
yakyak/yakyak:src/ui/models/connection.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var checkEventState;
checkEventState = function() {
var checkTimer, elapsed;
elapsed = Date.now() - exp.lastActive;
if (checkTimer) {
clearTimeout(checkTimer);
}
if (elapsed >= TIME_ALL) {
wrapAction(function() {
return exp.setEventState(EV... | checkEventState = ->
elapsed = Date.now() - exp.lastActive
clearTimeout checkTimer if checkTimer
if elapsed >= TIME_ALL
wrapAction -> exp.setEventState EVENT_STATE.MISSING_ALL
else if elapsed >= TIME_SOME
wrapAction -> exp.setEventState EVENT_STATE.MISSING_SOME
else
wrapActio... | JavaScript | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 76 | 85 |
yakyak/yakyak:src/ui/models/connection.coffee:4:completion | completion | checkEventState = ->
elapsed = Date.now() - exp.lastActive
clearTimeout checkTimer if checkTimer
if elapsed >= TIME_ALL
wrapAction -> exp.setEventState EVENT_STATE.MISSING_ALL | else if elapsed >= TIME_SOME
wrapAction -> exp.setEventState EVENT_STATE.MISSING_SOME
else
wrapAction -> exp.setEventState EVENT_STATE.IN_SYNC
checkTimer = setTimeout checkEventState, 1000 | CoffeeScript | CoffeeScript | yakyak/yakyak | src/ui/models/connection.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/models/connection.coffee | 76 | 85 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.