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
octoblu/meshblu:lib/logError.coffee:1:completion
completion
_ = require 'lodash' class LogError constructor: -> if process.env.AIRBRAKE_KEY @airbrake = require('airbrake').createClient process.env.AIRBRAKE_KEY
log: (error) => @airbrake?.notify error console.error.apply console, arguments console.error error.stack if _.isError error logError = new LogError() module.exports = logError.log
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/logError.coffee
MIT
1b93806a9321e5dda42d3d937968cab3d88ac39e
815
https://github.com/octoblu/meshblu/blob/1b93806a9321e5dda42d3d937968cab3d88ac39e/lib/logError.coffee
1
14
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:1:raw_corpus
raw_corpus
should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, requestAsync} = app describe 'Usage#CURD', -> before prepare it 'should read a full list of usages', (done) -> options = method: 'GET' url: '/usages' qs: _sessi...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, requestAsync} = app describe 'Usage#CURD', -> before prepare it 'should read a full list of usages', (done) -> options = me...
var Promise, app, cleanup, limbo, prepare, requestAsync, should; should = require('should'); Promise = require('bluebird'); limbo = require('limbo'); app = require('../app'); ({prepare, cleanup, requestAsync} = app); describe('Usage#CURD', function() { before(prepare); it('should read a full list of usages', ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Promise, app, cleanup, limbo, prepare, requestAsync, should; should = require('should'); Promise = require('bluebird'); limbo = require('limbo'); app = require('../app'); ({prepare, cleanup, requestAsync} = app); describe('Usage#CURD', function() { befo...
should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, requestAsync} = app describe 'Usage#CURD', -> before prepare it 'should read a full list of usages', (done) -> options = method: 'GET' url: '/usages' qs: _sessi...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:1:completion
completion
should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, requestAsync} = app describe 'Usage#CURD', -> before prepare it 'should read a full list of usages', (done) -> options = method: 'GET' url: '/usages' qs: _sessi...
.spread (res) -> usages = res.body usages[0].type.should.eql 'userMessage' usages[1].type.should.eql 'inteMessage' usages[2].type.should.eql 'file' usages[3].type.should.eql 'call' usages.forEach (usage) -> usage.should.have.properties 'amount', 'maxAmount', 'team', 'type', 'month' ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
1
44
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:2:raw_corpus
raw_corpus
$file = Promise.resolve().then -> options = method: 'POST' url: '/messages' body: _sessionUserId: app.user1._id _roomId: app.room1._id attachments: [ category: 'file' data: "fileSize" : 86264, "fileCategory" ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
46
85
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $file = Promise.resolve().then -> options = method: 'POST' url: '/messages' body: _sessionUserId: app.user1._id _roomId: app.room1._id attachments: [ category: 'file' data: ...
var $file, $usages; $file = Promise.resolve().then(function() { var options; options = { method: 'POST', url: '/messages', body: { _sessionUserId: app.user1._id, _roomId: app.room1._id, attachments: [ { category: 'file', data: { "fileSize": 8626...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
46
85
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $file, $usages; $file = Promise.resolve().then(function() { var options; options = { method: 'POST', url: '/messages', body: { _sessionUserId: app.user1._id, _roomId: app.room1._id, attachments: [ { category:...
$file = Promise.resolve().then -> options = method: 'POST' url: '/messages' body: _sessionUserId: app.user1._id _roomId: app.room1._id attachments: [ category: 'file' data: "fileSize" : 86264, "fileCategory" ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
46
85
jianliaoim/talk-os:talk-api2x/test/controllers/usage.coffee:2:completion
completion
$file = Promise.resolve().then -> options = method: 'POST' url: '/messages' body: _sessionUserId: app.user1._id _roomId: app.room1._id attachments: [ category: 'file' data: "fileSize" : 86264, "fileCategory" ...
$usages = Promise.all [$message, $file] .delay(100).then -> options = method: 'GET' url: '/usages' qs: _sessionUserId: app.user1._id _teamId: app.team1._id requestAsync(options).spread (res) -> res.body .then (usages) -> usages[0].amount.should.eq...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/usage.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/usage.coffee
46
85
JoelBesada/activate-power-mode:lib/default-effect.coffee:1:raw_corpus
raw_corpus
random = require "lodash.random" module.exports = init: -> @reset() disable: -> @reset() reset: -> @particles = [] spawn: (position, colorGenerator, conf) -> @conf = conf numParticles = random @conf['spawnCount.min'], @conf['spawnCount.max'] while numParticles-- @particles.shi...
CoffeeScript
JoelBesada/activate-power-mode
lib/default-effect.coffee
MIT
ec6533da69865979a508a47436e2aedb4dab4f4c
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec6533da69865979a508a47436e2aedb4dab4f4c/lib/default-effect.coffee
1
50
JoelBesada/activate-power-mode:lib/default-effect.coffee:1:completion
completion
random = require "lodash.random" module.exports = init: -> @reset() disable: -> @reset() reset: -> @particles = [] spawn: (position, colorGenerator, conf) -> @conf = conf numParticles = random @conf['spawnCount.min'], @conf['spawnCount.max'] while numParticles-- @particles.shi...
size: random @conf['size.min'], @conf['size.max'], true velocity: x: -1 + Math.random() * 2 y: -3.5 + Math.random() * 2 animate: (context) -> return if not @particles.length gco = context.globalCompositeOperation context.globalCompositeOperation = "lighter" for i in [@particles.leng...
CoffeeScript
CoffeeScript
JoelBesada/activate-power-mode
lib/default-effect.coffee
MIT
ec6533da69865979a508a47436e2aedb4dab4f4c
3,570
https://github.com/JoelBesada/activate-power-mode/blob/ec6533da69865979a508a47436e2aedb4dab4f4c/lib/default-effect.coffee
1
50
jashkenas/coffeescript:test/package.coffee:1:raw_corpus
raw_corpus
return if window? or testingBrowser? {EventEmitter} = require 'events' {join} = require 'path' {cwd} = require 'process' {pathToFileURL} = require 'url' packageEntryPath = join cwd(), 'lib/coffeescript/index.js' packageEntryUrl = pathToFileURL packageEntryPath test "the coffeescript package ex...
CoffeeScript
jashkenas/coffeescript
test/package.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/package.coffee
1
27
jashkenas/coffeescript:test/package.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return if window? or testingBrowser? {EventEmitter} = require 'events' {join} = require 'path' {cwd} = require 'process' {pathToFileURL} = require 'url' packageEntryPath = join cwd(), 'lib/coffeescript/index.js' packageEntryUrl = pathToFil...
var EventEmitter, cwd, join, packageEntryPath, packageEntryUrl, pathToFileURL; if ((typeof window !== "undefined" && window !== null) || (typeof testingBrowser !== "undefined" && testingBrowser !== null)) { return; } ({EventEmitter} = require('events')); ({join} = require('path')); ({cwd} = require('process')); ...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/package.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/package.coffee
1
27
jashkenas/coffeescript:test/package.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EventEmitter, cwd, join, packageEntryPath, packageEntryUrl, pathToFileURL; if ((typeof window !== "undefined" && window !== null) || (typeof testingBrowser !== "undefined" && testingBrowser !== null)) { return; } ({EventEmitter} = require('events')); ({joi...
return if window? or testingBrowser? {EventEmitter} = require 'events' {join} = require 'path' {cwd} = require 'process' {pathToFileURL} = require 'url' packageEntryPath = join cwd(), 'lib/coffeescript/index.js' packageEntryUrl = pathToFileURL packageEntryPath test "the coffeescript package ex...
JavaScript
CoffeeScript
jashkenas/coffeescript
test/package.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/package.coffee
1
27
jashkenas/coffeescript:test/package.coffee:1:completion
completion
return if window? or testingBrowser? {EventEmitter} = require 'events' {join} = require 'path' {cwd} = require 'process' {pathToFileURL} = require 'url' packageEntryPath = join cwd(), 'lib/coffeescript/index.js' packageEntryUrl = pathToFileURL packageEntryPath test "the coffeescript package ex...
requiredPackage = require packageEntryPath requiredKeys = Object.keys requiredPackage importedPackage = await import(packageEntryUrl) importedKeys = new Set Object.keys(importedPackage) # In `command.coffee`, CoffeeScript extends a `new EventEmitter`; # we want to ignore these additional added keys. event...
CoffeeScript
CoffeeScript
jashkenas/coffeescript
test/package.coffee
MIT
817c39a13065a900725943c33a79252a69d779e2
16,577
https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/package.coffee
1
27
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:1:raw_corpus
raw_corpus
should = require 'should' request = require 'supertest' jwt = require 'jsonwebtoken' app = require '../../../server/server' util = require '../../util' describe 'Union#Github', -> before util.prepare it 'should redirect to github account page when visit redirect url', (done) -> request(app).get '/union/githu...
CoffeeScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
1
46
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should = require 'should' request = require 'supertest' jwt = require 'jsonwebtoken' app = require '../../../server/server' util = require '../../util' describe 'Union#Github', -> before util.prepare it 'should redirect to github account page when visit re...
var app, jwt, request, should, util; should = require('should'); request = require('supertest'); jwt = require('jsonwebtoken'); app = require('../../../server/server'); util = require('../../util'); describe('Union#Github', function() { before(util.prepare); it('should redirect to github account page when vis...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
1
46
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var app, jwt, request, should, util; should = require('should'); request = require('supertest'); jwt = require('jsonwebtoken'); app = require('../../../server/server'); util = require('../../util'); describe('Union#Github', function() { before(util.prepare)...
should = require 'should' request = require 'supertest' jwt = require 'jsonwebtoken' app = require '../../../server/server' util = require '../../util' describe 'Union#Github', -> before util.prepare it 'should redirect to github account page when visit redirect url', (done) -> request(app).get '/union/githu...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
1
46
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:1:completion
completion
should = require 'should' request = require 'supertest' jwt = require 'jsonwebtoken' app = require '../../../server/server' util = require '../../util' describe 'Union#Github', -> before util.prepare it 'should redirect to github account page when visit redirect url', (done) -> request(app).get '/union/githu...
util.request options, (err, res, user) -> user.should.have.properties 'name', 'refer', 'openId', 'accountToken', 'wasNew', 'showname' user.wasNew.should.eql true user.name.should.eql 'github 用户' user.showname.should.eql '简聊' user.openId.should.eql '1111111' {id, login} = jwt.decode u...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
1
46
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:2:raw_corpus
raw_corpus
it 'should bind to an exist github account by bindCode', (done) -> options = method: 'POST' url: '/union/forcebind/github' body: accountToken: util.user.accountToken bindCode: util.bindCode util.request options, (err, res, user) -> user.should.have.properties 'accountToke...
CoffeeScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
48
89
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should bind to an exist github account by bindCode', (done) -> options = method: 'POST' url: '/union/forcebind/github' body: accountToken: util.user.accountToken bindCode: util.bindCode util.request options, (err, res...
it('should bind to an exist github account by bindCode', function(done) { var options; options = { method: 'POST', url: '/union/forcebind/github', body: { accountToken: util.user.accountToken, bindCode: util.bindCode } }; return util.request(options, function(err, res, user) { us...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
48
89
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should bind to an exist github account by bindCode', function(done) { var options; options = { method: 'POST', url: '/union/forcebind/github', body: { accountToken: util.user.accountToken, bindCode: util.bindCode } }; return ...
it 'should bind to an exist github account by bindCode', (done) -> options = method: 'POST' url: '/union/forcebind/github' body: accountToken: util.user.accountToken bindCode: util.bindCode util.request options, (err, res, user) -> user.should.have.properties 'accountToke...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
48
89
jianliaoim/talk-os:talk-account/test/apis/unions/github.coffee:2:completion
completion
it 'should bind to an exist github account by bindCode', (done) -> options = method: 'POST' url: '/union/forcebind/github' body: accountToken: util.user.accountToken bindCode: util.bindCode util.request options, (err, res, user) -> user.should.have.properties 'accountToke...
it 'should bind github account again', (done) -> options = method: 'POST' url: '/union/bind/github' body: accountToken: util.user.accountToken code: 'xxx' util.request options, (err, res, user) -> user.should.have.properties 'refer', 'openId' done err it 'should ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-account/test/apis/unions/github.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/unions/github.coffee
48
89
mojotech/pioneer:test/unit/widget.coffee:1:raw_corpus
raw_corpus
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/widgets").call(ROOT) describe "widgets", -> describe "ro...
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/wi...
var ROOT, assert, promise, sinon; promise = require("bluebird"); sinon = require("sinon"); assert = require("assert"); ROOT = { driver: { wait: function() { return promise.resolve(); }, findElement: function() { return promise.resolve("fake element"); } } }; require("../../lib/envir...
CoffeeScript
JavaScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ROOT, assert, promise, sinon; promise = require("bluebird"); sinon = require("sinon"); assert = require("assert"); ROOT = { driver: { wait: function() { return promise.resolve(); }, findElement: function() { return promise.resolve(...
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/widgets").call(ROOT) describe "widgets", -> describe "ro...
JavaScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:completion
completion
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/widgets").call(ROOT) describe "widgets", -> describe "ro...
it "should persit when passed via an extend", -> assert.equal(this.ExtendWidget.root, "wow") describe "initialize should be overideable", -> beforeEach -> this.spy = sinon.spy() it "should work when defined as a constructor arg", -> new ROOT.Widget initialize: this.spy asser...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:2:raw_corpus
raw_corpus
it "should set the el property", -> ROOT.Widget.find(root: "body").then (widget) -> assert.notEqual(widget.el, undefined) it "should set attributes based on find args", -> ROOT.Widget.find(root: "body").then (widget) -> widget.root.should.eql("body")
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
51
58
mojotech/pioneer:test/unit/widget.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "should set the el property", -> ROOT.Widget.find(root: "body").then (widget) -> assert.notEqual(widget.el, undefined) it "should set attributes based on find args", -> ROOT.Widget.find(root: "body").then (widget) -> widget.roo...
it("should set the el property", function() { return ROOT.Widget.find({ root: "body" }).then(function(widget) { return assert.notEqual(widget.el, void 0); }); }); it("should set attributes based on find args", function() { return ROOT.Widget.find({ root: "body" }).then(function(widget) { retu...
CoffeeScript
JavaScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
51
58
mojotech/pioneer:test/unit/widget.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("should set the el property", function() { return ROOT.Widget.find({ root: "body" }).then(function(widget) { return assert.notEqual(widget.el, void 0); }); }); it("should set attributes based on find args", function() { return ROOT.Widget.find({...
it "should set the el property", -> ROOT.Widget.find(root: "body").then (widget) -> assert.notEqual(widget.el, undefined) it "should set attributes based on find args", -> ROOT.Widget.find(root: "body").then (widget) -> widget.root.should.eql("body")
JavaScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
51
58
mojotech/pioneer:test/unit/widget.coffee:2:completion
completion
it "should set the el property", -> ROOT.Widget.find(root: "body").then (widget) -> assert.notEqual(widget.el, undefined)
it "should set attributes based on find args", -> ROOT.Widget.find(root: "body").then (widget) -> widget.root.should.eql("body")
CoffeeScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
2d3ade85e18e3ea1dfff2545bad4142aa9c496e4
523
https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/widget.coffee
51
58
mojotech/pioneer:test/unit/widget.coffee:1:raw_corpus
raw_corpus
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/widgets").call(ROOT) describe "widgets", -> describe "ro...
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
8893d83821a43a751c37e44c703da32e4fd16fc6
523
https://github.com/mojotech/pioneer/blob/8893d83821a43a751c37e44c703da32e4fd16fc6/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/wi...
var ROOT, assert, promise, sinon; promise = require("bluebird"); sinon = require("sinon"); assert = require("assert"); ROOT = { driver: { wait: function() { return promise.resolve(); }, findElement: function() { return promise.resolve("fake element"); } } }; require("../../lib/envir...
CoffeeScript
JavaScript
mojotech/pioneer
test/unit/widget.coffee
MIT
8893d83821a43a751c37e44c703da32e4fd16fc6
523
https://github.com/mojotech/pioneer/blob/8893d83821a43a751c37e44c703da32e4fd16fc6/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ROOT, assert, promise, sinon; promise = require("bluebird"); sinon = require("sinon"); assert = require("assert"); ROOT = { driver: { wait: function() { return promise.resolve(); }, findElement: function() { return promise.resolve(...
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/widgets").call(ROOT) describe "widgets", -> describe "ro...
JavaScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
8893d83821a43a751c37e44c703da32e4fd16fc6
523
https://github.com/mojotech/pioneer/blob/8893d83821a43a751c37e44c703da32e4fd16fc6/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:completion
completion
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../lib/environment").call(ROOT) require("../../lib/support/widgets").call(ROOT) describe "widgets", -> describe "ro...
it "should persit when passed via an extend", -> assert.equal(this.ExtendWidget.root, "wow") describe "initialize should be overideable", -> beforeEach -> this.spy = sinon.spy() it "should work when defined as a constructor arg", -> new ROOT.Widget initialize: this.spy asser...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
8893d83821a43a751c37e44c703da32e4fd16fc6
523
https://github.com/mojotech/pioneer/blob/8893d83821a43a751c37e44c703da32e4fd16fc6/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:2:raw_corpus
raw_corpus
done() it "should set the el property", (done) -> ROOT.Widget.find(root: "body").then (widget) -> assert.notEqual(widget.el, undefined) done() it "should set attributes based on find args", (done) -> ROOT.Widget.find(root: "body").then (widget) -> widget.root.should.eql("bo...
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
8893d83821a43a751c37e44c703da32e4fd16fc6
523
https://github.com/mojotech/pioneer/blob/8893d83821a43a751c37e44c703da32e4fd16fc6/test/unit/widget.coffee
51
61
mojotech/pioneer:test/unit/widget.coffee:2:completion
completion
done() it "should set the el property", (done) -> ROOT.Widget.find(root: "body").then (widget) -> assert.notEqual(widget.el, undefined)
done() it "should set attributes based on find args", (done) -> ROOT.Widget.find(root: "body").then (widget) -> widget.root.should.eql("body") done()
CoffeeScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
8893d83821a43a751c37e44c703da32e4fd16fc6
523
https://github.com/mojotech/pioneer/blob/8893d83821a43a751c37e44c703da32e4fd16fc6/test/unit/widget.coffee
51
61
mojotech/pioneer:test/unit/widget.coffee:1:raw_corpus
raw_corpus
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "roo...
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../src/environment").call(ROOT) require("../../src/support/Wi...
var ROOT, assert, promise, sinon; promise = require("bluebird"); sinon = require("sinon"); assert = require("assert"); ROOT = { driver: { wait: function() { return promise.resolve(); }, findElement: function() { return promise.resolve("fake element"); } } }; require("../../src/envir...
CoffeeScript
JavaScript
mojotech/pioneer
test/unit/widget.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ROOT, assert, promise, sinon; promise = require("bluebird"); sinon = require("sinon"); assert = require("assert"); ROOT = { driver: { wait: function() { return promise.resolve(); }, findElement: function() { return promise.resolve(...
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "roo...
JavaScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:completion
completion
promise = require("bluebird") sinon = require("sinon") assert = require("assert") ROOT = driver: wait: -> promise.resolve() findElement: -> promise.resolve("fake element") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "roo...
it "should persit when passed via an extend", -> assert.equal(this.ExtendWidget.root, "wow") describe "initialize should be overideable", -> beforeEach -> this.spy = sinon.spy() it "should work when defined as a constructor arg", -> new ROOT.Widget initialize: this.spy asser...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
dafc9c890823c64cb225d53c575d3d6afba17055
523
https://github.com/mojotech/pioneer/blob/dafc9c890823c64cb225d53c575d3d6afba17055/test/unit/widget.coffee
1
50
mojotech/pioneer:test/unit/widget.coffee:1:raw_corpus
raw_corpus
ROOT = {} sinon = require("sinon") assert = require("assert") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "root should be overideable", -> before -> this.OptionWidget = new ROOT.Widget( root: "div" ) ...
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
f992b54745dbeac9b3a15d999e3d9b3849086186
523
https://github.com/mojotech/pioneer/blob/f992b54745dbeac9b3a15d999e3d9b3849086186/test/unit/widget.coffee
1
40
mojotech/pioneer:test/unit/widget.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ROOT = {} sinon = require("sinon") assert = require("assert") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "root should be overideable", -> before -> this.OptionWidg...
var ROOT, assert, sinon; ROOT = {}; sinon = require("sinon"); assert = require("assert"); require("../../src/environment").call(ROOT); require("../../src/support/Widget").call(ROOT); describe("widgets", function() { describe("root should be overideable", function() { before(function() { this.OptionWid...
CoffeeScript
JavaScript
mojotech/pioneer
test/unit/widget.coffee
MIT
f992b54745dbeac9b3a15d999e3d9b3849086186
523
https://github.com/mojotech/pioneer/blob/f992b54745dbeac9b3a15d999e3d9b3849086186/test/unit/widget.coffee
1
40
mojotech/pioneer:test/unit/widget.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ROOT, assert, sinon; ROOT = {}; sinon = require("sinon"); assert = require("assert"); require("../../src/environment").call(ROOT); require("../../src/support/Widget").call(ROOT); describe("widgets", function() { describe("root should be overideable", fu...
ROOT = {} sinon = require("sinon") assert = require("assert") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "root should be overideable", -> before -> this.OptionWidget = new ROOT.Widget( root: "div" ) ...
JavaScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
f992b54745dbeac9b3a15d999e3d9b3849086186
523
https://github.com/mojotech/pioneer/blob/f992b54745dbeac9b3a15d999e3d9b3849086186/test/unit/widget.coffee
1
40
mojotech/pioneer:test/unit/widget.coffee:1:completion
completion
ROOT = {} sinon = require("sinon") assert = require("assert") require("../../src/environment").call(ROOT) require("../../src/support/Widget").call(ROOT) describe "widgets", -> describe "root should be overideable", -> before -> this.OptionWidget = new ROOT.Widget( root: "div" ) ...
it "should persit when passed via an extend", -> assert.equal(this.ExtendWidget.root, "wow") describe "initialize should be overideable", -> beforeEach -> this.spy = sinon.spy() it "should work when defined as a constructor arg", -> new ROOT.Widget initialize: this.spy asser...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/unit/widget.coffee
MIT
f992b54745dbeac9b3a15d999e3d9b3849086186
523
https://github.com/mojotech/pioneer/blob/f992b54745dbeac9b3a15d999e3d9b3849086186/test/unit/widget.coffee
1
40
oozcitak/xmlbuilder-js:test/basic/escaping.coffee:1:raw_corpus
raw_corpus
suite 'Text Processing', -> test 'Escaping element value', -> eq( xml('root', { headless: true }) .ele('e', 'escaped <>\'"&\t\n').up() .ele('e', 'escaped <>\'"&\t\r\n').up() .ele('e', 'escaped <>\'"&\t\n\r').up() .ele('e') .att('a1', 'escaped <>\'"&\t\n') ...
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/escaping.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/escaping.coffee
1
27
oozcitak/xmlbuilder-js:test/basic/escaping.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Text Processing', -> test 'Escaping element value', -> eq( xml('root', { headless: true }) .ele('e', 'escaped <>\'"&\t\n').up() .ele('e', 'escaped <>\'"&\t\r\n').up() .ele('e', 'escaped <>\'"&\t\n\r').up() .ele('...
suite('Text Processing', function() { return test('Escaping element value', function() { return eq(xml('root', { headless: true }).ele('e', 'escaped <>\'"&\t\n').up().ele('e', 'escaped <>\'"&\t\r\n').up().ele('e', 'escaped <>\'"&\t\n\r').up().ele('e').att('a1', 'escaped <>\'"&\t\n').att('a2', 'escaped <...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/basic/escaping.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/escaping.coffee
1
27
oozcitak/xmlbuilder-js:test/basic/escaping.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Text Processing', function() { return test('Escaping element value', function() { return eq(xml('root', { headless: true }).ele('e', 'escaped <>\'"&\t\n').up().ele('e', 'escaped <>\'"&\t\r\n').up().ele('e', 'escaped <>\'"&\t\n\r').up().ele('e...
suite 'Text Processing', -> test 'Escaping element value', -> eq( xml('root', { headless: true }) .ele('e', 'escaped <>\'"&\t\n').up() .ele('e', 'escaped <>\'"&\t\r\n').up() .ele('e', 'escaped <>\'"&\t\n\r').up() .ele('e') .att('a1', 'escaped <>\'"&\t\n') ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/escaping.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/escaping.coffee
1
27
oozcitak/xmlbuilder-js:test/basic/escaping.coffee:1:completion
completion
suite 'Text Processing', -> test 'Escaping element value', -> eq( xml('root', { headless: true }) .ele('e', 'escaped <>\'"&\t\n').up() .ele('e', 'escaped <>\'"&\t\r\n').up() .ele('e', 'escaped <>\'"&\t\n\r').up() .ele('e') .att('a1', 'escaped <>\'"&\t\n') ...
.end() '<root>' + '<e>escaped &lt;&gt;\'"&amp;\t\n</e>' + '<e>escaped &lt;&gt;\'"&amp;\t&#xD;\n</e>' + '<e>escaped &lt;&gt;\'"&amp;\t\n&#xD;</e>' + '<e' + ' a1="escaped &lt;>\'&quot;&amp;&#x9;&#xA;"' + ' a2="escaped &lt;>\'&quot;&amp;&#x9;&#xD;"' + ' ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/escaping.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/escaping.coffee
1
27
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:raw_corpus
raw_corpus
eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", (err) -> expect(err).toBeUndefined() _setup_user = -> if logged_in A...
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
50
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", (err) -> expect(err).toBeUnde...
var eventually, setup; eventually = function(condition, cb) { var poll; return poll = setInterval(function() { if (condition()) { clearInterval(poll); return cb(); } }, 200); }; setup = function({logged_in, as_admin, other_admin}, cb) { var run_actual_test; run_actual_test = cb; return...
CoffeeScript
JavaScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
50
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var eventually, setup; eventually = function(condition, cb) { var poll; return poll = setInterval(function() { if (condition()) { clearInterval(poll); return cb(); } }, 200); }; setup = function({logged_in, as_admin, other_admin}, cb) { ...
eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", (err) -> expect(err).toBeUndefined() _setup_user = -> if logged_in A...
JavaScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
50
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:completion
completion
eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", (err) -> expect(err).toBeUndefined() _setup_user = -> if logged_in A...
Houston._call 'make_admin', Meteor.userId(), (err) -> expect(err).toBeUndefined() Meteor.logout (err) -> expect(err).toBeUndefined() _setup_user() else _setup_user() describe "Can't access Meteor unless logged in", -> it "should send to login page", (done) ->...
CoffeeScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
50
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:2:raw_corpus
raw_corpus
eventually url_changed, -> expect($('#become-houston-admin')[0]).not.toBeUndefined() done() it "tells you to go away if an admin exists", (done) -> setup {logged_in: true, as_admin: false, other_admin: true}, -> Houston._go "home" url_changed = -> window.location.pathnam...
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
51
63
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript eventually url_changed, -> expect($('#become-houston-admin')[0]).not.toBeUndefined() done() it "tells you to go away if an admin exists", (done) -> setup {logged_in: true, as_admin: false, other_admin: true}, -> Houston._g...
eventually(url_changed, function() { expect($('#become-houston-admin')[0]).not.toBeUndefined(); return done(); }); it("tells you to go away if an admin exists", function(done) { return setup({ logged_in: true, as_admin: false, other_admin: true }, function() { var url_changed; Houston._go("...
CoffeeScript
JavaScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
51
63
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript eventually(url_changed, function() { expect($('#become-houston-admin')[0]).not.toBeUndefined(); return done(); }); it("tells you to go away if an admin exists", function(done) { return setup({ logged_in: true, as_admin: false, other_admin: true ...
eventually url_changed, -> expect($('#become-houston-admin')[0]).not.toBeUndefined() done() it "tells you to go away if an admin exists", (done) -> setup {logged_in: true, as_admin: false, other_admin: true}, -> Houston._go "home" url_changed = -> window.location.pathnam...
JavaScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
51
63
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:2:completion
completion
eventually url_changed, -> expect($('#become-houston-admin')[0]).not.toBeUndefined() done() it "tells you to go away if an admin exists", (done) ->
setup {logged_in: true, as_admin: false, other_admin: true}, -> Houston._go "home" url_changed = -> window.location.pathname is "/admin/login" eventually url_changed, -> expect($('#become-houston-admin').length).toEqual(0) expect($('.form-heading').first().html()).toMatch(/Yo...
CoffeeScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
ac60668cf7fa6b37db36b6d44ec953312f3f83e7
802
https://github.com/gterrono/houston/blob/ac60668cf7fa6b37db36b6d44ec953312f3f83e7/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
51
63
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:raw_corpus
raw_corpus
eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", -> _setup_user = -> if logged_in userId = Accounts.createUser email: "yo...
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
e3f278b5bb2a5444cbe6643023228f280b68e682
802
https://github.com/gterrono/houston/blob/e3f278b5bb2a5444cbe6643023228f280b68e682/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
47
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", -> _setup_user = -> if ...
var eventually, setup; eventually = function(condition, cb) { var poll; return poll = setInterval(function() { if (condition()) { clearInterval(poll); return cb(); } }, 200); }; setup = function({logged_in, as_admin, other_admin}, cb) { var run_actual_test; run_actual_test = cb; return...
CoffeeScript
JavaScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
e3f278b5bb2a5444cbe6643023228f280b68e682
802
https://github.com/gterrono/houston/blob/e3f278b5bb2a5444cbe6643023228f280b68e682/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
47
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var eventually, setup; eventually = function(condition, cb) { var poll; return poll = setInterval(function() { if (condition()) { clearInterval(poll); return cb(); } }, 200); }; setup = function({logged_in, as_admin, other_admin}, cb) { ...
eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", -> _setup_user = -> if logged_in userId = Accounts.createUser email: "yo...
JavaScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
e3f278b5bb2a5444cbe6643023228f280b68e682
802
https://github.com/gterrono/houston/blob/e3f278b5bb2a5444cbe6643023228f280b68e682/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
47
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:completion
completion
eventually = (condition, cb) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) setup = ({logged_in, as_admin, other_admin}, cb) -> run_actual_test = cb Meteor.call "test/clear_users", -> _setup_user = -> if logged_in userId = Accounts.createUser email: "yo...
Meteor.logout -> _setup_user() else _setup_user() describe "Can't access Meteor unless logged in", -> it "should send to login page", (done) -> setup {logged_in: false, as_admin: false, other_admin: false}, -> Houston._go "home" url_changed = -> window.location.pathname is "/admin...
CoffeeScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
e3f278b5bb2a5444cbe6643023228f280b68e682
802
https://github.com/gterrono/houston/blob/e3f278b5bb2a5444cbe6643023228f280b68e682/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
47
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:raw_corpus
raw_corpus
eventually = (cb, condition) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) describe "Can't access Meteor unless you are logged in in CS", -> it "should send you to the login page if you aren't logged in and try to access the admin", (done) -> Houston._go "home" ...
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
4d12ee44effe1098268d3a2715611dd432723f38
802
https://github.com/gterrono/houston/blob/4d12ee44effe1098268d3a2715611dd432723f38/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
13
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript eventually = (cb, condition) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) describe "Can't access Meteor unless you are logged in in CS", -> it "should send you to the login page if you aren't logged in and try to a...
var eventually; eventually = function(cb, condition) { var poll; return poll = setInterval(function() { if (condition()) { clearInterval(poll); return cb(); } }, 200); }; describe("Can't access Meteor unless you are logged in in CS", function() { return it("should send you to the login pag...
CoffeeScript
JavaScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
4d12ee44effe1098268d3a2715611dd432723f38
802
https://github.com/gterrono/houston/blob/4d12ee44effe1098268d3a2715611dd432723f38/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
13
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var eventually; eventually = function(cb, condition) { var poll; return poll = setInterval(function() { if (condition()) { clearInterval(poll); return cb(); } }, 200); }; describe("Can't access Meteor unless you are logged in in CS", fun...
eventually = (cb, condition) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200) describe "Can't access Meteor unless you are logged in in CS", -> it "should send you to the login page if you aren't logged in and try to access the admin", (done) -> Houston._go "home" ...
JavaScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
4d12ee44effe1098268d3a2715611dd432723f38
802
https://github.com/gterrono/houston/blob/4d12ee44effe1098268d3a2715611dd432723f38/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
13
gterrono/houston:test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee:1:completion
completion
eventually = (cb, condition) -> poll = setInterval(-> if condition() clearInterval poll cb() , 200)
describe "Can't access Meteor unless you are logged in in CS", -> it "should send you to the login page if you aren't logged in and try to access the admin", (done) -> Houston._go "home" eventually done, -> window.location.pathname is "/admin/login"
CoffeeScript
CoffeeScript
gterrono/houston
test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
MIT
4d12ee44effe1098268d3a2715611dd432723f38
802
https://github.com/gterrono/houston/blob/4d12ee44effe1098268d3a2715611dd432723f38/test/test_app/tests/jasmine/client/integration/HoustonSpec.coffee
1
13
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' }, { label: 'Esper...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c7e8399bbcad1acd35f4da61d1f6d10a0e0530
800
https://github.com/Atraci/Atraci/blob/79c7e8399bbcad1acd35f4da61d1f6d10a0e0530/coffee/_menubar.coffee
13
62
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' }, { label: 'Esper...
{ label: 'Nederlands', lang: 'nl' }, { label: 'العربية', lang: 'ar' }, { label: '简体中文', lang: 'zh-CN' } ].forEach((item) -> label = item.label lang = item.lang menuItem = new gui.MenuItem( label: label type: 'checkbox' click: -> changeLang(this, lang) ) # select on the default one if ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c7e8399bbcad1acd35f4da61d1f6d10a0e0530
800
https://github.com/Atraci/Atraci/blob/79c7e8399bbcad1acd35f4da61d1f6d10a0e0530/coffee/_menubar.coffee
13
62
Atraci/Atraci:coffee/_menubar.coffee:2:raw_corpus
raw_corpus
label: 'Tools' submenu: new gui.Menu() ) debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() ) debugMenu.submenu.app...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c7e8399bbcad1acd35f4da61d1f6d10a0e0530
800
https://github.com/Atraci/Atraci/blob/79c7e8399bbcad1acd35f4da61d1f6d10a0e0530/coffee/_menubar.coffee
63
90
Atraci/Atraci:coffee/_menubar.coffee:2:completion
completion
label: 'Tools' submenu: new gui.Menu() ) debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache()
) debugMenu.submenu.append new gui.MenuItem( label: "Reset database" click: -> Playlists.clear -> History.clear -> win.reloadIgnoringCache() ) menu.append debugMenu # put menu back in win win.menu = menu
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c7e8399bbcad1acd35f4da61d1f6d10a0e0530
800
https://github.com/Atraci/Atraci/blob/79c7e8399bbcad1acd35f4da61d1f6d10a0e0530/coffee/_menubar.coffee
63
90
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' }, { label: 'Esper...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_menubar.coffee
9
58
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' }, { label: 'Esper...
{ label: 'Nederlands', lang: 'nl' }, { label: 'العربية', lang: 'ar' } ].forEach((item) -> label = item.label lang = item.lang menuItem = new gui.MenuItem( label: label type: 'checkbox' click: -> changeLang(this, lang) ) # select on the default one if item.default menuItem.checked = ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_menubar.coffee
9
58
Atraci/Atraci:coffee/_menubar.coffee:2:raw_corpus
raw_corpus
submenu: new gui.Menu() ) debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() ) debugMenu.submenu.append new gui.MenuIte...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_menubar.coffee
59
85
Atraci/Atraci:coffee/_menubar.coffee:2:completion
completion
submenu: new gui.Menu() ) debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache()
) debugMenu.submenu.append new gui.MenuItem( label: "Reset database" click: -> Playlists.clear -> History.clear -> win.reloadIgnoringCache() ) menu.append debugMenu # put menu back in win win.menu = menu
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_menubar.coffee
59
85
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' },...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
b01ae17d031396546365f443cb5212dd4c70692d
800
https://github.com/Atraci/Atraci/blob/b01ae17d031396546365f443cb5212dd4c70692d/coffee/_menubar.coffee
9
58
Atraci/Atraci:coffee/_menubar.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文'...
var changeLang, debugMenu; changeLang = function(menuItem, lang) { l10nMenu.submenu.items.forEach(function(eachSubMenu) { return eachSubMenu.checked = false; }); menuItem.checked = true; return window.l10n.changeLang(lang); }; [ { label: 'English', lang: 'en', default: true }, { labe...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
b01ae17d031396546365f443cb5212dd4c70692d
800
https://github.com/Atraci/Atraci/blob/b01ae17d031396546365f443cb5212dd4c70692d/coffee/_menubar.coffee
9
58
Atraci/Atraci:coffee/_menubar.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var changeLang, debugMenu; changeLang = function(menuItem, lang) { l10nMenu.submenu.items.forEach(function(eachSubMenu) { return eachSubMenu.checked = false; }); menuItem.checked = true; return window.l10n.changeLang(lang); }; [ { label: 'Englis...
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' },...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
b01ae17d031396546365f443cb5212dd4c70692d
800
https://github.com/Atraci/Atraci/blob/b01ae17d031396546365f443cb5212dd4c70692d/coffee/_menubar.coffee
9
58
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(lang) [ { label: 'English', lang: 'en', default: true }, { label: '繁體中文', lang: 'zh-TW' }, { label: 'עברית', lang: 'he-IL' },...
].forEach((item) -> label = item.label lang = item.lang menuItem = new gui.MenuItem( label: label type: 'checkbox' click: -> changeLang(this, lang) ) # select on the default one if item.default menuItem.checked = true l10nMenu.submenu.append menuItem ) menu.append l10n...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
b01ae17d031396546365f443cb5212dd4c70692d
800
https://github.com/Atraci/Atraci/blob/b01ae17d031396546365f443cb5212dd4c70692d/coffee/_menubar.coffee
9
58
Atraci/Atraci:coffee/_menubar.coffee:2:raw_corpus
raw_corpus
debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() ) debugMenu.submenu.append new gui.Me...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
b01ae17d031396546365f443cb5212dd4c70692d
800
https://github.com/Atraci/Atraci/blob/b01ae17d031396546365f443cb5212dd4c70692d/coffee/_menubar.coffee
59
82
Atraci/Atraci:coffee/_menubar.coffee:2:completion
completion
debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() )
debugMenu.submenu.append new gui.MenuItem( label: "Reset database" click: -> Playlists.clear -> History.clear -> win.reloadIgnoringCache() ) menu.append debugMenu # put menu back in win win.menu = menu
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
b01ae17d031396546365f443cb5212dd4c70692d
800
https://github.com/Atraci/Atraci/blob/b01ae17d031396546365f443cb5212dd4c70692d/coffee/_menubar.coffee
59
82
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Languages' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(l...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c2edf30a38f80026588fd57ca7b61f7c434991
800
https://github.com/Atraci/Atraci/blob/79c2edf30a38f80026588fd57ca7b61f7c434991/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Languages' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(l...
{ label: 'Afrikaans', lang: 'af-ZA' }, { label: 'Bosanci', lang: 'bs-BA' }, { label: 'Croatian', lang: 'hr-HR' }, { label: 'Serbian', lang: 'sr' } ].forEach((item) -> label = item.label lang = item.lang menuItem = new gui.MenuItem( label: label type: 'checkbox' click: -> ch...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c2edf30a38f80026588fd57ca7b61f7c434991
800
https://github.com/Atraci/Atraci/blob/79c2edf30a38f80026588fd57ca7b61f7c434991/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:2:raw_corpus
raw_corpus
debugMenu = new gui.MenuItem( label: 'Tools' submenu: new gui.Menu() ) debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" ...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c2edf30a38f80026588fd57ca7b61f7c434991
800
https://github.com/Atraci/Atraci/blob/79c2edf30a38f80026588fd57ca7b61f7c434991/coffee/_menubar.coffee
51
79
Atraci/Atraci:coffee/_menubar.coffee:2:completion
completion
debugMenu = new gui.MenuItem( label: 'Tools' submenu: new gui.Menu() ) debugMenu.submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" ...
win.reloadIgnoringCache() ) debugMenu.submenu.append new gui.MenuItem( label: "Reset database" click: -> Playlists.clear -> History.clear -> win.reloadIgnoringCache() ) menu.append debugMenu # put menu back in win win.menu = menu
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
79c2edf30a38f80026588fd57ca7b61f7c434991
800
https://github.com/Atraci/Atraci/blob/79c2edf30a38f80026588fd57ca7b61f7c434991/coffee/_menubar.coffee
51
79
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(la...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a6167cf57894329758d9d3c7b60247e6e04d42da
800
https://github.com/Atraci/Atraci/blob/a6167cf57894329758d9d3c7b60247e6e04d42da/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) ...
var changeLang, debugMenu, l10nMenu, menu; menu = new gui.Menu({ type: 'menubar' }); // Language menu l10nMenu = new gui.MenuItem({ label: 'Language', submenu: new gui.Menu() }); changeLang = function(menuItem, lang) { l10nMenu.submenu.items.forEach(function(eachSubMenu) { return eachSubMenu.checked = fa...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a6167cf57894329758d9d3c7b60247e6e04d42da
800
https://github.com/Atraci/Atraci/blob/a6167cf57894329758d9d3c7b60247e6e04d42da/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var changeLang, debugMenu, l10nMenu, menu; menu = new gui.Menu({ type: 'menubar' }); // Language menu l10nMenu = new gui.MenuItem({ label: 'Language', submenu: new gui.Menu() }); changeLang = function(menuItem, lang) { l10nMenu.submenu.items.forEach(func...
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(la...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a6167cf57894329758d9d3c7b60247e6e04d42da
800
https://github.com/Atraci/Atraci/blob/a6167cf57894329758d9d3c7b60247e6e04d42da/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(la...
].forEach((item) -> label = item.label lang = item.lang l10nMenu.submenu.append new gui.MenuItem( label: label type: 'checkbox' click: -> changeLang(this, lang) ) ) menu.append l10nMenu # Debug menu if isDebug debugMenu = new gui.MenuItem( label: 'Tools' submenu...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a6167cf57894329758d9d3c7b60247e6e04d42da
800
https://github.com/Atraci/Atraci/blob/a6167cf57894329758d9d3c7b60247e6e04d42da/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:2:raw_corpus
raw_corpus
debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() ) debugMenu.submenu.append new gui.MenuItem( label: "Reset database" click: -> Playlists.clear -> History.clear -> ...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a6167cf57894329758d9d3c7b60247e6e04d42da
800
https://github.com/Atraci/Atraci/blob/a6167cf57894329758d9d3c7b60247e6e04d42da/coffee/_menubar.coffee
51
68
Atraci/Atraci:coffee/_menubar.coffee:2:completion
completion
debugMenu.submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() ) debugMenu.submenu.append new gui.MenuItem( label: "Reset database" click: ->
Playlists.clear -> History.clear -> win.reloadIgnoringCache() ) menu.append debugMenu # put menu back in win win.menu = menu
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
a6167cf57894329758d9d3c7b60247e6e04d42da
800
https://github.com/Atraci/Atraci/blob/a6167cf57894329758d9d3c7b60247e6e04d42da/coffee/_menubar.coffee
51
68
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(la...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
f039c6aae2b92da7a3303e53efbb146ec3b59130
800
https://github.com/Atraci/Atraci/blob/f039c6aae2b92da7a3303e53efbb146ec3b59130/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) ...
var changeLang, debugMenu, l10nMenu, menu; menu = new gui.Menu({ type: 'menubar' }); // Language menu l10nMenu = new gui.MenuItem({ label: 'Language', submenu: new gui.Menu() }); changeLang = function(menuItem, lang) { l10nMenu.submenu.items.forEach(function(eachSubMenu) { return eachSubMenu.checked = fa...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
f039c6aae2b92da7a3303e53efbb146ec3b59130
800
https://github.com/Atraci/Atraci/blob/f039c6aae2b92da7a3303e53efbb146ec3b59130/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var changeLang, debugMenu, l10nMenu, menu; menu = new gui.Menu({ type: 'menubar' }); // Language menu l10nMenu = new gui.MenuItem({ label: 'Language', submenu: new gui.Menu() }); changeLang = function(menuItem, lang) { l10nMenu.submenu.items.forEach(func...
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(la...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
f039c6aae2b92da7a3303e53efbb146ec3b59130
800
https://github.com/Atraci/Atraci/blob/f039c6aae2b92da7a3303e53efbb146ec3b59130/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
menu = new gui.Menu(type: 'menubar') # Language menu l10nMenu = new gui.MenuItem( label: 'Language' submenu: new gui.Menu() ) changeLang = (menuItem, lang) -> l10nMenu.submenu.items.forEach((eachSubMenu) -> eachSubMenu.checked = false ) menuItem.checked = true window.l10n.changeLang(la...
].forEach((item) -> label = item.label lang = item.lang l10nMenu.submenu.append new gui.MenuItem( label: label type: 'checkbox' click: -> changeLang(this, lang) ) ) menu.append l10nMenu # Debug menu if isDebug debugMenu = new gui.MenuItem( label: 'Tools' submenu...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
f039c6aae2b92da7a3303e53efbb146ec3b59130
800
https://github.com/Atraci/Atraci/blob/f039c6aae2b92da7a3303e53efbb146ec3b59130/coffee/_menubar.coffee
1
50
Atraci/Atraci:coffee/_menubar.coffee:1:raw_corpus
raw_corpus
if isDebug menu = new gui.Menu(type: 'menubar') menu.append new gui.MenuItem( label: 'Tools' submenu: new gui.Menu() ) menu.items[0].submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) menu.items[0].submenu.appen...
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_menubar.coffee
1
29
Atraci/Atraci:coffee/_menubar.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if isDebug menu = new gui.Menu(type: 'menubar') menu.append new gui.MenuItem( label: 'Tools' submenu: new gui.Menu() ) menu.items[0].submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> ...
var menu; if (isDebug) { menu = new gui.Menu({ type: 'menubar' }); menu.append(new gui.MenuItem({ label: 'Tools', submenu: new gui.Menu() })); menu.items[0].submenu.append(new gui.MenuItem({ label: 'Developer Tools', click: function() { return win.showDevTools(); } })); menu...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_menubar.coffee
1
29
Atraci/Atraci:coffee/_menubar.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var menu; if (isDebug) { menu = new gui.Menu({ type: 'menubar' }); menu.append(new gui.MenuItem({ label: 'Tools', submenu: new gui.Menu() })); menu.items[0].submenu.append(new gui.MenuItem({ label: 'Developer Tools', click: function()...
if isDebug menu = new gui.Menu(type: 'menubar') menu.append new gui.MenuItem( label: 'Tools' submenu: new gui.Menu() ) menu.items[0].submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() ) menu.items[0].submenu.appen...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_menubar.coffee
1
29
Atraci/Atraci:coffee/_menubar.coffee:1:completion
completion
if isDebug menu = new gui.Menu(type: 'menubar') menu.append new gui.MenuItem( label: 'Tools' submenu: new gui.Menu() ) menu.items[0].submenu.append new gui.MenuItem( label: 'Developer Tools' click: -> win.showDevTools() )
menu.items[0].submenu.append new gui.MenuItem( label: "Reload ignoring cache" click: -> win.reloadIgnoringCache() ) menu.items[0].submenu.append new gui.MenuItem( label: "Reset database" click: -> Playlists.clear -> History.clear -> ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_menubar.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_menubar.coffee
1
29
jashkenas/coffeescript:test/support/abstract_syntax_tree_helpers.coffee:1:raw_corpus
raw_corpus
# Helpers to get AST nodes for a string of code. The root node is always a # `Block` node, so for brevity in the tests return its children from # `expressions`. getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes ast.expressions exports.getExpressionAst = (code) -> getAstExpressions(code)[0]
CoffeeScript
jashkenas/coffeescript
test/support/abstract_syntax_tree_helpers.coffee
MIT
4ba1be131c0cf368f807ebd485135f3505a3cbd3
16,577
https://github.com/jashkenas/coffeescript/blob/4ba1be131c0cf368f807ebd485135f3505a3cbd3/test/support/abstract_syntax_tree_helpers.coffee
1
8
jashkenas/coffeescript:test/support/abstract_syntax_tree_helpers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Helpers to get AST nodes for a string of code. The root node is always a # `Block` node, so for brevity in the tests return its children from # `expressions`. getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes ast.expressions exports.g...
// Helpers to get AST nodes for a string of code. The root node is always a // `Block` node, so for brevity in the tests return its children from // `expressions`. var getAstExpressions; getAstExpressions = function(code) { var ast; ast = CoffeeScript.compile(code, { ast: true }); return ast.expressions; }...
CoffeeScript
JavaScript
jashkenas/coffeescript
test/support/abstract_syntax_tree_helpers.coffee
MIT
4ba1be131c0cf368f807ebd485135f3505a3cbd3
16,577
https://github.com/jashkenas/coffeescript/blob/4ba1be131c0cf368f807ebd485135f3505a3cbd3/test/support/abstract_syntax_tree_helpers.coffee
1
8
jashkenas/coffeescript:test/support/abstract_syntax_tree_helpers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Helpers to get AST nodes for a string of code. The root node is always a // `Block` node, so for brevity in the tests return its children from // `expressions`. var getAstExpressions; getAstExpressions = function(code) { var ast; ast = CoffeeScript.compile(...
# Helpers to get AST nodes for a string of code. The root node is always a # `Block` node, so for brevity in the tests return its children from # `expressions`. getAstExpressions = (code) -> ast = CoffeeScript.compile code, ast: yes ast.expressions exports.getExpressionAst = (code) -> getAstExpressions(code)[0]
JavaScript
CoffeeScript
jashkenas/coffeescript
test/support/abstract_syntax_tree_helpers.coffee
MIT
4ba1be131c0cf368f807ebd485135f3505a3cbd3
16,577
https://github.com/jashkenas/coffeescript/blob/4ba1be131c0cf368f807ebd485135f3505a3cbd3/test/support/abstract_syntax_tree_helpers.coffee
1
8