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
outsideris/popularconvention:src/service.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { fetchGithubArchive: function(datetime, callback) { return (http.get(`http://data.githubarchive.org/${datetime}.json.gz`, function(res) { var fstream, gzip, unzip; gzip = zlib.createGunzip(); fstream = fs.createWriteStream(...
module.exports = fetchGithubArchive: (datetime, callback) -> (http.get "http://data.githubarchive.org/#{datetime}.json.gz", (res) -> gzip = zlib.createGunzip() fstream = fs.createWriteStream "#{archiveDir}/#{datetime}.json" unzip = res.pipe gzip unzip.pipe fstream unzip.on 'end', -...
JavaScript
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
ff72df2e3db01bf82dc753509a6418c17662cc4f
730
https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/service.coffee
24
73
outsideris/popularconvention:src/service.coffee:1:completion
completion
module.exports = fetchGithubArchive: (datetime, callback) -> (http.get "http://data.githubarchive.org/#{datetime}.json.gz", (res) -> gzip = zlib.createGunzip() fstream = fs.createWriteStream "#{archiveDir}/#{datetime}.json" unzip = res.pipe gzip unzip.pipe fstream unzip.on 'end', -...
file: datetime inProgress: false completed: false persistence.insertWorklogs doc, (-> callback()) if code is 0 callback(code) if code isnt 0 fs.unlink "#{archiveDir}/#{datetime}.json", (err) -> logger.error "delete #{archiveDir}/#{datetime}.j...
CoffeeScript
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
ff72df2e3db01bf82dc753509a6418c17662cc4f
730
https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/service.coffee
24
73
outsideris/popularconvention:src/service.coffee:2:raw_corpus
raw_corpus
cursor.batchSize(3000).each (err, item) -> if item? urls = timeline.getCommitUrls item urls.forEach (url) -> timeline.getCommitInfo url, (err, commit) -> if err? logger.error 'getCommitInfo: ', {err: err} els...
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
ff72df2e3db01bf82dc753509a6418c17662cc4f
730
https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/service.coffee
74
103
outsideris/popularconvention:src/service.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cursor.batchSize(3000).each (err, item) -> if item? urls = timeline.getCommitUrls item urls.forEach (url) -> timeline.getCommitInfo url, (err, commit) -> if err? logger....
cursor.batchSize(3000).each(function(err, item) { var urls; if (item != null) { urls = timeline.getCommitUrls(item); return urls.forEach(function(url) { return timeline.getCommitInfo(url, function(err, commit) { var conventions; if (err != null) { return logger.error('getComm...
CoffeeScript
JavaScript
outsideris/popularconvention
src/service.coffee
MIT
ff72df2e3db01bf82dc753509a6418c17662cc4f
730
https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/service.coffee
74
103
outsideris/popularconvention:src/service.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript cursor.batchSize(3000).each(function(err, item) { var urls; if (item != null) { urls = timeline.getCommitUrls(item); return urls.forEach(function(url) { return timeline.getCommitInfo(url, function(err, commit) { var conventions; if...
cursor.batchSize(3000).each (err, item) -> if item? urls = timeline.getCommitUrls item urls.forEach (url) -> timeline.getCommitInfo url, (err, commit) -> if err? logger.error 'getCommitInfo: ', {err: err} els...
JavaScript
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
ff72df2e3db01bf82dc753509a6418c17662cc4f
730
https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/service.coffee
74
103
outsideris/popularconvention:src/service.coffee:2:completion
completion
cursor.batchSize(3000).each (err, item) -> if item? urls = timeline.getCommitUrls item urls.forEach (url) -> timeline.getCommitInfo url, (err, commit) -> if err? logger.error 'getCommitInfo: ', {err: err} els...
sha: commit.sha persistence.insertConvention data, (err) -> logger.error 'insertConvention', {err: err} if err? logger.info 'insered convention' persistence.completeWorklog worklog._id, (err) -> if err? ...
CoffeeScript
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
ff72df2e3db01bf82dc753509a6418c17662cc4f
730
https://github.com/outsideris/popularconvention/blob/ff72df2e3db01bf82dc753509a6418c17662cc4f/src/service.coffee
74
103
outsideris/popularconvention:src/service.coffee:1:raw_corpus
raw_corpus
# # service layer # # Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> logger = (require './helpers').logger http = require 'http' fs = require 'fs' zlib = require 'zlib' spawn = require('child_process').spawn persist...
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
c6293139fe25458ab582f4a111381ce657ebc891
730
https://github.com/outsideris/popularconvention/blob/c6293139fe25458ab582f4a111381ce657ebc891/src/service.coffee
1
50
outsideris/popularconvention:src/service.coffee:1:completion
completion
# # service layer # # Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> logger = (require './helpers').logger http = require 'http' fs = require 'fs' zlib = require 'zlib' spawn = require('child_process').spawn persist...
fstream = fs.createWriteStream "#{archiveDir}/#{datetime}.json" unzip = res.pipe gzip unzip.pipe fstream unzip.on 'end', -> console.log "#{archiveDir}/#{datetime}.json" logger.info "downloaded #{datetime}.json" args = [ '--host', '127.0.0.1' '--port', '2701...
CoffeeScript
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
c6293139fe25458ab582f4a111381ce657ebc891
730
https://github.com/outsideris/popularconvention/blob/c6293139fe25458ab582f4a111381ce657ebc891/src/service.coffee
1
50
outsideris/popularconvention:src/service.coffee:2:raw_corpus
raw_corpus
callback(code) if code isnt 0 fs.unlink "#{archiveDir}/#{datetime}.json", (err) -> logger.error "delete #{archiveDir}/#{datetime}.json" if err ).on 'error', (e) -> logger.error 'fetch githubarchive: ', {err: e} progressTimeline: (callback) -> # timeline에서 데이터를 가져온다. # 데이터가 있으면...
CoffeeScript
outsideris/popularconvention
src/service.coffee
MIT
c6293139fe25458ab582f4a111381ce657ebc891
730
https://github.com/outsideris/popularconvention/blob/c6293139fe25458ab582f4a111381ce657ebc891/src/service.coffee
51
63
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:1:raw_corpus
raw_corpus
saveDataIfAuthorized = require '../../lib/saveDataIfAuthorized' _ = require 'lodash' describe 'saveDataIfAuthorized', -> describe 'when called with data', -> beforeEach -> @sut = saveDataIfAuthorized @toDevice = {uuid: 'to-device', sendWhitelist: ['from-device']} @getDevice = sinon.stub...
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
1
41
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript saveDataIfAuthorized = require '../../lib/saveDataIfAuthorized' _ = require 'lodash' describe 'saveDataIfAuthorized', -> describe 'when called with data', -> beforeEach -> @sut = saveDataIfAuthorized @toDevice = {uuid: 'to-device', sendWhi...
var _, saveDataIfAuthorized; saveDataIfAuthorized = require('../../lib/saveDataIfAuthorized'); _ = require('lodash'); describe('saveDataIfAuthorized', function() { return describe('when called with data', function() { beforeEach(function() { this.sut = saveDataIfAuthorized; this.toDevice = { ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
1
41
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _, saveDataIfAuthorized; saveDataIfAuthorized = require('../../lib/saveDataIfAuthorized'); _ = require('lodash'); describe('saveDataIfAuthorized', function() { return describe('when called with data', function() { beforeEach(function() { this.sut...
saveDataIfAuthorized = require '../../lib/saveDataIfAuthorized' _ = require 'lodash' describe 'saveDataIfAuthorized', -> describe 'when called with data', -> beforeEach -> @sut = saveDataIfAuthorized @toDevice = {uuid: 'to-device', sendWhitelist: ['from-device']} @getDevice = sinon.stub...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
1
41
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:1:completion
completion
saveDataIfAuthorized = require '../../lib/saveDataIfAuthorized' _ = require 'lodash' describe 'saveDataIfAuthorized', -> describe 'when called with data', -> beforeEach -> @sut = saveDataIfAuthorized @toDevice = {uuid: 'to-device', sendWhitelist: ['from-device']} @getDevice = sinon.stub...
@callback = sinon.spy() @sut @sendMessage, {uuid: 'from-device'}, 'to-device', {something: 'awful'}, @callback, @dependencies it 'should call canSend with the fromDevice, the toDevice and the query', -> expect(@canSend).to.have.been.calledWith {uuid: 'from-device'}, @toDevice, {something: 'awful'} ...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
1
41
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:2:raw_corpus
raw_corpus
it 'should yield an error', -> expect(@callback).to.have.been.called error = @callback.firstCall.args[0] expect(error).to.be.an.instanceOf Error expect(error.message).to.deep.equal 'Device does not have sufficient permissions to save data' describe 'when canSend yields true', -> ...
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
43
82
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should yield an error', -> expect(@callback).to.have.been.called error = @callback.firstCall.args[0] expect(error).to.be.an.instanceOf Error expect(error.message).to.deep.equal 'Device does not have sufficient permissions to s...
it('should yield an error', function() { var error; expect(this.callback).to.have.been.called; error = this.callback.firstCall.args[0]; expect(error).to.be.an.instanceOf(Error); return expect(error.message).to.deep.equal('Device does not have sufficient permissions to save data'); }); describe('when canSend ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
43
82
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should yield an error', function() { var error; expect(this.callback).to.have.been.called; error = this.callback.firstCall.args[0]; expect(error).to.be.an.instanceOf(Error); return expect(error.message).to.deep.equal('Device does not have sufficient p...
it 'should yield an error', -> expect(@callback).to.have.been.called error = @callback.firstCall.args[0] expect(error).to.be.an.instanceOf Error expect(error.message).to.deep.equal 'Device does not have sufficient permissions to save data' describe 'when canSend yields true', -> ...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
43
82
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:2:completion
completion
it 'should yield an error', -> expect(@callback).to.have.been.called error = @callback.firstCall.args[0] expect(error).to.be.an.instanceOf Error expect(error.message).to.deep.equal 'Device does not have sufficient permissions to save data' describe 'when canSend yields true', -> ...
describe 'when insert yields an error', -> beforeEach -> @dataDB.insert.yield new Error('device failed to update') it 'should call the callback with the error', -> expect(@callback).to.have.been.called error = @callback.firstCall.args[0] expect(error).to.be.an.i...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
43
82
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:3:raw_corpus
raw_corpus
error = @callback.firstCall.args[0] saved = @callback.firstCall.args[1] expect(error).not.to.be expect(saved).to.be.true
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
84
87
octoblu/meshblu:test/lib/saveDataIfAuthorized-spec.coffee:3:completion
completion
error = @callback.firstCall.args[0] saved = @callback.firstCall.args[1]
expect(error).not.to.be expect(saved).to.be.true
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/saveDataIfAuthorized-spec.coffee
MIT
e315719b325c77ceb0671572d93ad7edf7d08475
815
https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/test/lib/saveDataIfAuthorized-spec.coffee
84
87
jashkenas/coffeescript:test/helpers.coffee:1:raw_corpus
raw_corpus
# Helpers # ------- # pull the helpers from `CoffeeScript.helpers` into local variables {starts, ends, repeat, compact, count, merge, extend, flatten, del, baseFileName} = CoffeeScript.helpers # `starts` test "the `starts` helper tests if a string starts with another string", -> ok starts('01234', '012') ok...
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
1
39
jashkenas/coffeescript:test/helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Helpers # ------- # pull the helpers from `CoffeeScript.helpers` into local variables {starts, ends, repeat, compact, count, merge, extend, flatten, del, baseFileName} = CoffeeScript.helpers # `starts` test "the `starts` helper tests if a string starts with...
// Helpers // ------- // pull the helpers from `CoffeeScript.helpers` into local variables var baseFileName, compact, count, del, ends, extend, flatten, merge, repeat, starts; ({starts, ends, repeat, compact, count, merge, extend, flatten, del, baseFileName} = CoffeeScript.helpers); // `starts` test("the `starts` he...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
1
39
jashkenas/coffeescript:test/helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Helpers // ------- // pull the helpers from `CoffeeScript.helpers` into local variables var baseFileName, compact, count, del, ends, extend, flatten, merge, repeat, starts; ({starts, ends, repeat, compact, count, merge, extend, flatten, del, baseFileName} = Co...
# Helpers # ------- # pull the helpers from `CoffeeScript.helpers` into local variables {starts, ends, repeat, compact, count, merge, extend, flatten, del, baseFileName} = CoffeeScript.helpers # `starts` test "the `starts` helper tests if a string starts with another string", -> ok starts('01234', '012') ok...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
1
39
jashkenas/coffeescript:test/helpers.coffee:1:completion
completion
# Helpers # ------- # pull the helpers from `CoffeeScript.helpers` into local variables {starts, ends, repeat, compact, count, merge, extend, flatten, del, baseFileName} = CoffeeScript.helpers # `starts` test "the `starts` helper tests if a string starts with another string", -> ok starts('01234', '012') ok...
test "the `ends` helper tests if a string ends with another string", -> ok ends('01234', '234') ok not ends('01234', '012') test "the `ends` helper can take an optional offset", -> ok ends('01234', '012', 2) ok not ends('01234', '234', 6) # `repeat` test "the `repeat` helper concatenates a given num...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
1
39
jashkenas/coffeescript:test/helpers.coffee:2:raw_corpus
raw_corpus
test "the `compact` helper removes falsey values from an array, preserves truthy ones", -> allValues = [1, 0, false, obj={}, [], '', ' ', -1, null, undefined, true] truthyValues = [1, obj, [], ' ', -1, true] arrayEq truthyValues, compact(allValues) # `count` test "the `count` helper counts the number of occurr...
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
41
78
jashkenas/coffeescript:test/helpers.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test "the `compact` helper removes falsey values from an array, preserves truthy ones", -> allValues = [1, 0, false, obj={}, [], '', ' ', -1, null, undefined, true] truthyValues = [1, obj, [], ' ', -1, true] arrayEq truthyValues, compact(allValues) # `cou...
var hasProp = {}.hasOwnProperty; test("the `compact` helper removes falsey values from an array, preserves truthy ones", function() { var allValues, obj, truthyValues; allValues = [1, 0, false, obj = {}, [], '', ' ', -1, null, void 0, true]; truthyValues = [1, obj, [], ' ', -1, true]; return arrayEq(truthyValu...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
41
78
jashkenas/coffeescript:test/helpers.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hasProp = {}.hasOwnProperty; test("the `compact` helper removes falsey values from an array, preserves truthy ones", function() { var allValues, obj, truthyValues; allValues = [1, 0, false, obj = {}, [], '', ' ', -1, null, void 0, true]; truthyValues = [...
test "the `compact` helper removes falsey values from an array, preserves truthy ones", -> allValues = [1, 0, false, obj={}, [], '', ' ', -1, null, undefined, true] truthyValues = [1, obj, [], ' ', -1, true] arrayEq truthyValues, compact(allValues) # `count` test "the `count` helper counts the number of occurr...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
41
78
jashkenas/coffeescript:test/helpers.coffee:2:completion
completion
test "the `compact` helper removes falsey values from an array, preserves truthy ones", -> allValues = [1, 0, false, obj={}, [], '', ' ', -1, null, undefined, true] truthyValues = [1, obj, [], ' ', -1, true] arrayEq truthyValues, compact(allValues) # `count` test "the `count` helper counts the number of occurr...
test "the `merge` helper makes a new object with all properties of the objects given as its arguments", -> ary = [0, 1, 2, 3, 4] obj = {} merged = merge obj, ary ok merged isnt obj ok merged isnt ary for own key, val of ary eq val, merged[key] # `extend` test "the `extend` helper performs a shallow c...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
41
78
jashkenas/coffeescript:test/helpers.coffee:3:raw_corpus
raw_corpus
# `flatten` test "the `flatten` helper flattens an array", -> success = yes (success and= typeof n is 'number') for n in flatten [0, [[[1]], 2], 3, [4]] ok success # `del` test "the `del` helper deletes a property from an object and returns the deleted value", -> obj = [0, 1, 2] eq 1, del(obj, 1) ok 1 n...
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
81
120
jashkenas/coffeescript:test/helpers.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # `flatten` test "the `flatten` helper flattens an array", -> success = yes (success and= typeof n is 'number') for n in flatten [0, [[[1]], 2], 3, [4]] ok success # `del` test "the `del` helper deletes a property from an object and returns the deleted ...
// `flatten` test("the `flatten` helper flattens an array", function() { var i, len, n, ref, success; success = true; ref = flatten([0, [[[1]], 2], 3, [4]]); for (i = 0, len = ref.length; i < len; i++) { n = ref[i]; (success && (success = typeof n === 'number')); } return ok(success); }); // `del` ...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
81
120
jashkenas/coffeescript:test/helpers.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // `flatten` test("the `flatten` helper flattens an array", function() { var i, len, n, ref, success; success = true; ref = flatten([0, [[[1]], 2], 3, [4]]); for (i = 0, len = ref.length; i < len; i++) { n = ref[i]; (success && (success = typeof n =...
# `flatten` test "the `flatten` helper flattens an array", -> success = yes (success and= typeof n is 'number') for n in flatten [0, [[[1]], 2], 3, [4]] ok success # `del` test "the `del` helper deletes a property from an object and returns the deleted value", -> obj = [0, 1, 2] eq 1, del(obj, 1) ok 1 n...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
81
120
jashkenas/coffeescript:test/helpers.coffee:3:completion
completion
# `flatten` test "the `flatten` helper flattens an array", -> success = yes (success and= typeof n is 'number') for n in flatten [0, [[[1]], 2], 3, [4]] ok success # `del` test "the `del` helper deletes a property from an object and returns the deleted value", -> obj = [0, 1, 2] eq 1, del(obj, 1) ok 1 n...
sourceToCompiled = '.coffee': ext 'a.coffee': 'a' + ext 'b.coffee': 'b' + ext 'coffee.coffee': 'coffee' + ext '.litcoffee': ext 'a.litcoffee': 'a' + ext 'b.litcoffee': 'b' + ext 'coffee.litcoffee': 'coffee' + ext '.lit': ext 'a.lit': 'a' + ext 'b.lit': 'b' + ext 'coffee...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
81
120
jashkenas/coffeescript:test/helpers.coffee:4:raw_corpus
raw_corpus
for sourceFileName, expectedFileName of sourceToCompiled name = baseFileName sourceFileName, yes filename = name + ext eq filename, expectedFileName
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
122
125
jashkenas/coffeescript:test/helpers.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript for sourceFileName, expectedFileName of sourceToCompiled name = baseFileName sourceFileName, yes filename = name + ext eq filename, expectedFileName ```
var expectedFileName, filename, name, sourceFileName; for (sourceFileName in sourceToCompiled) { expectedFileName = sourceToCompiled[sourceFileName]; name = baseFileName(sourceFileName, true); filename = name + ext; eq(filename, expectedFileName); }
CoffeeScript
JavaScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
122
125
jashkenas/coffeescript:test/helpers.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var expectedFileName, filename, name, sourceFileName; for (sourceFileName in sourceToCompiled) { expectedFileName = sourceToCompiled[sourceFileName]; name = baseFileName(sourceFileName, true); filename = name + ext; eq(filename, expectedFileName); } ```
for sourceFileName, expectedFileName of sourceToCompiled name = baseFileName sourceFileName, yes filename = name + ext eq filename, expectedFileName
JavaScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
122
125
jashkenas/coffeescript:test/helpers.coffee:4:completion
completion
for sourceFileName, expectedFileName of sourceToCompiled name = baseFileName sourceFileName, yes
filename = name + ext eq filename, expectedFileName
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/helpers.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/helpers.coffee
122
125
Glavin001/atom-beautify:src/beautifiers/ocamlformat.coffee:1:raw_corpus
raw_corpus
### Requires https://github.com/ocaml-ppx/ocamlformat ### "use strict" Beautifier = require('./beautifier') module.exports = class OCamlFormat extends Beautifier name: "ocamlformat" link: "https://github.com/ocaml-ppx/ocamlformat" executables: [ { name: "ocamlformat" cmd: "ocamlformat" hom...
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/ocamlformat.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/ocamlformat.coffee
1
38
Glavin001/atom-beautify:src/beautifiers/ocamlformat.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### Requires https://github.com/ocaml-ppx/ocamlformat ### "use strict" Beautifier = require('./beautifier') module.exports = class OCamlFormat extends Beautifier name: "ocamlformat" link: "https://github.com/ocaml-ppx/ocamlformat" executables: [ { ...
/* Requires https://github.com/ocaml-ppx/ocamlformat */ "use strict"; var Beautifier, OCamlFormat; Beautifier = require('./beautifier'); module.exports = OCamlFormat = (function() { class OCamlFormat extends Beautifier { beautify(text, language, options) { return this.run("ocamlformat", [this.tempFile("in...
CoffeeScript
JavaScript
Glavin001/atom-beautify
src/beautifiers/ocamlformat.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/ocamlformat.coffee
1
38
Glavin001/atom-beautify:src/beautifiers/ocamlformat.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* Requires https://github.com/ocaml-ppx/ocamlformat */ "use strict"; var Beautifier, OCamlFormat; Beautifier = require('./beautifier'); module.exports = OCamlFormat = (function() { class OCamlFormat extends Beautifier { beautify(text, language, options) { ...
### Requires https://github.com/ocaml-ppx/ocamlformat ### "use strict" Beautifier = require('./beautifier') module.exports = class OCamlFormat extends Beautifier name: "ocamlformat" link: "https://github.com/ocaml-ppx/ocamlformat" executables: [ { name: "ocamlformat" cmd: "ocamlformat" hom...
JavaScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/ocamlformat.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/ocamlformat.coffee
1
38
Glavin001/atom-beautify:src/beautifiers/ocamlformat.coffee:1:completion
completion
### Requires https://github.com/ocaml-ppx/ocamlformat ### "use strict" Beautifier = require('./beautifier') module.exports = class OCamlFormat extends Beautifier name: "ocamlformat" link: "https://github.com/ocaml-ppx/ocamlformat" executables: [ { name: "ocamlformat" cmd: "ocamlformat" hom...
text.match(/(\d+\.\d+\.\d+)/)[1] catch text.match(/(\d+\.\d+)/)[1] + ".0" } } ] options: { OCaml: true } beautify: (text, language, options) -> @run("ocamlformat", [ @tempFile("input", text) ], { help: { link: "https://github.com/ocaml-ppx/...
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/ocamlformat.coffee
MIT
41d5051b399f7fe11efd149504a232df16179d60
1,503
https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/ocamlformat.coffee
1
38
jianliaoim/talk-os:talk-web/client/updater/favorite.coffee:1:raw_corpus
raw_corpus
Immutable = require 'immutable' # https://jianliao.com/doc/restful/favorite.read.html exports.read = (store, messagesList) -> _teamId = store.getIn(['device', '_teamId']) store.setIn ['favorites', _teamId], messagesList # https://jianliao.com/doc/restful/favorite.remove.html exports.remove = (store, messageData)...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/favorite.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/favorite.coffee
1
36
jianliaoim/talk-os:talk-web/client/updater/favorite.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Immutable = require 'immutable' # https://jianliao.com/doc/restful/favorite.read.html exports.read = (store, messagesList) -> _teamId = store.getIn(['device', '_teamId']) store.setIn ['favorites', _teamId], messagesList # https://jianliao.com/doc/restful/f...
var Immutable; Immutable = require('immutable'); // https://jianliao.com/doc/restful/favorite.read.html exports.read = function(store, messagesList) { var _teamId; _teamId = store.getIn(['device', '_teamId']); return store.setIn(['favorites', _teamId], messagesList); }; // https://jianliao.com/doc/restful/favo...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/favorite.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/favorite.coffee
1
36
jianliaoim/talk-os:talk-web/client/updater/favorite.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable; Immutable = require('immutable'); // https://jianliao.com/doc/restful/favorite.read.html exports.read = function(store, messagesList) { var _teamId; _teamId = store.getIn(['device', '_teamId']); return store.setIn(['favorites', _teamId], mess...
Immutable = require 'immutable' # https://jianliao.com/doc/restful/favorite.read.html exports.read = (store, messagesList) -> _teamId = store.getIn(['device', '_teamId']) store.setIn ['favorites', _teamId], messagesList # https://jianliao.com/doc/restful/favorite.remove.html exports.remove = (store, messageData)...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/favorite.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/favorite.coffee
1
36
jianliaoim/talk-os:talk-web/client/updater/favorite.coffee:1:completion
completion
Immutable = require 'immutable' # https://jianliao.com/doc/restful/favorite.read.html exports.read = (store, messagesList) -> _teamId = store.getIn(['device', '_teamId']) store.setIn ['favorites', _teamId], messagesList # https://jianliao.com/doc/restful/favorite.remove.html exports.remove = (store, messageData)...
else Immutable.List() .update 'favResults', (messages) -> if messages.some(inCollection) messages.filterNot inCollection else messages exports.create = (store, messageData) -> _teamId = messageData.get('_teamId') _messageId = messageData.get('_id') inCollection = (message) -> message.get('_id') i...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/favorite.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/favorite.coffee
1
36
jianliaoim/talk-os:talk-api2x/test/servers/rssspider.coffee:1:raw_corpus
raw_corpus
express = require 'express' module.exports = app = express() app.use '/', (req, res, next) -> res.end 'ok'
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/servers/rssspider.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/rssspider.coffee
1
5
jianliaoim/talk-os:talk-api2x/test/servers/rssspider.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript express = require 'express' module.exports = app = express() app.use '/', (req, res, next) -> res.end 'ok' ```
var app, express; express = require('express'); module.exports = app = express(); app.use('/', function(req, res, next) { return res.end('ok'); });
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/servers/rssspider.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/rssspider.coffee
1
5
jianliaoim/talk-os:talk-api2x/test/servers/rssspider.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var app, express; express = require('express'); module.exports = app = express(); app.use('/', function(req, res, next) { return res.end('ok'); }); ```
express = require 'express' module.exports = app = express() app.use '/', (req, res, next) -> res.end 'ok'
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/servers/rssspider.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/rssspider.coffee
1
5
jianliaoim/talk-os:talk-api2x/test/servers/rssspider.coffee:1:completion
completion
express = require 'express'
module.exports = app = express() app.use '/', (req, res, next) -> res.end 'ok'
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/servers/rssspider.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/rssspider.coffee
1
5
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:raw_corpus
raw_corpus
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = depend...
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
9175776af88e362e787df6cd1a3a3330969a963e
815
https://github.com/octoblu/meshblu/blob/9175776af88e362e787df6cd1a3a3330969a963e/lib/MeshbluSocketIOHandler.coffee
1
37
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ...
var MeshbluSocketIOHandler, SocketIOThrottler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); SocketIOThrottler = require('./SocketIOThrottler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { var ref, ref1; this.initialize = this.initialize....
CoffeeScript
JavaScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
9175776af88e362e787df6cd1a3a3330969a963e
815
https://github.com/octoblu/meshblu/blob/9175776af88e362e787df6cd1a3a3330969a963e/lib/MeshbluSocketIOHandler.coffee
1
37
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluSocketIOHandler, SocketIOThrottler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); SocketIOThrottler = require('./SocketIOThrottler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { ...
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = depend...
JavaScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
9175776af88e362e787df6cd1a3a3330969a963e
815
https://github.com/octoblu/meshblu/blob/9175776af88e362e787df6cd1a3a3330969a963e/lib/MeshbluSocketIOHandler.coffee
1
37
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:completion
completion
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = depend...
@log 'identity', error?, request: {uuid: data.uuid}, error: error?.message return callback [{message: error.message, status: 401}] if error? @authedDevice = data callback [null, {uuid: device.uuid}] onUpdate: (data, callback=->) => [query, params] = data @authDevice @authedDevice?.uuid, @au...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
9175776af88e362e787df6cd1a3a3330969a963e
815
https://github.com/octoblu/meshblu/blob/9175776af88e362e787df6cd1a3a3330969a963e/lib/MeshbluSocketIOHandler.coffee
1
37
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:raw_corpus
raw_corpus
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = depend...
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/lib/MeshbluSocketIOHandler.coffee
1
38
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ...
var MeshbluSocketIOHandler, SocketIOThrottler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); SocketIOThrottler = require('./SocketIOThrottler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { var ref, ref1; this.initialize = this.initialize....
CoffeeScript
JavaScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/lib/MeshbluSocketIOHandler.coffee
1
38
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluSocketIOHandler, SocketIOThrottler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); SocketIOThrottler = require('./SocketIOThrottler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { ...
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = depend...
JavaScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/lib/MeshbluSocketIOHandler.coffee
1
38
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:completion
completion
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> {@meshbluEventEmitter} = dependencies @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = depend...
return callback [{message: error.message, status: 401}] if error? @authedDevice = data callback [null, {uuid: device.uuid}] onUpdate: (data, callback=->) => [query, params] = data @authDevice @authedDevice?.uuid, @authedDevice?.token, (error, device) => return callback [{message: 'unauthori...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
8e4d8c8fd946501539719cb0b4dd234dd3611a14
815
https://github.com/octoblu/meshblu/blob/8e4d8c8fd946501539719cb0b4dd234dd3611a14/lib/MeshbluSocketIOHandler.coffee
1
38
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:raw_corpus
raw_corpus
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require './upda...
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
1599207147525affc7770157e02c4e6573ced932
815
https://github.com/octoblu/meshblu/blob/1599207147525affc7770157e02c4e6573ced932/lib/MeshbluSocketIOHandler.coffee
1
30
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAutho...
var MeshbluSocketIOHandler, SocketIOThrottler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); SocketIOThrottler = require('./SocketIOThrottler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { var ref, ref1; this.initialize = this.initialize....
CoffeeScript
JavaScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
1599207147525affc7770157e02c4e6573ced932
815
https://github.com/octoblu/meshblu/blob/1599207147525affc7770157e02c4e6573ced932/lib/MeshbluSocketIOHandler.coffee
1
30
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluSocketIOHandler, SocketIOThrottler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); SocketIOThrottler = require('./SocketIOThrottler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { ...
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require './upda...
JavaScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
1599207147525affc7770157e02c4e6573ced932
815
https://github.com/octoblu/meshblu/blob/1599207147525affc7770157e02c4e6573ced932/lib/MeshbluSocketIOHandler.coffee
1
30
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:completion
completion
debug = require('debug')('meshblu:meshblu-socket.io-handler') SocketIOThrottler = require './SocketIOThrottler' class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require './upda...
callback [null, {uuid: device.uuid}] @socket.on 'update', @throttler.throttle @onUpdate onUpdate: (data, callback=->) => [query, params] = data debug '@authedDevice', @authedDevice @authDevice @authedDevice?.uuid, @authedDevice?.token, (error, device) => return callback [{message: 'unauthorize...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
1599207147525affc7770157e02c4e6573ced932
815
https://github.com/octoblu/meshblu/blob/1599207147525affc7770157e02c4e6573ced932/lib/MeshbluSocketIOHandler.coffee
1
30
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:raw_corpus
raw_corpus
debug = require('debug')('meshblu:meshblu-socket.io-handler') class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require './updateIfAuthorized' initialize: (@socket) => @s...
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/lib/MeshbluSocketIOHandler.coffee
1
27
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript debug = require('debug')('meshblu:meshblu-socket.io-handler') class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require ...
var MeshbluSocketIOHandler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { var ref, ref1; this.initialize = this.initialize.bind(this); this.onUpdate = this.onUpdate.bind(this); this.authD...
CoffeeScript
JavaScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/lib/MeshbluSocketIOHandler.coffee
1
27
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluSocketIOHandler, debug; debug = require('debug')('meshblu:meshblu-socket.io-handler'); MeshbluSocketIOHandler = class MeshbluSocketIOHandler { constructor(dependencies = {}) { var ref, ref1; this.initialize = this.initialize.bind(this); t...
debug = require('debug')('meshblu:meshblu-socket.io-handler') class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require './updateIfAuthorized' initialize: (@socket) => @s...
JavaScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/lib/MeshbluSocketIOHandler.coffee
1
27
octoblu/meshblu:lib/MeshbluSocketIOHandler.coffee:1:completion
completion
debug = require('debug')('meshblu:meshblu-socket.io-handler') class MeshbluSocketIOHandler constructor: (dependencies={}) -> @authDevice = dependencies.authDevice ? require './authDevice' @updateIfAuthorized = dependencies.updateIfAuthorized ? require './updateIfAuthorized' initialize: (@socket) => @s...
@socket.on 'update', @onUpdate onUpdate: (data, callback=->) => [query, params] = data debug '@authedDevice', @authedDevice @authDevice @authedDevice?.uuid, @authedDevice?.token, (error, device) => return callback [{message: 'unauthorized', status: 403}] if error? @updateIfAuthorized device,...
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/MeshbluSocketIOHandler.coffee
MIT
e7620ff2bf1213df79058a1f75c749cbbc8bcc4b
815
https://github.com/octoblu/meshblu/blob/e7620ff2bf1213df79058a1f75c749cbbc8bcc4b/lib/MeshbluSocketIOHandler.coffee
1
27
nicolaskruchten/pivottable:gchart_renderers.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
gchart_renderers.coffee
MIT
8b612144a1b76edbe3eb6df1a420d4d589393c50
4,440
https://github.com/nicolaskruchten/pivottable/blob/8b612144a1b76edbe3eb6df1a420d4d589393c50/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript 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 brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
8b612144a1b76edbe3eb6df1a420d4d589393c50
4,440
https://github.com/nicolaskruchten/pivottable/blob/8b612144a1b76edbe3eb6df1a420d4d589393c50/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
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...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
8b612144a1b76edbe3eb6df1a420d4d589393c50
4,440
https://github.com/nicolaskruchten/pivottable/blob/8b612144a1b76edbe3eb6df1a420d4d589393c50/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.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...
colKeys.push [] if colKeys.length == 0 fullAggName = pivotData.aggregatorName if pivotData.valAttrs.length fullAggName += "(#{pivotData.valAttrs.join(", ")})" headers = (h.join("-") for h in rowKeys) headers.unshift "" numCharsInHAxis = 0 if chartType == "Sca...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
8b612144a1b76edbe3eb6df1a420d4d589393c50
4,440
https://github.com/nicolaskruchten/pivottable/blob/8b612144a1b76edbe3eb6df1a420d4d589393c50/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:2:raw_corpus
raw_corpus
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
8b612144a1b76edbe3eb6df1a420d4d589393c50
4,440
https://github.com/nicolaskruchten/pivottable/blob/8b612144a1b76edbe3eb6df1a420d4d589393c50/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:2:completion
completion
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
title += " #{opts.localeStrings.by} #{groupByTitle}" if groupByTitle != "" options = title: title hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50} vAxis: {title: vAxisTitle} tooltip: { textStyle: { fontName: 'Arial', fontSize: 12 } } if char...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
8b612144a1b76edbe3eb6df1a420d4d589393c50
4,440
https://github.com/nicolaskruchten/pivottable/blob/8b612144a1b76edbe3eb6df1a420d4d589393c50/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.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
gchart_renderers.coffee
MIT
c89b8b10edb3fc414502e4dfbd659cd6a339ae7a
4,440
https://github.com/nicolaskruchten/pivottable/blob/c89b8b10edb3fc414502e4dfbd659cd6a339ae7a/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript 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 brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
c89b8b10edb3fc414502e4dfbd659cd6a339ae7a
4,440
https://github.com/nicolaskruchten/pivottable/blob/c89b8b10edb3fc414502e4dfbd659cd6a339ae7a/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
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...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
c89b8b10edb3fc414502e4dfbd659cd6a339ae7a
4,440
https://github.com/nicolaskruchten/pivottable/blob/c89b8b10edb3fc414502e4dfbd659cd6a339ae7a/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.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...
colKeys.push [] if colKeys.length == 0 fullAggName = pivotData.aggregatorName if pivotData.valAttrs.length fullAggName += "(#{pivotData.valAttrs.join(", ")})" headers = (h.join("-") for h in rowKeys) headers.unshift "" numCharsInHAxis = 0 if chartType == "Sca...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
c89b8b10edb3fc414502e4dfbd659cd6a339ae7a
4,440
https://github.com/nicolaskruchten/pivottable/blob/c89b8b10edb3fc414502e4dfbd659cd6a339ae7a/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.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
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript 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 brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
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...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.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...
colKeys.push [] if colKeys.length == 0 fullAggName = pivotData.aggregatorName if pivotData.valAttrs.length fullAggName += "(#{pivotData.valAttrs.join(", ")})" headers = (h.join("-") for h in rowKeys) headers.unshift "" numCharsInHAxis = 0 if chartType == "Sca...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:2:raw_corpus
raw_corpus
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:2:completion
completion
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
title += " #{opts.localeStrings.by} #{groupByTitle}" if groupByTitle != "" options = width: opts.gchart.width() height: opts.gchart.height() title: title hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50} vAxis: {title: vAxisTitle} ...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:3:raw_corpus
raw_corpus
result.bind "dblclick", -> editor = new google.visualization.ChartEditor() google.visualization.events.addListener editor, 'ok', -> editor.getChartWrapper().draw(result[0]) editor.openDialog(wrapper) return result $.pivotUtilities.gchart_renderers = ...
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
101
113
nicolaskruchten/pivottable:gchart_renderers.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript result.bind "dblclick", -> editor = new google.visualization.ChartEditor() google.visualization.events.addListener editor, 'ok', -> editor.getChartWrapper().draw(result[0]) editor.openDialog(wrapper) ret...
result.bind("dblclick", function() { var editor; editor = new google.visualization.ChartEditor(); google.visualization.events.addListener(editor, 'ok', function() { return editor.getChartWrapper().draw(result[0]); }); return editor.openDialog(wrapper); }); return result; $.pivotUtilities.gchart_renderer...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
101
113
nicolaskruchten/pivottable:gchart_renderers.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript result.bind("dblclick", function() { var editor; editor = new google.visualization.ChartEditor(); google.visualization.events.addListener(editor, 'ok', function() { return editor.getChartWrapper().draw(result[0]); }); return editor.openDialog(wrapper)...
result.bind "dblclick", -> editor = new google.visualization.ChartEditor() google.visualization.events.addListener editor, 'ok', -> editor.getChartWrapper().draw(result[0]) editor.openDialog(wrapper) return result $.pivotUtilities.gchart_renderers = ...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
101
113
nicolaskruchten/pivottable:gchart_renderers.coffee:3:completion
completion
result.bind "dblclick", -> editor = new google.visualization.ChartEditor() google.visualization.events.addListener editor, 'ok', -> editor.getChartWrapper().draw(result[0]) editor.openDialog(wrapper) return result
$.pivotUtilities.gchart_renderers = "Line Chart": makeGoogleChart("LineChart") "Bar Chart": makeGoogleChart("ColumnChart") "Stacked Bar Chart": makeGoogleChart("ColumnChart", isStacked: true) "Area Chart": makeGoogleChart("AreaChart", isStacked: true) "Scatter Chart": makeGoogleC...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
34e7ec2081aa748769bcd19b0778c0b49a6be935
4,440
https://github.com/nicolaskruchten/pivottable/blob/34e7ec2081aa748769bcd19b0778c0b49a6be935/gchart_renderers.coffee
101
113
nicolaskruchten/pivottable:gchart_renderers.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
gchart_renderers.coffee
MIT
864d3da4a55fe1cd54769290f93afc0b5aea23dd
4,440
https://github.com/nicolaskruchten/pivottable/blob/864d3da4a55fe1cd54769290f93afc0b5aea23dd/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript 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 brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
864d3da4a55fe1cd54769290f93afc0b5aea23dd
4,440
https://github.com/nicolaskruchten/pivottable/blob/864d3da4a55fe1cd54769290f93afc0b5aea23dd/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
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...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
864d3da4a55fe1cd54769290f93afc0b5aea23dd
4,440
https://github.com/nicolaskruchten/pivottable/blob/864d3da4a55fe1cd54769290f93afc0b5aea23dd/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.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...
colKeys.push [] if colKeys.length == 0 fullAggName = pivotData.aggregatorName if pivotData.valAttrs.length fullAggName += "(#{pivotData.valAttrs.join(", ")})" headers = (h.join("-") for h in rowKeys) headers.unshift "" numCharsInHAxis = 0 if chartType == "Sca...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
864d3da4a55fe1cd54769290f93afc0b5aea23dd
4,440
https://github.com/nicolaskruchten/pivottable/blob/864d3da4a55fe1cd54769290f93afc0b5aea23dd/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:2:raw_corpus
raw_corpus
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
864d3da4a55fe1cd54769290f93afc0b5aea23dd
4,440
https://github.com/nicolaskruchten/pivottable/blob/864d3da4a55fe1cd54769290f93afc0b5aea23dd/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:2:completion
completion
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
title += " #{opts.localeStrings.by} #{groupByTitle}" if groupByTitle != "" options = width: opts.gchart.width() height: opts.gchart.height() title: title hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50} vAxis: {title: vAxisTitle} ...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
864d3da4a55fe1cd54769290f93afc0b5aea23dd
4,440
https://github.com/nicolaskruchten/pivottable/blob/864d3da4a55fe1cd54769290f93afc0b5aea23dd/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:2:raw_corpus
raw_corpus
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
53acdcd808c634d400bac95a0ee240d176a33689
4,440
https://github.com/nicolaskruchten/pivottable/blob/53acdcd808c634d400bac95a0ee240d176a33689/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:2:completion
completion
else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()? ...
hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50} vAxis: {title: vAxisTitle} tooltip: { textStyle: { fontName: 'Arial', fontSize: 12 } } if chartType == "ColumnChart" options.vAxis.minValue = 0 if chartType == "ScatterChart" options.legend = ...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
53acdcd808c634d400bac95a0ee240d176a33689
4,440
https://github.com/nicolaskruchten/pivottable/blob/53acdcd808c634d400bac95a0ee240d176a33689/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.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
gchart_renderers.coffee
MIT
b0112abdb12247e803f55b734c59d3f215a1cf0b
4,440
https://github.com/nicolaskruchten/pivottable/blob/b0112abdb12247e803f55b734c59d3f215a1cf0b/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript 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 brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
b0112abdb12247e803f55b734c59d3f215a1cf0b
4,440
https://github.com/nicolaskruchten/pivottable/blob/b0112abdb12247e803f55b734c59d3f215a1cf0b/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
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...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
b0112abdb12247e803f55b734c59d3f215a1cf0b
4,440
https://github.com/nicolaskruchten/pivottable/blob/b0112abdb12247e803f55b734c59d3f215a1cf0b/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.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...
colKeys.push [] if colKeys.length == 0 fullAggName = pivotData.aggregatorName if pivotData.valAttrs.length fullAggName += "(#{pivotData.valAttrs.join(", ")})" headers = (h.join("-") for h in rowKeys) headers.unshift "" numCharsInHAxis = 0 if chartType == "Sca...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
b0112abdb12247e803f55b734c59d3f215a1cf0b
4,440
https://github.com/nicolaskruchten/pivottable/blob/b0112abdb12247e803f55b734c59d3f215a1cf0b/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:2:raw_corpus
raw_corpus
title = "" else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()...
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
b0112abdb12247e803f55b734c59d3f215a1cf0b
4,440
https://github.com/nicolaskruchten/pivottable/blob/b0112abdb12247e803f55b734c59d3f215a1cf0b/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.coffee:2:completion
completion
title = "" else dataArray = [headers] for colKey in colKeys row = [colKey.join("-")] numCharsInHAxis += row[0].length for rowKey in rowKeys agg = pivotData.getAggregator(rowKey, colKey) if agg.value()...
hAxis: {title: hAxisTitle, slantedText: numCharsInHAxis > 50} vAxis: {title: vAxisTitle} tooltip: { textStyle: { fontName: 'Arial', fontSize: 12 } } if chartType == "ColumnChart" options.vAxis.minValue = 0 if chartType == "ScatterChart" options.legend = ...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
b0112abdb12247e803f55b734c59d3f215a1cf0b
4,440
https://github.com/nicolaskruchten/pivottable/blob/b0112abdb12247e803f55b734c59d3f215a1cf0b/gchart_renderers.coffee
51
100
nicolaskruchten/pivottable:gchart_renderers.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
gchart_renderers.coffee
MIT
74e39a747da80c005a9b85825c6e9b4da404d80e
4,440
https://github.com/nicolaskruchten/pivottable/blob/74e39a747da80c005a9b85825c6e9b4da404d80e/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript 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 brow...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery"], pivotModule); } else { // Plain br...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
74e39a747da80c005a9b85825c6e9b4da404d80e
4,440
https://github.com/nicolaskruchten/pivottable/blob/74e39a747da80c005a9b85825c6e9b4da404d80e/gchart_renderers.coffee
1
50
nicolaskruchten/pivottable:gchart_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery")); } else if (typeof define === "function" && define.amd) { // AMD return defi...
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...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
gchart_renderers.coffee
MIT
74e39a747da80c005a9b85825c6e9b4da404d80e
4,440
https://github.com/nicolaskruchten/pivottable/blob/74e39a747da80c005a9b85825c6e9b4da404d80e/gchart_renderers.coffee
1
50