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
jashkenas/coffeescript:test/numeric_literal_separators.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Numeric Literal Separators // -------------------------- test('integer literals with separators', function() { eq(123_456, 123456); return eq(12_34_56, 123456); }); test('decimal literals with separators', function() { eq(1_2.34_5, 12.345); eq(1_0e1_0, ...
# Numeric Literal Separators # -------------------------- test 'integer literals with separators', -> eq 123_456, 123456 eq 12_34_56, 123456 test 'decimal literals with separators', -> eq 1_2.34_5, 12.345 eq 1_0e1_0, 10e10 eq 1_2.34_5e6_7, 12.345e67 test 'hexadecimal literals with separators', -> eq 0x1_...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/numeric_literal_separators.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/numeric_literal_separators.coffee
1
50
jashkenas/coffeescript:test/numeric_literal_separators.coffee:1:completion
completion
# Numeric Literal Separators # -------------------------- test 'integer literals with separators', -> eq 123_456, 123456 eq 12_34_56, 123456 test 'decimal literals with separators', -> eq 1_2.34_5, 12.345 eq 1_0e1_0, 10e10 eq 1_2.34_5e6_7, 12.345e67 test 'hexadecimal literals with separators', -> eq 0x1_...
range = [10_000...10_002] eq range.length, 2 eq range[0], 10000 test 'property access on a number', -> # Somehow, `3..toFixed()` is valid JavaScript; though just `3.toFixed()` # is not. CoffeeScript has long allowed code like `3.toFixed()` to compile # into `3..toFixed()`. eq 3.toFixed(), '3' # Where thi...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/numeric_literal_separators.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/numeric_literal_separators.coffee
1
50
jashkenas/coffeescript:test/numeric_literal_separators.coffee:2:raw_corpus
raw_corpus
throwsCompileError '0x_1234' throwsCompileError '0x1234_' throwsCompileError '0x1__34' test 'invalid binary literal separators do not compile', -> throwsCompileError '0b_100' throwsCompileError '0b100_' throwsCompileError '0b1__1' test 'invalid octal literal separators do not compile', -> throwsCompileErr...
CoffeeScript
jashkenas/coffeescript
test/numeric_literal_separators.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/numeric_literal_separators.coffee
51
63
jashkenas/coffeescript:test/numeric_literal_separators.coffee:2:completion
completion
throwsCompileError '0x_1234' throwsCompileError '0x1234_' throwsCompileError '0x1__34' test 'invalid binary literal separators do not compile', -> throwsCompileError '0b_100'
throwsCompileError '0b100_' throwsCompileError '0b1__1' test 'invalid octal literal separators do not compile', -> throwsCompileError '0o_777' throwsCompileError '0o777_' throwsCompileError '0o6__6'
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/numeric_literal_separators.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/numeric_literal_separators.coffee
51
63
jianliaoim/talk-os:talk-web/client/actions/device.coffee:1:raw_corpus
raw_corpus
recorder = require 'actions-recorder' dispatcher = require '../dispatcher' exports.markTeam = (_teamId) -> dispatcher.handleViewAction type: 'device/mark-team' data: _teamId exports.markChannel = (channel) -> dispatcher.handleViewAction type: 'device/mark-channel' data: channel exports.networkRe...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
1
50
jianliaoim/talk-os:talk-web/client/actions/device.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript recorder = require 'actions-recorder' dispatcher = require '../dispatcher' exports.markTeam = (_teamId) -> dispatcher.handleViewAction type: 'device/mark-team' data: _teamId exports.markChannel = (channel) -> dispatcher.handleViewAction type: '...
var dispatcher, recorder; recorder = require('actions-recorder'); dispatcher = require('../dispatcher'); exports.markTeam = function(_teamId) { return dispatcher.handleViewAction({ type: 'device/mark-team', data: _teamId }); }; exports.markChannel = function(channel) { return dispatcher.handleViewActi...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
1
50
jianliaoim/talk-os:talk-web/client/actions/device.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dispatcher, recorder; recorder = require('actions-recorder'); dispatcher = require('../dispatcher'); exports.markTeam = function(_teamId) { return dispatcher.handleViewAction({ type: 'device/mark-team', data: _teamId }); }; exports.markChannel =...
recorder = require 'actions-recorder' dispatcher = require '../dispatcher' exports.markTeam = (_teamId) -> dispatcher.handleViewAction type: 'device/mark-team' data: _teamId exports.markChannel = (channel) -> dispatcher.handleViewAction type: 'device/mark-channel' data: channel exports.networkRe...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
1
50
jianliaoim/talk-os:talk-web/client/actions/device.coffee:1:completion
completion
recorder = require 'actions-recorder' dispatcher = require '../dispatcher' exports.markTeam = (_teamId) -> dispatcher.handleViewAction type: 'device/mark-team' data: _teamId exports.markChannel = (channel) -> dispatcher.handleViewAction type: 'device/mark-channel' data: channel exports.networkRe...
data: loadingInfo exports.networkLoaded = (loadingInfo) -> dispatcher.handleViewAction type: 'device/loaded' data: loadingInfo exports.viewAttachment = (_attachmentId) -> dispatcher.handleViewAction type: 'device/view-attachment' data: _attachmentId exports.tuned = (tuned) -> store = recorder.g...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
1
50
jianliaoim/talk-os:talk-web/client/actions/device.coffee:2:raw_corpus
raw_corpus
exports.clearingUnread = (_teamId, _channelId, isClearing) -> dispatcher.handleViewAction type: 'device/clearing-unread' data: _teamId: _teamId _channelId: _channelId isClearing: isClearing exports.updateInboxLoadStatus = (_teamId, loadStatus) -> dispatcher.handleViewAction type: 'dev...
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
51
71
jianliaoim/talk-os:talk-web/client/actions/device.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.clearingUnread = (_teamId, _channelId, isClearing) -> dispatcher.handleViewAction type: 'device/clearing-unread' data: _teamId: _teamId _channelId: _channelId isClearing: isClearing exports.updateInboxLoadStatus = (_teamId, lo...
exports.clearingUnread = function(_teamId, _channelId, isClearing) { return dispatcher.handleViewAction({ type: 'device/clearing-unread', data: { _teamId: _teamId, _channelId: _channelId, isClearing: isClearing } }); }; exports.updateInboxLoadStatus = function(_teamId, loadStatus) { ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
51
71
jianliaoim/talk-os:talk-web/client/actions/device.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.clearingUnread = function(_teamId, _channelId, isClearing) { return dispatcher.handleViewAction({ type: 'device/clearing-unread', data: { _teamId: _teamId, _channelId: _channelId, isClearing: isClearing } }); }; exports.up...
exports.clearingUnread = (_teamId, _channelId, isClearing) -> dispatcher.handleViewAction type: 'device/clearing-unread' data: _teamId: _teamId _channelId: _channelId isClearing: isClearing exports.updateInboxLoadStatus = (_teamId, loadStatus) -> dispatcher.handleViewAction type: 'dev...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
51
71
jianliaoim/talk-os:talk-web/client/actions/device.coffee:2:completion
completion
exports.clearingUnread = (_teamId, _channelId, isClearing) -> dispatcher.handleViewAction type: 'device/clearing-unread' data: _teamId: _teamId _channelId: _channelId isClearing: isClearing exports.updateInboxLoadStatus = (_teamId, loadStatus) -> dispatcher.handleViewAction
type: 'device/update-inbox-load-status' data: _teamId: _teamId loadStatus: loadStatus exports.setEditMessageId = (_id) -> dispatcher.handleViewAction type: 'device/set-edit-message-id' data: _id: _id
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/actions/device.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/device.coffee
51
71
yakyak/yakyak:src/ui/views/dockicon.coffee:1:raw_corpus
raw_corpus
ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate) -> if require('os').platform() isnt 'darwin' then retu...
CoffeeScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate)...
var dockAlreadyVisible, ipc; ipc = require('electron').ipcRenderer; // calling show multiple times makes the osx app flash // therefore we remember here if the dock is already shown // and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true; module.exports = function(viewstate) { if (requi...
CoffeeScript
JavaScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dockAlreadyVisible, ipc; ipc = require('electron').ipcRenderer; // calling show multiple times makes the osx app flash // therefore we remember here if the dock is already shown // and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = tr...
ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate) -> if require('os').platform() isnt 'darwin' then retu...
JavaScript
CoffeeScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:completion
completion
ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate) -> if require('os').platform() isnt 'darwin' then retu...
if viewstate.hidedockicon and (dockAlreadyVisible is true) console.log 'hiding dock' ipc.send 'app.dock:hide' dockAlreadyVisible = false if not viewstate.hidedockicon and (dockAlreadyVisible is false) console.log 'showing dock' ipc.send 'app.dock:show' dockAlreadyVisible = true
CoffeeScript
CoffeeScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd
3,762
https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:raw_corpus
raw_corpus
ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate) -> if require('os').platform() isnt 'darwin' then retu...
CoffeeScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
637de30240821cbf6ed71c5069d95350706f8876
3,762
https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate)...
var dockAlreadyVisible, ipc; ipc = require('electron').ipcRenderer; // calling show multiple times makes the osx app flash // therefore we remember here if the dock is already shown // and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true; module.exports = function(viewstate) { if (requi...
CoffeeScript
JavaScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
637de30240821cbf6ed71c5069d95350706f8876
3,762
https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dockAlreadyVisible, ipc; ipc = require('electron').ipcRenderer; // calling show multiple times makes the osx app flash // therefore we remember here if the dock is already shown // and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = tr...
ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate) -> if require('os').platform() isnt 'darwin' then retu...
JavaScript
CoffeeScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
637de30240821cbf6ed71c5069d95350706f8876
3,762
https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/dockicon.coffee
1
18
yakyak/yakyak:src/ui/views/dockicon.coffee:1:completion
completion
ipc = require('electron').ipcRenderer # calling show multiple times makes the osx app flash # therefore we remember here if the dock is already shown # and we avoid re-calling app.dock.show() multiple times dockAlreadyVisible = true module.exports = (viewstate) -> if require('os').platform() isnt 'darwin' then retu...
if viewstate.hidedockicon and (dockAlreadyVisible is true) console.log 'hiding dock' ipc.send 'app.dock.hide' dockAlreadyVisible = false if not viewstate.hidedockicon and (dockAlreadyVisible is false) console.log 'showing dock' ipc.send 'app.dock.show' dockAlreadyVisible = true
CoffeeScript
CoffeeScript
yakyak/yakyak
src/ui/views/dockicon.coffee
MIT
637de30240821cbf6ed71c5069d95350706f8876
3,762
https://github.com/yakyak/yakyak/blob/637de30240821cbf6ed71c5069d95350706f8876/src/ui/views/dockicon.coffee
1
18
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:raw_corpus
raw_corpus
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', ...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> ...
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> // Licensed under the MIT license. // <http://outsider.mit-license.org/> var parser, should; should = require('should'); parser = require('../../src/parser/scala-parser'); describe('scala-parser >', function() { return describe('ind...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> // Licensed under the MIT license. // <http://outsider.mit-license.org/> var parser, should; should = require('should'); parser = require('../../src/parser/scala-parser'); describ...
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', ...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:completion
completion
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', ...
convention.indent.space.should.equal 1 it 'check space indent #4', -> convention = parser.indent ' a = 1;', {} convention.indent.space.should.equal 1 it 'check tab indent #1', -> convention = parser.indent '\ta = 1;', {} convention.indent.tab.should.equal 1 it 'check tab indent ...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:raw_corpus
raw_corpus
it 'check tab indent #5', -> convention = parser.indent 'a = 1;', {} convention.indent.tab.should.equal 0 describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} ...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'check tab indent #5', -> convention = parser.indent 'a = 1;', {} convention.indent.tab.should.equal 0 describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstNam...
it('check tab indent #5', function() { var convention; convention = parser.indent('a = 1;', {}); return convention.indent.tab.should.equal(0); }); describe('linelength >', function() { it('line length is 80 characters #1', function() { var convention; convention = parser.linelength(' public String f...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('check tab indent #5', function() { var convention; convention = parser.indent('a = 1;', {}); return convention.indent.tab.should.equal(0); }); describe('linelength >', function() { it('line length is 80 characters #1', function() { var convention; ...
it 'check tab indent #5', -> convention = parser.indent 'a = 1;', {} convention.indent.tab.should.equal 0 describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} ...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:completion
completion
it 'check tab indent #5', -> convention = parser.indent 'a = 1;', {} convention.indent.tab.should.equal 0 describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} ...
convention = parser.linelength ' public String findFirstName( String name, String age, String job) { return \"a\"; }', {} convention.linelength.char120.should.equal 1 it 'line length is 120 characters #2', -> convention = parser.linelength '\t\tpublic String findFirstName( String name, String age, S...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:raw_corpus
raw_corpus
it 'camelcases with capitalzied #2', -> convention = parser.classname 'class My1stFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camel...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'camelcases with capitalzied #2', -> convention = parser.classname 'class My1stFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} c...
it('camelcases with capitalzied #2', function() { var convention; convention = parser.classname('class My1stFairLady', {}); return convention.classname.capital.should.equal(1); }); it('camelcases with capitalzied #3', function() { var convention; convention = parser.classname('trait MyFairLady', {}); retur...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('camelcases with capitalzied #2', function() { var convention; convention = parser.classname('class My1stFairLady', {}); return convention.classname.capital.should.equal(1); }); it('camelcases with capitalzied #3', function() { var convention; convent...
it 'camelcases with capitalzied #2', -> convention = parser.classname 'class My1stFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camel...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:completion
completion
it 'camelcases with capitalzied #2', -> convention = parser.classname 'class My1stFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camel...
it 'camelcases with non-capitalzied #3', -> convention = parser.classname 'trait myFairLady', {} convention.classname.nocapital.should.equal 1 it 'camelcases with non-capitalzied #4', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.nocapital.should.equal 0 de...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:raw_corpus
raw_corpus
it 'camelcases with capitalzied #4', -> convention = parser.variablename 'val MY_VALUE = ...', {} convention.variablename.camelcase.should.equal 0 it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.shou...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'camelcases with capitalzied #4', -> convention = parser.variablename 'val MY_VALUE = ...', {} convention.variablename.camelcase.should.equal 0 it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue =...
it('camelcases with capitalzied #4', function() { var convention; convention = parser.variablename('val MY_VALUE = ...', {}); return convention.variablename.camelcase.should.equal(0); }); it('camelcases with non-capitalzied #1', function() { var convention; convention = parser.variablename('val MyValue = ......
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('camelcases with capitalzied #4', function() { var convention; convention = parser.variablename('val MY_VALUE = ...', {}); return convention.variablename.camelcase.should.equal(0); }); it('camelcases with non-capitalzied #1', function() { var convention...
it 'camelcases with capitalzied #4', -> convention = parser.variablename 'val MY_VALUE = ...', {} convention.variablename.camelcase.should.equal 0 it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.shou...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:completion
completion
it 'camelcases with capitalzied #4', -> convention = parser.variablename 'val MY_VALUE = ...', {} convention.variablename.camelcase.should.equal 0 it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.shou...
describe 'parametertype >', -> it 'parameter type with one space #1', -> convention = parser.parametertype 'def add(a: Int, b: Int) = a + b', {} convention.parametertype.tracespace.should.equal 1 it 'parameter type with one space #2', -> convention = parser.parametertype 'def add(a:Int, b:...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:raw_corpus
raw_corpus
it 'parameter type with both space #3', -> convention = parser.parametertype 'def add(a:Int, b: Int) : Unit = a + b', {} convention.parametertype.bothspace.should.equal 0 it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convent...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
168
182
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'parameter type with both space #3', -> convention = parser.parametertype 'def add(a:Int, b: Int) : Unit = a + b', {} convention.parametertype.bothspace.should.equal 0 it 'parameter type with no space #1', -> convention = parser.paramet...
it('parameter type with both space #3', function() { var convention; convention = parser.parametertype('def add(a:Int, b: Int) : Unit = a + b', {}); return convention.parametertype.bothspace.should.equal(0); }); it('parameter type with no space #1', function() { var convention; convention = parser.parametert...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
168
182
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('parameter type with both space #3', function() { var convention; convention = parser.parametertype('def add(a:Int, b: Int) : Unit = a + b', {}); return convention.parametertype.bothspace.should.equal(0); }); it('parameter type with no space #1', function...
it 'parameter type with both space #3', -> convention = parser.parametertype 'def add(a:Int, b: Int) : Unit = a + b', {} convention.parametertype.bothspace.should.equal 0 it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convent...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
168
182
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:completion
completion
it 'parameter type with both space #3', -> convention = parser.parametertype 'def add(a:Int, b: Int) : Unit = a + b', {} convention.parametertype.bothspace.should.equal 0 it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convent...
it 'parameter type with no space #2', -> convention = parser.parametertype 'def add(a: Int, b:Int) = a + b', {} convention.parametertype.nospace.should.equal 1 it 'parameter type with no space #2', -> convention = parser.parametertype 'def add(a: Int, b: Int):Unit = a + b', {} convention....
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/scala-parser.test.coffee
168
182
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:raw_corpus
raw_corpus
should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', -> convention = parser.indent 'a = 1;', {} convention.indent.space.should.equal 0 it 'check space indent #2', -> convention = parse...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', -> convention = parser.indent 'a = 1;', {} convention.indent.space.should.equal 0 ...
var parser, should; should = require('should'); parser = require('../../src/parser/scala-parser'); describe('scala-parser >', function() { return describe('indent >', function() { it('check space indent #1', function() { var convention; convention = parser.indent('a = 1;', {}); return convent...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var parser, should; should = require('should'); parser = require('../../src/parser/scala-parser'); describe('scala-parser >', function() { return describe('indent >', function() { it('check space indent #1', function() { var convention; convent...
should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', -> convention = parser.indent 'a = 1;', {} convention.indent.space.should.equal 0 it 'check space indent #2', -> convention = parse...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:1:completion
completion
should = require 'should' parser = require '../../src/parser/scala-parser' describe 'scala-parser >', -> describe 'indent >', -> it 'check space indent #1', -> convention = parser.indent 'a = 1;', {} convention.indent.space.should.equal 0 it 'check space indent #2', -> convention = parse...
convention.indent.space.should.equal 1 it 'check tab indent #1', -> convention = parser.indent '\ta = 1;', {} convention.indent.tab.should.equal 1 it 'check tab indent #2', -> convention = parser.indent '\t\ta = 1;', {} convention.indent.tab.should.equal 1 it 'check tab indent #3'...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
1
42
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:raw_corpus
raw_corpus
describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} convention.linelength.char80.should.equal 1 it 'line length is 80 characters #2', -> convention = parser.linel...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} convention.linelength.char80.should.equal 1 it 'line length...
describe('linelength >', function() { it('line length is 80 characters #1', function() { var convention; convention = parser.linelength(' public String findFirstName( String name, String age) { return \"a\"; }', {}); return convention.linelength.char80.should.equal(1); }); it('line length is 80 cha...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('linelength >', function() { it('line length is 80 characters #1', function() { var convention; convention = parser.linelength(' public String findFirstName( String name, String age) { return \"a\"; }', {}); return convention.linelength.ch...
describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} convention.linelength.char80.should.equal 1 it 'line length is 80 characters #2', -> convention = parser.linel...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:2:completion
completion
describe 'linelength >', -> it 'line length is 80 characters #1', -> convention = parser.linelength ' public String findFirstName( String name, String age) { return \"a\"; }', {} convention.linelength.char80.should.equal 1 it 'line length is 80 characters #2', -> convention = parser.linel...
convention = parser.linelength '\t\tpublic String findFirstName( String name, String age, String job) { return \"a\"; }', {} convention.linelength.char120.should.equal 1 it 'line length is 120 characters #3', -> convention = parser.linelength '\t\tpublic String findFirstName( String name, String age) {...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
44
82
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:raw_corpus
raw_corpus
it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #4', -> convention = parser.classname 'class myFairLady', {} convention.classname.capital.should.equal 0 it 'camelcas...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #4', -> convention = parser.classname 'class myFairLady', {} conv...
it('camelcases with capitalzied #3', function() { var convention; convention = parser.classname('trait MyFairLady', {}); return convention.classname.capital.should.equal(1); }); it('camelcases with capitalzied #4', function() { var convention; convention = parser.classname('class myFairLady', {}); return c...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('camelcases with capitalzied #3', function() { var convention; convention = parser.classname('trait MyFairLady', {}); return convention.classname.capital.should.equal(1); }); it('camelcases with capitalzied #4', function() { var convention; convention...
it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #4', -> convention = parser.classname 'class myFairLady', {} convention.classname.capital.should.equal 0 it 'camelcas...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:3:completion
completion
it 'camelcases with capitalzied #3', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.capital.should.equal 1 it 'camelcases with capitalzied #4', -> convention = parser.classname 'class myFairLady', {} convention.classname.capital.should.equal 0 it 'camelcas...
it 'camelcases with non-capitalzied #4', -> convention = parser.classname 'trait MyFairLady', {} convention.classname.nocapital.should.equal 0 describe 'variablename >', -> it 'camelcases with capitalzied #1', -> convention = parser.variablename 'val myValue = ...', {} convention.variab...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
84
124
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:raw_corpus
raw_corpus
it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.should.equal 1 it 'camelcases with non-capitalzied #2', -> convention = parser.variablename 'def MyMethod = ...', {} convention.variablename.noncamelca...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.should.equal 1 it 'camelcases with non-capitalzied #2', -> convention = parser.variablename 'def MyM...
it('camelcases with non-capitalzied #1', function() { var convention; convention = parser.variablename('val MyValue = ...', {}); return convention.variablename.noncamelcase.should.equal(1); }); it('camelcases with non-capitalzied #2', function() { var convention; convention = parser.variablename('def MyMetho...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('camelcases with non-capitalzied #1', function() { var convention; convention = parser.variablename('val MyValue = ...', {}); return convention.variablename.noncamelcase.should.equal(1); }); it('camelcases with non-capitalzied #2', function() { var conv...
it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.should.equal 1 it 'camelcases with non-capitalzied #2', -> convention = parser.variablename 'def MyMethod = ...', {} convention.variablename.noncamelca...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:4:completion
completion
it 'camelcases with non-capitalzied #1', -> convention = parser.variablename 'val MyValue = ...', {} convention.variablename.noncamelcase.should.equal 1 it 'camelcases with non-capitalzied #2', -> convention = parser.variablename 'def MyMethod = ...', {} convention.variablename.noncamelca...
convention.parametertype.tracespace.should.equal 1 it 'parameter type with one space #2', -> convention = parser.parametertype 'def add(a:Int, b: Int) = a + b', {} convention.parametertype.tracespace.should.equal 1 it 'parameter type with one space #3', -> convention = parser.parametertype ...
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
126
166
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:raw_corpus
raw_corpus
it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convention.parametertype.nospace.should.equal 1 it 'parameter type with no space #2', -> convention = parser.parametertype 'def add(a: Int, b:Int) = a + b', {} convention.paramet...
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
168
178
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convention.parametertype.nospace.should.equal 1 it 'parameter type with no space #2', -> convention = parser.parametertype 'def...
it('parameter type with no space #1', function() { var convention; convention = parser.parametertype('def add(a:Int, b:Int) = a + b', {}); return convention.parametertype.nospace.should.equal(1); }); it('parameter type with no space #2', function() { var convention; convention = parser.parametertype('def add...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
168
178
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('parameter type with no space #1', function() { var convention; convention = parser.parametertype('def add(a:Int, b:Int) = a + b', {}); return convention.parametertype.nospace.should.equal(1); }); it('parameter type with no space #2', function() { var c...
it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convention.parametertype.nospace.should.equal 1 it 'parameter type with no space #2', -> convention = parser.parametertype 'def add(a: Int, b:Int) = a + b', {} convention.paramet...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
168
178
outsideris/popularconvention:test/parser/scala-parser.test.coffee:5:completion
completion
it 'parameter type with no space #1', -> convention = parser.parametertype 'def add(a:Int, b:Int) = a + b', {} convention.parametertype.nospace.should.equal 1 it 'parameter type with no space #2', ->
convention = parser.parametertype 'def add(a: Int, b:Int) = a + b', {} convention.parametertype.nospace.should.equal 1 it 'parameter type with no space #2', -> convention = parser.parametertype 'def add(a: Int, b: Int):Unit = a + b', {} convention.parametertype.nospace.should.equal 0
CoffeeScript
CoffeeScript
outsideris/popularconvention
test/parser/scala-parser.test.coffee
MIT
d07005b56e1a7de9d26bb9638cdbbc0fbcb81352
730
https://github.com/outsideris/popularconvention/blob/d07005b56e1a7de9d26bb9638cdbbc0fbcb81352/test/parser/scala-parser.test.coffee
168
178
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:raw_corpus
raw_corpus
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode.screenShake.enabled', (value) => @enabled = value...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode....
var CompositeDisposable, random, throttle; ({CompositeDisposable} = require("atom")); throttle = require("lodash.throttle"); random = require("lodash.random"); module.exports = { enabled: false, subscriptions: null, conf: [], init: function() { return this.enableSubscription = atom.config.observe('activ...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var CompositeDisposable, random, throttle; ({CompositeDisposable} = require("atom")); throttle = require("lodash.throttle"); random = require("lodash.random"); module.exports = { enabled: false, subscriptions: null, conf: [], init: function() { retu...
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode.screenShake.enabled', (value) => @enabled = value...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:completion
completion
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode.screenShake.enabled', (value) => @enabled = value...
@throttledShake = throttle @shakeElement.bind(this), 100, trailing: false disable: -> @subscriptions?.dispose() observe: (key) -> @subscriptions.add atom.config.observe( "activate-power-mode.screenShake.#{key}", (value) => @conf[key] = value ) initConfigSubscribers: -> @subscripti...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:2:raw_corpus
raw_corpus
else if intensity is 'min' max = max - min x = @shakeIntensity min, max y = @shakeIntensity min, max element.style.transform = "translate(#{x}px, #{y}px)" setTimeout -> element.style.transform = "" , 75 shakeIntensity: (min, max) -> direction = if Math.random() > 0.5 then -1 el...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/screen-shaker.coffee
51
65
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:2:completion
completion
else if intensity is 'min' max = max - min x = @shakeIntensity min, max y = @shakeIntensity min, max element.style.transform = "translate(#{x}px, #{y}px)"
setTimeout -> element.style.transform = "" , 75 shakeIntensity: (min, max) -> direction = if Math.random() > 0.5 then -1 else 1 random(min, max, true) * direction
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ac060c2476ba8b323ca932eda97da9bc0c051b34
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/service/screen-shaker.coffee
51
65
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:2:raw_corpus
raw_corpus
else if intensity is 'min' max = max - min x = @shakeIntensity min, max y = @shakeIntensity min, max element.style.top = "#{y}px" element.style.left = "#{x}px" setTimeout -> element.style.top = "" element.style.left = "" , 75 shakeIntensity: (min, max) -> direction = ...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
5ed1f997112958b50080e937cf7ba22c34595b88
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5ed1f997112958b50080e937cf7ba22c34595b88/lib/service/screen-shaker.coffee
51
67
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:2:completion
completion
else if intensity is 'min' max = max - min x = @shakeIntensity min, max y = @shakeIntensity min, max element.style.top = "#{y}px" element.style.left = "#{x}px"
setTimeout -> element.style.top = "" element.style.left = "" , 75 shakeIntensity: (min, max) -> direction = if Math.random() > 0.5 then -1 else 1 random(min, max, true) * direction
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
5ed1f997112958b50080e937cf7ba22c34595b88
3,570
https://github.com/JoelBesada/activate-power-mode/blob/5ed1f997112958b50080e937cf7ba22c34595b88/lib/service/screen-shaker.coffee
51
67
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:raw_corpus
raw_corpus
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode.screenShake.enabled', (value) => @enabled = value...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
fc6326ed8f5ba64df68990cbe0285a086ab164bf
3,570
https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode....
var CompositeDisposable, random, throttle; ({CompositeDisposable} = require("atom")); throttle = require("lodash.throttle"); random = require("lodash.random"); module.exports = { enabled: false, subscriptions: null, conf: [], init: function() { return this.enableSubscription = atom.config.observe('activ...
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
fc6326ed8f5ba64df68990cbe0285a086ab164bf
3,570
https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var CompositeDisposable, random, throttle; ({CompositeDisposable} = require("atom")); throttle = require("lodash.throttle"); random = require("lodash.random"); module.exports = { enabled: false, subscriptions: null, conf: [], init: function() { retu...
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode.screenShake.enabled', (value) => @enabled = value...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
fc6326ed8f5ba64df68990cbe0285a086ab164bf
3,570
https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:completion
completion
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = enabled: false subscriptions: null conf: [] init: -> @enableSubscription = atom.config.observe( 'activate-power-mode.screenShake.enabled', (value) => @enabled = value...
@throttledShake = throttle @shakeElement.bind(this), 100, trailing: false disable: -> @subscriptions?.dispose() observe: (key) -> @subscriptions.add atom.config.observe( "activate-power-mode.screenShake.#{key}", (value) => @conf[key] = value ) initConfigSubscribers: -> @subscripti...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
fc6326ed8f5ba64df68990cbe0285a086ab164bf
3,570
https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/screen-shaker.coffee
1
50
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:2:raw_corpus
raw_corpus
element.style.top = "#{y}px" element.style.left = "#{x}px" setTimeout -> element.style.top = "" element.style.left = "" , 75 shakeIntensity: (min, max) -> direction = if Math.random() > 0.5 then -1 else 1 random(min, max, true) * direction
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
fc6326ed8f5ba64df68990cbe0285a086ab164bf
3,570
https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/screen-shaker.coffee
51
62
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:2:completion
completion
element.style.top = "#{y}px" element.style.left = "#{x}px" setTimeout -> element.style.top = ""
element.style.left = "" , 75 shakeIntensity: (min, max) -> direction = if Math.random() > 0.5 then -1 else 1 random(min, max, true) * direction
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
fc6326ed8f5ba64df68990cbe0285a086ab164bf
3,570
https://github.com/JoelBesada/activate-power-mode/blob/fc6326ed8f5ba64df68990cbe0285a086ab164bf/lib/service/screen-shaker.coffee
51
62
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:raw_corpus
raw_corpus
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = subscriptions: null conf: [] init: -> @initConfigSubscribers() @throttledShake = throttle @shakeElement.bind(this), 100, trailing: false disable: -> @subscriptions.dispose...
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ef268c960138fd09ca9076e0766119d697f25dfa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/screen-shaker.coffee
1
47
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript {CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = subscriptions: null conf: [] init: -> @initConfigSubscribers() @throttledShake = throttle @shakeElement.bind(this), 100, ...
var CompositeDisposable, random, throttle; ({CompositeDisposable} = require("atom")); throttle = require("lodash.throttle"); random = require("lodash.random"); module.exports = { subscriptions: null, conf: [], init: function() { this.initConfigSubscribers(); return this.throttledShake = throttle(this....
CoffeeScript
JavaScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ef268c960138fd09ca9076e0766119d697f25dfa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/screen-shaker.coffee
1
47
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var CompositeDisposable, random, throttle; ({CompositeDisposable} = require("atom")); throttle = require("lodash.throttle"); random = require("lodash.random"); module.exports = { subscriptions: null, conf: [], init: function() { this.initConfigSubscri...
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = subscriptions: null conf: [] init: -> @initConfigSubscribers() @throttledShake = throttle @shakeElement.bind(this), 100, trailing: false disable: -> @subscriptions.dispose...
JavaScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ef268c960138fd09ca9076e0766119d697f25dfa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/screen-shaker.coffee
1
47
JoelBesada/activate-power-mode:lib/service/screen-shaker.coffee:1:completion
completion
{CompositeDisposable} = require "atom" throttle = require "lodash.throttle" random = require "lodash.random" module.exports = subscriptions: null conf: [] init: -> @initConfigSubscribers() @throttledShake = throttle @shakeElement.bind(this), 100, trailing: false disable: -> @subscriptions.dispose...
@observe 'minIntensity' @observe 'maxIntensity' shake: (element) -> @throttledShake(element) shakeElement: (element) -> min = @conf['minIntensity'] max = @conf['maxIntensity'] x = @shakeIntensity min, max y = @shakeIntensity min, max element.style.top = "#{y}px" element.style.lef...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/service/screen-shaker.coffee
MIT
ef268c960138fd09ca9076e0766119d697f25dfa
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ef268c960138fd09ca9076e0766119d697f25dfa/lib/service/screen-shaker.coffee
1
47
xhan/qqbot:tests/login.coffee:1:raw_corpus
raw_corpus
int = (v) -> parseInt v log = console.log auth = require "../src/qqauth" api = require "../src/qqapi" jsons = JSON.stringify defaults = require '../src/defaults' config = require '../config' qq = config.account pass = config.password
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
5
15
xhan/qqbot:tests/login.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript int = (v) -> parseInt v log = console.log auth = require "../src/qqauth" api = require "../src/qqapi" jsons = JSON.stringify defaults = require '../src/defaults' config = require '../config' qq = config.account pass = config.password ```
var api, auth, config, defaults, int, jsons, log, pass, qq; int = function(v) { return parseInt(v); }; log = console.log; auth = require("../src/qqauth"); api = require("../src/qqapi"); jsons = JSON.stringify; defaults = require('../src/defaults'); config = require('../config'); qq = config.account; pass = c...
CoffeeScript
JavaScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
5
15
xhan/qqbot:tests/login.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var api, auth, config, defaults, int, jsons, log, pass, qq; int = function(v) { return parseInt(v); }; log = console.log; auth = require("../src/qqauth"); api = require("../src/qqapi"); jsons = JSON.stringify; defaults = require('../src/defaults'); config ...
int = (v) -> parseInt v log = console.log auth = require "../src/qqauth" api = require "../src/qqapi" jsons = JSON.stringify defaults = require '../src/defaults' config = require '../config' qq = config.account pass = config.password
JavaScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
5
15
xhan/qqbot:tests/login.coffee:1:completion
completion
int = (v) -> parseInt v log = console.log auth = require "../src/qqauth" api = require "../src/qqapi" jsons = JSON.stringify
defaults = require '../src/defaults' config = require '../config' qq = config.account pass = config.password
CoffeeScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
5
15
xhan/qqbot:tests/login.coffee:2:raw_corpus
raw_corpus
prompt = (title, callback) -> process.stdin.resume() process.stdout.write(title) process.stdin.on "data", (data) -> data = data.toString().trim() # 过滤无效内容 if data callback data process.stdin.pause() # control + d to end process.stdin.on 'end', -> ...
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
17
29
xhan/qqbot:tests/login.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript prompt = (title, callback) -> process.stdin.resume() process.stdout.write(title) process.stdin.on "data", (data) -> data = data.toString().trim() # 过滤无效内容 if data callback data process.stdin.pause() ...
var prompt; prompt = function(title, callback) { process.stdin.resume(); process.stdout.write(title); process.stdin.on("data", function(data) { data = data.toString().trim(); // 过滤无效内容 if (data) { callback(data); return process.stdin.pause(); } }); // control + d to end return p...
CoffeeScript
JavaScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
17
29
xhan/qqbot:tests/login.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var prompt; prompt = function(title, callback) { process.stdin.resume(); process.stdout.write(title); process.stdin.on("data", function(data) { data = data.toString().trim(); // 过滤无效内容 if (data) { callback(data); return process.stdin....
prompt = (title, callback) -> process.stdin.resume() process.stdout.write(title) process.stdin.on "data", (data) -> data = data.toString().trim() # 过滤无效内容 if data callback data process.stdin.pause() # control + d to end process.stdin.on 'end', -> ...
JavaScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
17
29
xhan/qqbot:tests/login.coffee:2:completion
completion
prompt = (title, callback) -> process.stdin.resume() process.stdout.write(title) process.stdin.on "data", (data) -> data = data.toString().trim() # 过滤无效内容
if data callback data process.stdin.pause() # control + d to end process.stdin.on 'end', -> process.stdout.write('end') callback()
CoffeeScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
17
29
xhan/qqbot:tests/login.coffee:3:raw_corpus
raw_corpus
test_check_qq = -> auth.check_qq_verify '123774072' , (result) -> log int result[0] log result[1] log result[2]
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
31
35
xhan/qqbot:tests/login.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test_check_qq = -> auth.check_qq_verify '123774072' , (result) -> log int result[0] log result[1] log result[2] ```
var test_check_qq; test_check_qq = function() { return auth.check_qq_verify('123774072', function(result) { log(int(result[0])); log(result[1]); return log(result[2]); }); };
CoffeeScript
JavaScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
31
35
xhan/qqbot:tests/login.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test_check_qq; test_check_qq = function() { return auth.check_qq_verify('123774072', function(result) { log(int(result[0])); log(result[1]); return log(result[2]); }); }; ```
test_check_qq = -> auth.check_qq_verify '123774072' , (result) -> log int result[0] log result[1] log result[2]
JavaScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
31
35
xhan/qqbot:tests/login.coffee:4:raw_corpus
raw_corpus
test_encode_password = -> log auth.encode_password(pass,"!PYL",'\\x00\\x00\\x00\\x00\\x07\\x60\\xa4\\x78') # should equal to 7BB648B45C561A5F986DECCD94644A3E # 需要验证码的登录
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
38
42
xhan/qqbot:tests/login.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test_encode_password = -> log auth.encode_password(pass,"!PYL",'\\x00\\x00\\x00\\x00\\x07\\x60\\xa4\\x78') # should equal to 7BB648B45C561A5F986DECCD94644A3E # 需要验证码的登录 ```
var test_encode_password; test_encode_password = function() { return log(auth.encode_password(pass, "!PYL", '\\x00\\x00\\x00\\x00\\x07\\x60\\xa4\\x78')); }; // should equal to 7BB648B45C561A5F986DECCD94644A3E // 需要验证码的登录
CoffeeScript
JavaScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
38
42
xhan/qqbot:tests/login.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test_encode_password; test_encode_password = function() { return log(auth.encode_password(pass, "!PYL", '\\x00\\x00\\x00\\x00\\x07\\x60\\xa4\\x78')); }; // should equal to 7BB648B45C561A5F986DECCD94644A3E // 需要验证码的登录 ```
test_encode_password = -> log auth.encode_password(pass,"!PYL",'\\x00\\x00\\x00\\x00\\x07\\x60\\xa4\\x78') # should equal to 7BB648B45C561A5F986DECCD94644A3E # 需要验证码的登录
JavaScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
38
42
xhan/qqbot:tests/login.coffee:5:raw_corpus
raw_corpus
test_encode_password2 = -> log auth.encode_password(pass,'zkmm','\\x00\\x00\\x00\\x00\\xa5\\x13\\xed\\x18') # should equal to F16B5C4EBE52641313403CB93C0FF569
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
43
45
xhan/qqbot:tests/login.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test_encode_password2 = -> log auth.encode_password(pass,'zkmm','\\x00\\x00\\x00\\x00\\xa5\\x13\\xed\\x18') # should equal to F16B5C4EBE52641313403CB93C0FF569 ```
var test_encode_password2; test_encode_password2 = function() { return log(auth.encode_password(pass, 'zkmm', '\\x00\\x00\\x00\\x00\\xa5\\x13\\xed\\x18')); }; // should equal to F16B5C4EBE52641313403CB93C0FF569
CoffeeScript
JavaScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
43
45
xhan/qqbot:tests/login.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test_encode_password2; test_encode_password2 = function() { return log(auth.encode_password(pass, 'zkmm', '\\x00\\x00\\x00\\x00\\xa5\\x13\\xed\\x18')); }; // should equal to F16B5C4EBE52641313403CB93C0FF569 ```
test_encode_password2 = -> log auth.encode_password(pass,'zkmm','\\x00\\x00\\x00\\x00\\xa5\\x13\\xed\\x18') # should equal to F16B5C4EBE52641313403CB93C0FF569
JavaScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
43
45
xhan/qqbot:tests/login.coffee:6:raw_corpus
raw_corpus
test_login_full = -> log "验证帐号..." auth.check_qq_verify qq , (result) -> # log "验证帐号:", result is_need_verify_code = int result[0] verify_code = result[1] bits = result[2] #TODO: login_next 异步破坏了代码的结构性,这块如何优化 if is_need_verify_code log "需要验证码...获取中....
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
47
71
xhan/qqbot:tests/login.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test_login_full = -> log "验证帐号..." auth.check_qq_verify qq , (result) -> # log "验证帐号:", result is_need_verify_code = int result[0] verify_code = result[1] bits = result[2] #TODO: login_next 异步破坏了代码的结构性,这块如何优化 ...
var test_login_full; test_login_full = function() { log("验证帐号..."); return auth.check_qq_verify(qq, function(result) { var bits, is_need_verify_code, new_pass, verify_code; // log "验证帐号:", result is_need_verify_code = int(result[0]); verify_code = result[1]; bits = result[2]; //TODO: login...
CoffeeScript
JavaScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
47
71
xhan/qqbot:tests/login.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test_login_full; test_login_full = function() { log("验证帐号..."); return auth.check_qq_verify(qq, function(result) { var bits, is_need_verify_code, new_pass, verify_code; // log "验证帐号:", result is_need_verify_code = int(result[0]); verify_cod...
test_login_full = -> log "验证帐号..." auth.check_qq_verify qq , (result) -> # log "验证帐号:", result is_need_verify_code = int result[0] verify_code = result[1] bits = result[2] #TODO: login_next 异步破坏了代码的结构性,这块如何优化 if is_need_verify_code log "需要验证码...获取中....
JavaScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
47
71
xhan/qqbot:tests/login.coffee:6:completion
completion
test_login_full = -> log "验证帐号..." auth.check_qq_verify qq , (result) -> # log "验证帐号:", result is_need_verify_code = int result[0] verify_code = result[1] bits = result[2] #TODO: login_next 异步破坏了代码的结构性,这块如何优化 if is_need_verify_code log "需要验证码...获取中....
auth.get_verify_code qq, config.host, config.port, (error) -> require('child_process').exec 'open tmp' log "http://#{config.host}:#{config.port}" prompt "输入验证码:" , (code) -> auth.finish_verify_code() verify_code = code ...
CoffeeScript
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
47
71
xhan/qqbot:tests/login.coffee:7:raw_corpus
raw_corpus
login_next = (qq , encoded_pass , verify_code)-> log "开始登录1 密码校验" auth.login_step1 qq, encoded_pass , verify_code , (ret)-> log '登录结果' log ret return unless ret[2].match /^http/ log "开始登录2 cookie获取" auth.login_step2 ret[2] , (ret) -> log "开始登录3 token 获取" ...
CoffeeScript
xhan/qqbot
tests/login.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/tests/login.coffee
73
99