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
meltingice/psd.js:lib/psd/init.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var RSVP, fs; fs = require('fs'); RSVP = require('rsvp'); module.exports = { extended: function(PSD) { this.fromFile = function(file) { return new PSD(fs.readFileSync(file)); }; return this.open = function(file) { return new RSVP.Promis...
fs = require 'fs' RSVP = require 'rsvp' module.exports = extended: (PSD) -> @fromFile = (file) -> new PSD(fs.readFileSync(file)) @open = (file) -> new RSVP.Promise (resolve, reject) -> fs.readFile file, (err, data) => return reject(err) if err psd = new PSD(data) ...
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/init.coffee
MIT
b43e5693bd81415b488df0b75206be5b660fa16d
2,846
https://github.com/meltingice/psd.js/blob/b43e5693bd81415b488df0b75206be5b660fa16d/lib/psd/init.coffee
1
14
meltingice/psd.js:lib/psd/init.coffee:1:completion
completion
fs = require 'fs' RSVP = require 'rsvp' module.exports = extended: (PSD) -> @fromFile = (file) -> new PSD(fs.readFileSync(file)) @open = (file) ->
new RSVP.Promise (resolve, reject) -> fs.readFile file, (err, data) => return reject(err) if err psd = new PSD(data) psd.parse() resolve(psd)
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/init.coffee
MIT
b43e5693bd81415b488df0b75206be5b660fa16d
2,846
https://github.com/meltingice/psd.js/blob/b43e5693bd81415b488df0b75206be5b660fa16d/lib/psd/init.coffee
1
14
meltingice/psd.js:lib/psd/init.coffee:1:raw_corpus
raw_corpus
fs = require 'fs' module.exports = extended: (PSD) -> @fromFile = (file) -> new PSD(fs.readFileSync(file)) @open = (file, cb) -> fs.readFile file, (err, data) => throw err if err? psd = new PSD(data) psd.parse() cb(psd)
CoffeeScript
meltingice/psd.js
lib/psd/init.coffee
MIT
b5828219c011770e6e21d98599cbb92541bb8c7e
2,846
https://github.com/meltingice/psd.js/blob/b5828219c011770e6e21d98599cbb92541bb8c7e/lib/psd/init.coffee
1
12
meltingice/psd.js:lib/psd/init.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require 'fs' module.exports = extended: (PSD) -> @fromFile = (file) -> new PSD(fs.readFileSync(file)) @open = (file, cb) -> fs.readFile file, (err, data) => throw err if err? psd = new PSD(data) psd.parse() c...
var fs; fs = require('fs'); module.exports = { extended: function(PSD) { this.fromFile = function(file) { return new PSD(fs.readFileSync(file)); }; return this.open = function(file, cb) { return fs.readFile(file, (err, data) => { var psd; if (err != null) { throw er...
CoffeeScript
JavaScript
meltingice/psd.js
lib/psd/init.coffee
MIT
b5828219c011770e6e21d98599cbb92541bb8c7e
2,846
https://github.com/meltingice/psd.js/blob/b5828219c011770e6e21d98599cbb92541bb8c7e/lib/psd/init.coffee
1
12
meltingice/psd.js:lib/psd/init.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var fs; fs = require('fs'); module.exports = { extended: function(PSD) { this.fromFile = function(file) { return new PSD(fs.readFileSync(file)); }; return this.open = function(file, cb) { return fs.readFile(file, (err, data) => { ...
fs = require 'fs' module.exports = extended: (PSD) -> @fromFile = (file) -> new PSD(fs.readFileSync(file)) @open = (file, cb) -> fs.readFile file, (err, data) => throw err if err? psd = new PSD(data) psd.parse() cb(psd)
JavaScript
CoffeeScript
meltingice/psd.js
lib/psd/init.coffee
MIT
b5828219c011770e6e21d98599cbb92541bb8c7e
2,846
https://github.com/meltingice/psd.js/blob/b5828219c011770e6e21d98599cbb92541bb8c7e/lib/psd/init.coffee
1
12
meltingice/psd.js:lib/psd/init.coffee:1:completion
completion
fs = require 'fs' module.exports = extended: (PSD) -> @fromFile = (file) -> new PSD(fs.readFileSync(file)) @open = (file, cb) ->
fs.readFile file, (err, data) => throw err if err? psd = new PSD(data) psd.parse() cb(psd)
CoffeeScript
CoffeeScript
meltingice/psd.js
lib/psd/init.coffee
MIT
b5828219c011770e6e21d98599cbb92541bb8c7e
2,846
https://github.com/meltingice/psd.js/blob/b5828219c011770e6e21d98599cbb92541bb8c7e/lib/psd/init.coffee
1
12
ichord/At.js:spec/coffeescripts/default_callbacks.spec.coffee:1:raw_corpus
raw_corpus
$inputor = null app = null describe "default callbacks", -> callbacks = null text = null beforeEach -> loadFixtures("inputors.html") $inputor = $("#inputor").atwho at: "@", data: fixtures["names"] app = getAppOf $inputor beforeEach -> text = $.trim $inputor.text() callbacks = $.fn.atwho....
CoffeeScript
ichord/At.js
spec/coffeescripts/default_callbacks.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/default_callbacks.spec.coffee
1
50
ichord/At.js:spec/coffeescripts/default_callbacks.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $inputor = null app = null describe "default callbacks", -> callbacks = null text = null beforeEach -> loadFixtures("inputors.html") $inputor = $("#inputor").atwho at: "@", data: fixtures["names"] app = getAppOf $inputor beforeEach -> ...
var $inputor, app; $inputor = null; app = null; describe("default callbacks", function() { var callbacks, text; callbacks = null; text = null; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", data: fixtures["names"] }); return app = ...
CoffeeScript
JavaScript
ichord/At.js
spec/coffeescripts/default_callbacks.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/default_callbacks.spec.coffee
1
50
ichord/At.js:spec/coffeescripts/default_callbacks.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $inputor, app; $inputor = null; app = null; describe("default callbacks", function() { var callbacks, text; callbacks = null; text = null; beforeEach(function() { loadFixtures("inputors.html"); $inputor = $("#inputor").atwho({ at: "@", ...
$inputor = null app = null describe "default callbacks", -> callbacks = null text = null beforeEach -> loadFixtures("inputors.html") $inputor = $("#inputor").atwho at: "@", data: fixtures["names"] app = getAppOf $inputor beforeEach -> text = $.trim $inputor.text() callbacks = $.fn.atwho....
JavaScript
CoffeeScript
ichord/At.js
spec/coffeescripts/default_callbacks.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/default_callbacks.spec.coffee
1
50
ichord/At.js:spec/coffeescripts/default_callbacks.spec.coffee:1:completion
completion
$inputor = null app = null describe "default callbacks", -> callbacks = null text = null beforeEach -> loadFixtures("inputors.html") $inputor = $("#inputor").atwho at: "@", data: fixtures["names"] app = getAppOf $inputor beforeEach -> text = $.trim $inputor.text() callbacks = $.fn.atwho....
expect(query).toBe("Jobs") it "can filter data", -> names = callbacks.before_save.call(app, fixtures["names"]) names = callbacks.filter.call(app, "jo", names, "name") expect(names).toContain name: "Joshua" it "request data from remote by ajax if set remote_filter", -> remote_call = jasmine.createS...
CoffeeScript
CoffeeScript
ichord/At.js
spec/coffeescripts/default_callbacks.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/default_callbacks.spec.coffee
1
50
ichord/At.js:spec/coffeescripts/default_callbacks.spec.coffee:2:raw_corpus
raw_corpus
names = callbacks.sorter.call(app, "", names, "name") expect(names[0]).toEqual({ name : 'Jacob' }) it "can eval temple", -> map = {name: "username", nick: "nick_name"} tpl = '<li data-value="${name}">${nick}</li>' html = '<li data-value="username">nick_name</li>' result = callbacks.tpl_eval.call...
CoffeeScript
ichord/At.js
spec/coffeescripts/default_callbacks.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/default_callbacks.spec.coffee
51
72
ichord/At.js:spec/coffeescripts/default_callbacks.spec.coffee:2:completion
completion
names = callbacks.sorter.call(app, "", names, "name") expect(names[0]).toEqual({ name : 'Jacob' }) it "can eval temple", -> map = {name: "username", nick: "nick_name"} tpl = '<li data-value="${name}">${nick}</li>' html = '<li data-value="username">nick_name</li>' result = callbacks.tpl_eval.call...
it "can highlight the query", -> html = '<li data-value="username">Ethan</li>' highlighted = callbacks.highlighter.call(app, html, "e") result = '<li data-value="username"> <strong>E</strong>than </li>' expect(highlighted).toBe(result) it "can insert the text which be choosed", -> spyOn(callbacks...
CoffeeScript
CoffeeScript
ichord/At.js
spec/coffeescripts/default_callbacks.spec.coffee
MIT
05e394acfa13937353bf03db2e478e55e245df71
5,250
https://github.com/ichord/At.js/blob/05e394acfa13937353bf03db2e478e55e245df71/spec/coffeescripts/default_callbacks.spec.coffee
51
72
jnordberg/wintersmith:lib/common.coffee:5:raw_corpus
raw_corpus
class cli extends winston.Transport name: 'cli' constructor: (options) -> super(options) @quiet = options.quiet or false log: (level, msg, meta, callback) -> if level == 'error' process.stderr.write "\n error".red + " #{ msg }\n" if @level == 'verbose' && meta?.stack stack = me...
CoffeeScript
jnordberg/wintersmith
lib/common.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/common.coffee
60
94
jnordberg/wintersmith:lib/common.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class cli extends winston.Transport name: 'cli' constructor: (options) -> super(options) @quiet = options.quiet or false log: (level, msg, meta, callback) -> if level == 'error' process.stderr.write "\n error".red + " #{ msg }\n" ...
var cli, transports; cli = (function() { class cli extends winston.Transport { constructor(options) { super(options); this.quiet = options.quiet || false; } log(level, msg, meta, callback) { var stack; if (level === 'error') { process.stderr.write("\n error".red + ` ${ms...
CoffeeScript
JavaScript
jnordberg/wintersmith
lib/common.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/common.coffee
60
94
jnordberg/wintersmith:lib/common.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var cli, transports; cli = (function() { class cli extends winston.Transport { constructor(options) { super(options); this.quiet = options.quiet || false; } log(level, msg, meta, callback) { var stack; if (level === 'error') ...
class cli extends winston.Transport name: 'cli' constructor: (options) -> super(options) @quiet = options.quiet or false log: (level, msg, meta, callback) -> if level == 'error' process.stderr.write "\n error".red + " #{ msg }\n" if @level == 'verbose' && meta?.stack stack = me...
JavaScript
CoffeeScript
jnordberg/wintersmith
lib/common.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/common.coffee
60
94
jnordberg/wintersmith:lib/common.coffee:5:completion
completion
class cli extends winston.Transport name: 'cli' constructor: (options) -> super(options) @quiet = options.quiet or false log: (level, msg, meta, callback) -> if level == 'error' process.stderr.write "\n error".red + " #{ msg }\n" if @level == 'verbose' && meta?.stack stack = me...
switch level when 'verbose' msg = msg.yellow if meta msg += util.format ' %j', meta if level != 'help' then msg = ' ' + msg # flatiron pads help messages :/ process.stdout.write msg + '\n' @emit 'logged' callback null, true transports = exports.transports = [ new...
CoffeeScript
CoffeeScript
jnordberg/wintersmith
lib/common.coffee
MIT
f01b0c9862c0cb38dbd62af492e2955581fd974e
3,484
https://github.com/jnordberg/wintersmith/blob/f01b0c9862c0cb38dbd62af492e2955581fd974e/lib/common.coffee
60
94
octoblu/meshblu:lib/createMessageIOEmitter.coffee:1:raw_corpus
raw_corpus
config = require '../config' redis = require './redis' MessageIOEmitter = require './messageIOEmitter' debug = require('debug')('meshblu:create-message-io-emitter') module.exports = (io) => messageIOEmitter = new MessageIOEmitter if config.redis?.host debug 'adding redis emitter' redisIoEmitter = require('...
CoffeeScript
octoblu/meshblu
lib/createMessageIOEmitter.coffee
MIT
9f0d16e1ef81885b49209576efb615dc89b21d52
815
https://github.com/octoblu/meshblu/blob/9f0d16e1ef81885b49209576efb615dc89b21d52/lib/createMessageIOEmitter.coffee
1
16
octoblu/meshblu:lib/createMessageIOEmitter.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript config = require '../config' redis = require './redis' MessageIOEmitter = require './messageIOEmitter' debug = require('debug')('meshblu:create-message-io-emitter') module.exports = (io) => messageIOEmitter = new MessageIOEmitter if config.redis?.host de...
var MessageIOEmitter, config, debug, redis; config = require('../config'); redis = require('./redis'); MessageIOEmitter = require('./messageIOEmitter'); debug = require('debug')('meshblu:create-message-io-emitter'); module.exports = (io) => { var messageIOEmitter, redisIoEmitter, ref; messageIOEmitter = new Me...
CoffeeScript
JavaScript
octoblu/meshblu
lib/createMessageIOEmitter.coffee
MIT
9f0d16e1ef81885b49209576efb615dc89b21d52
815
https://github.com/octoblu/meshblu/blob/9f0d16e1ef81885b49209576efb615dc89b21d52/lib/createMessageIOEmitter.coffee
1
16
octoblu/meshblu:lib/createMessageIOEmitter.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MessageIOEmitter, config, debug, redis; config = require('../config'); redis = require('./redis'); MessageIOEmitter = require('./messageIOEmitter'); debug = require('debug')('meshblu:create-message-io-emitter'); module.exports = (io) => { var messageIOEm...
config = require '../config' redis = require './redis' MessageIOEmitter = require './messageIOEmitter' debug = require('debug')('meshblu:create-message-io-emitter') module.exports = (io) => messageIOEmitter = new MessageIOEmitter if config.redis?.host debug 'adding redis emitter' redisIoEmitter = require('...
JavaScript
CoffeeScript
octoblu/meshblu
lib/createMessageIOEmitter.coffee
MIT
9f0d16e1ef81885b49209576efb615dc89b21d52
815
https://github.com/octoblu/meshblu/blob/9f0d16e1ef81885b49209576efb615dc89b21d52/lib/createMessageIOEmitter.coffee
1
16
octoblu/meshblu:lib/createMessageIOEmitter.coffee:1:completion
completion
config = require '../config' redis = require './redis' MessageIOEmitter = require './messageIOEmitter' debug = require('debug')('meshblu:create-message-io-emitter') module.exports = (io) => messageIOEmitter = new MessageIOEmitter if config.redis?.host
debug 'adding redis emitter' redisIoEmitter = require('socket.io-emitter')(redis.client) messageIOEmitter.addEmitter redisIoEmitter else debug 'adding io emitter' messageIOEmitter.addEmitter io return messageIOEmitter.emit
CoffeeScript
CoffeeScript
octoblu/meshblu
lib/createMessageIOEmitter.coffee
MIT
9f0d16e1ef81885b49209576efb615dc89b21d52
815
https://github.com/octoblu/meshblu/blob/9f0d16e1ef81885b49209576efb615dc89b21d52/lib/createMessageIOEmitter.coffee
1
16
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licens...
/* * Copyright (c) 2016-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applica...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2016-2018 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/li...
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:completion
completion
### # Copyright (c) 2016-2018 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law ...
cyclotronServices.factory 'downloadService', ($http, $q, $localForage, $window, analyticsService, configService, logService) -> exports = { download: (name, format, data) -> # Post data to /export/data endpoint, get back a URL to the file # Then download the file $http....
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab
1,544
https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:raw_corpus
raw_corpus
### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law or ag...
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mi...
/* * Copyright (c) 2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/mit-license.php * * Unless required by applicable l...
CoffeeScript
JavaScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * Copyright (c) 2016 the original author or authors. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/license...
### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law or ag...
JavaScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee:1:completion
completion
### # Copyright (c) 2016 the original author or authors. # # Licensed under the MIT License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.opensource.org/licenses/mit-license.php # # Unless required by applicable law or ag...
cyclotronServices.factory 'downloadService', ($http, $q, $localForage, $window, analyticsService, configService, logService) -> exports = { download: (name, format, data) -> # Post data to /export/data endpoint, get back a URL to the file # Then download the file $http....
CoffeeScript
CoffeeScript
ExpediaGroup/cyclotron
cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
MIT
d9f6710d26e1473dc1dab805685dd5b572fead4a
1,544
https://github.com/ExpediaGroup/cyclotron/blob/d9f6710d26e1473dc1dab805685dd5b572fead4a/cyclotron-site/app/scripts/dashboards/services/services.downloadService.coffee
1
33
cdglabs/apparatus:src/Model/Link.coffee:1:raw_corpus
raw_corpus
Node = require "./Node" module.exports = Link = Node.createVariant label: "Link" setTarget: (@_target) -> target: -> # First, trace backwards from me to the link which originally established # the target. Keep track of the heads of each of the nodes along the way. headStack = [] cursor = this ...
CoffeeScript
cdglabs/apparatus
src/Model/Link.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Model/Link.coffee
1
29
cdglabs/apparatus:src/Model/Link.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Node = require "./Node" module.exports = Link = Node.createVariant label: "Link" setTarget: (@_target) -> target: -> # First, trace backwards from me to the link which originally established # the target. Keep track of the heads of each of the no...
var Link, Node; Node = require("./Node"); module.exports = Link = Node.createVariant({ label: "Link", setTarget: function(_target) { this._target = _target; }, target: function() { var cursor, head, headStack, i, len, nextCursor; // First, trace backwards from me to the link which originally estab...
CoffeeScript
JavaScript
cdglabs/apparatus
src/Model/Link.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Model/Link.coffee
1
29
cdglabs/apparatus:src/Model/Link.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Link, Node; Node = require("./Node"); module.exports = Link = Node.createVariant({ label: "Link", setTarget: function(_target) { this._target = _target; }, target: function() { var cursor, head, headStack, i, len, nextCursor; // First, tra...
Node = require "./Node" module.exports = Link = Node.createVariant label: "Link" setTarget: (@_target) -> target: -> # First, trace backwards from me to the link which originally established # the target. Keep track of the heads of each of the nodes along the way. headStack = [] cursor = this ...
JavaScript
CoffeeScript
cdglabs/apparatus
src/Model/Link.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Model/Link.coffee
1
29
cdglabs/apparatus:src/Model/Link.coffee:1:completion
completion
Node = require "./Node" module.exports = Link = Node.createVariant label: "Link" setTarget: (@_target) -> target: -> # First, trace backwards from me to the link which originally established # the target. Keep track of the heads of each of the nodes along the way. headStack = [] cursor = this ...
cursor = cursor.master() # Now, trace forwards from the original target to the target within my # variation. cursor = @_target for head in headStack nextCursor = cursor.findVariantWithHead(head) # What does it mean if nextCursor is not found? TODO: think about this # possibility. ...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/Model/Link.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Model/Link.coffee
1
29
js2coffee/js2coffee:lib/builder_base.coffee:1:raw_corpus
raw_corpus
### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (node) -> # [ @walk(node.left), node.operator, @wa...
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
efcbef748b968acefc5a74df97d769618ed6809f
2,082
https://github.com/js2coffee/js2coffee/blob/efcbef748b968acefc5a74df97d769618ed6809f/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (...
/* * BuilderBase: * Traverses a JavaScript AST. * * Provides an easy way to define visitors for each node type. Each visitor will * return an array of strings that the node is compiled into. * * class MyBuilder extends BuilderBase * BinaryExpression: (node) -> * [ @walk(node.left), node.opera...
CoffeeScript
JavaScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
efcbef748b968acefc5a74df97d769618ed6809f
2,082
https://github.com/js2coffee/js2coffee/blob/efcbef748b968acefc5a74df97d769618ed6809f/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * BuilderBase: * Traverses a JavaScript AST. * * Provides an easy way to define visitors for each node type. Each visitor will * return an array of strings that the node is compiled into. * * class MyBuilder extends BuilderBase * BinaryExpressi...
### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (node) -> # [ @walk(node.left), node.operator, @wa...
JavaScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
efcbef748b968acefc5a74df97d769618ed6809f
2,082
https://github.com/js2coffee/js2coffee/blob/efcbef748b968acefc5a74df97d769618ed6809f/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:1:completion
completion
### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (node) -> # [ @walk(node.left), node.operator, @wa...
class BuilderBase constructor: (@root, @options) -> @path = [] run: -> @walk(@root) walk: (node, type) => oldLength = @path.length @path.push(node) type = undefined if typeof type isnt 'string' type or= node.type @ctx = { path: @path, type: type, parent: @path[@path.length-2] } ...
CoffeeScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
efcbef748b968acefc5a74df97d769618ed6809f
2,082
https://github.com/js2coffee/js2coffee/blob/efcbef748b968acefc5a74df97d769618ed6809f/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:2:raw_corpus
raw_corpus
else out = @onUnknownNode(node, @ctx) @path.splice(oldLength) out module.exports = BuilderBase
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
efcbef748b968acefc5a74df97d769618ed6809f
2,082
https://github.com/js2coffee/js2coffee/blob/efcbef748b968acefc5a74df97d769618ed6809f/lib/builder_base.coffee
51
57
js2coffee/js2coffee:lib/builder_base.coffee:2:completion
completion
else out = @onUnknownNode(node, @ctx)
@path.splice(oldLength) out module.exports = BuilderBase
CoffeeScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
efcbef748b968acefc5a74df97d769618ed6809f
2,082
https://github.com/js2coffee/js2coffee/blob/efcbef748b968acefc5a74df97d769618ed6809f/lib/builder_base.coffee
51
57
js2coffee/js2coffee:lib/builder_base.coffee:1:raw_corpus
raw_corpus
### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (node) -> # [ @walk(node.left), node.operator, @wa...
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (...
/* * BuilderBase: * Traverses a JavaScript AST. * * Provides an easy way to define visitors for each node type. Each visitor will * return an array of strings that the node is compiled into. * * class MyBuilder extends BuilderBase * BinaryExpression: (node) -> * [ @walk(node.left), node.opera...
CoffeeScript
JavaScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* * BuilderBase: * Traverses a JavaScript AST. * * Provides an easy way to define visitors for each node type. Each visitor will * return an array of strings that the node is compiled into. * * class MyBuilder extends BuilderBase * BinaryExpressi...
### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (node) -> # [ @walk(node.left), node.operator, @wa...
JavaScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:1:completion
completion
### # BuilderBase: # Traverses a JavaScript AST. # # Provides an easy way to define visitors for each node type. Each visitor will # return an array of strings that the node is compiled into. # # class MyBuilder extends BuilderBase # BinaryExpression: (node) -> # [ @walk(node.left), node.operator, @wa...
class BuilderBase constructor: (@root, @options) -> @path = [] run: -> @walk(@root) walk: (node, type) => oldLength = @path.length @path.push(node) type = undefined if typeof type isnt 'string' if !node console.log "OHSTAP" console.log @path type or= node.type @ctx =...
CoffeeScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
1
50
js2coffee/js2coffee:lib/builder_base.coffee:2:raw_corpus
raw_corpus
if fn out = fn.call(this, node, @ctx) out = @decorator(node, out) if @decorator? else out = @onUnknownNode(node, @ctx) @path.splice(oldLength) out module.exports = BuilderBase
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
51
60
js2coffee/js2coffee:lib/builder_base.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if fn out = fn.call(this, node, @ctx) out = @decorator(node, out) if @decorator? else out = @onUnknownNode(node, @ctx) @path.splice(oldLength) out module.exports = BuilderBase ```
var out; if (fn) { out = fn.call(this, node, this.ctx); if (this.decorator != null) { out = this.decorator(node, out); } } else { out = this.onUnknownNode(node, this.ctx); } this.path.splice(oldLength); out; module.exports = BuilderBase;
CoffeeScript
JavaScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
51
60
js2coffee/js2coffee:lib/builder_base.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var out; if (fn) { out = fn.call(this, node, this.ctx); if (this.decorator != null) { out = this.decorator(node, out); } } else { out = this.onUnknownNode(node, this.ctx); } this.path.splice(oldLength); out; module.exports = BuilderBase; ```
if fn out = fn.call(this, node, @ctx) out = @decorator(node, out) if @decorator? else out = @onUnknownNode(node, @ctx) @path.splice(oldLength) out module.exports = BuilderBase
JavaScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
51
60
js2coffee/js2coffee:lib/builder_base.coffee:2:completion
completion
if fn out = fn.call(this, node, @ctx) out = @decorator(node, out) if @decorator? else out = @onUnknownNode(node, @ctx)
@path.splice(oldLength) out module.exports = BuilderBase
CoffeeScript
CoffeeScript
js2coffee/js2coffee
lib/builder_base.coffee
MIT
2a9b21b9808e0d622c0ac6928c6b02e488459282
2,082
https://github.com/js2coffee/js2coffee/blob/2a9b21b9808e0d622c0ac6928c6b02e488459282/lib/builder_base.coffee
51
60
oozcitak/xmlbuilder-js:test/basic/clone.coffee:1:raw_corpus
raw_corpus
xmloriginal = xml('test', { headless: true}) .att('att', 'val') .ele('nodes') .ele('node', '1').up() .ele('node', '2') .att('att2', 'val2') .root() xmlcloned = xmloriginal.root().clone() xmlcloned.ele('added', '3') newxml = xml('test2', { headless: true}).importDocument(xmlcloned) suite 'Clone:', ...
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/clone.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/clone.coffee
1
36
oozcitak/xmlbuilder-js:test/basic/clone.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript xmloriginal = xml('test', { headless: true}) .att('att', 'val') .ele('nodes') .ele('node', '1').up() .ele('node', '2') .att('att2', 'val2') .root() xmlcloned = xmloriginal.root().clone() xmlcloned.ele('added', '3') newxml = xml('test2', { hea...
var newxml, xmlcloned, xmloriginal; xmloriginal = xml('test', { headless: true }).att('att', 'val').ele('nodes').ele('node', '1').up().ele('node', '2').att('att2', 'val2').root(); xmlcloned = xmloriginal.root().clone(); xmlcloned.ele('added', '3'); newxml = xml('test2', { headless: true }).importDocument(xmlclo...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/basic/clone.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/clone.coffee
1
36
oozcitak/xmlbuilder-js:test/basic/clone.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var newxml, xmlcloned, xmloriginal; xmloriginal = xml('test', { headless: true }).att('att', 'val').ele('nodes').ele('node', '1').up().ele('node', '2').att('att2', 'val2').root(); xmlcloned = xmloriginal.root().clone(); xmlcloned.ele('added', '3'); newxml = x...
xmloriginal = xml('test', { headless: true}) .att('att', 'val') .ele('nodes') .ele('node', '1').up() .ele('node', '2') .att('att2', 'val2') .root() xmlcloned = xmloriginal.root().clone() xmlcloned.ele('added', '3') newxml = xml('test2', { headless: true}).importDocument(xmlcloned) suite 'Clone:', ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/clone.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/clone.coffee
1
36
oozcitak/xmlbuilder-js:test/basic/clone.coffee:1:completion
completion
xmloriginal = xml('test', { headless: true}) .att('att', 'val') .ele('nodes') .ele('node', '1').up() .ele('node', '2') .att('att2', 'val2') .root() xmlcloned = xmloriginal.root().clone() xmlcloned.ele('added', '3') newxml = xml('test2', { headless: true}).importDocument(xmlcloned) suite 'Clone:', ...
test 'Cloned should contain all nodes including added node', -> eq( newxml.end() '<test2><test att="val"><nodes><node>1</node><node att2="val2">2</node></nodes><added>3</added></test></test2>' ) test 'Clone each node type', -> org = xml('test', { headless: true}) .cdata('val1') .r...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/basic/clone.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/clone.coffee
1
36
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:raw_corpus
raw_corpus
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> beforeEach (done) -> @sut = new Publisher namespace: ...
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
398c56b5cc548bb75654e7e9072b88d5417bb18b
815
https://github.com/octoblu/meshblu/blob/398c56b5cc548bb75654e7e9072b88d5417bb18b/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> befo...
var Publisher, async, createClient; async = require('async'); Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', function() { describe...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
398c56b5cc548bb75654e7e9072b88d5417bb18b
815
https://github.com/octoblu/meshblu/blob/398c56b5cc548bb75654e7e9072b88d5417bb18b/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Publisher, async, createClient; async = require('async'); Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); ...
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> beforeEach (done) -> @sut = new Publisher namespace: ...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
398c56b5cc548bb75654e7e9072b88d5417bb18b
815
https://github.com/octoblu/meshblu/blob/398c56b5cc548bb75654e7e9072b88d5417bb18b/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:completion
completion
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> beforeEach (done) -> @sut = new Publisher namespace: ...
it 'should not publish into redis', -> expect(@onMessage).not.to.have.been.called it 'should have an error', -> expect(@error.message).to.equal 'Invalid message' describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' @redis.subscribe 'tes...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
398c56b5cc548bb75654e7e9072b88d5417bb18b
815
https://github.com/octoblu/meshblu/blob/398c56b5cc548bb75654e7e9072b88d5417bb18b/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:raw_corpus
raw_corpus
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> beforeEach (done) -> @sut = new Publisher namespace: ...
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
1
50
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> befo...
var Publisher, async, createClient; async = require('async'); Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', function() { describe...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
1
50
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Publisher, async, createClient; async = require('async'); Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); ...
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> beforeEach (done) -> @sut = new Publisher namespace: ...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
1
50
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:completion
completion
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called with undefined', -> beforeEach (done) -> @sut = new Publisher namespace: ...
describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' @redis.subscribe 'test:received:mah-uuid', done beforeEach (done) -> @redis.once 'message', (@channel,@message) => done() @sut.publish 'received', 'mah-uuid', bee_sting: 'hey, free honey!'...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
1
50
octoblu/meshblu:test/lib/Publisher-spec.coffee:2:raw_corpus
raw_corpus
it 'should publish into redis', -> expect(@message).to.exist expect(JSON.parse @message).to.deep.equal carnivorousPlant: 'Feed me, Seymour!' it 'should publish into the correct channel', -> expect(@channel).to.exist expect(@channel).to.deep.equal 'testy:sent:yer-id'
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
51
58
octoblu/meshblu:test/lib/Publisher-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should publish into redis', -> expect(@message).to.exist expect(JSON.parse @message).to.deep.equal carnivorousPlant: 'Feed me, Seymour!' it 'should publish into the correct channel', -> expect(@channel).to.exist expect(@...
it('should publish into redis', function() { expect(this.message).to.exist; return expect(JSON.parse(this.message)).to.deep.equal({ carnivorousPlant: 'Feed me, Seymour!' }); }); it('should publish into the correct channel', function() { expect(this.channel).to.exist; return expect(this.channel).to.deep.e...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
51
58
octoblu/meshblu:test/lib/Publisher-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should publish into redis', function() { expect(this.message).to.exist; return expect(JSON.parse(this.message)).to.deep.equal({ carnivorousPlant: 'Feed me, Seymour!' }); }); it('should publish into the correct channel', function() { expect(this.cha...
it 'should publish into redis', -> expect(@message).to.exist expect(JSON.parse @message).to.deep.equal carnivorousPlant: 'Feed me, Seymour!' it 'should publish into the correct channel', -> expect(@channel).to.exist expect(@channel).to.deep.equal 'testy:sent:yer-id'
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
51
58
octoblu/meshblu:test/lib/Publisher-spec.coffee:2:completion
completion
it 'should publish into redis', -> expect(@message).to.exist expect(JSON.parse @message).to.deep.equal carnivorousPlant: 'Feed me, Seymour!'
it 'should publish into the correct channel', -> expect(@channel).to.exist expect(@channel).to.deep.equal 'testy:sent:yer-id'
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
72cddd24e204d45824311c98318a4118e132281d
815
https://github.com/octoblu/meshblu/blob/72cddd24e204d45824311c98318a4118e132281d/test/lib/Publisher-spec.coffee
51
58
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:raw_corpus
raw_corpus
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' ...
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4
815
https://github.com/octoblu/meshblu/blob/3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4/test/lib/Publisher-spec.coffee
1
42
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -...
var Publisher, async, createClient; async = require('async'); Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', function() { describe...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4
815
https://github.com/octoblu/meshblu/blob/3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4/test/lib/Publisher-spec.coffee
1
42
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Publisher, async, createClient; async = require('async'); Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); ...
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' ...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4
815
https://github.com/octoblu/meshblu/blob/3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4/test/lib/Publisher-spec.coffee
1
42
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:completion
completion
async = require 'async' Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' ...
it 'should publish into the correct channel', -> expect(@channel).to.deep.equal 'test:received:mah-uuid' describe 'when called again', -> beforeEach (done) -> @sut = new Publisher namespace: 'testy' @redis.subscribe 'testy:sent:yer-id', done beforeEach (done) -> async.p...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4
815
https://github.com/octoblu/meshblu/blob/3125eaa47c56fb8b1e8e28f7d2acf75ddba5d3f4/test/lib/Publisher-spec.coffee
1
42
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:raw_corpus
raw_corpus
Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' @redis.subscribe 'test:r...
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Pub...
var Publisher, createClient; Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', function() { describe('when called', function() { ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Publisher, createClient; Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', func...
Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' @redis.subscribe 'test:r...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:completion
completion
Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher namespace: 'test' @redis.subscribe 'test:r...
it 'should publish into the correct channel', -> expect(@channel).to.deep.equal 'test:received:mah-uuid' describe 'when called again', -> beforeEach (done) -> @sut = new Publisher namespace: 'testy' @redis.subscribe 'testy:sent:yer-id', done beforeEach (done) -> @redis....
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
93182ad65c614a724122fe7f2b487af93e79ed0f
815
https://github.com/octoblu/meshblu/blob/93182ad65c614a724122fe7f2b487af93e79ed0f/test/lib/Publisher-spec.coffee
1
39
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:raw_corpus
raw_corpus
Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher uuid: 'mah-uuid', namespace: 'test' @redis...
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
32803658e5d5b6cdd2553cd353c4d589d36e5306
815
https://github.com/octoblu/meshblu/blob/32803658e5d5b6cdd2553cd353c4d589d36e5306/test/lib/Publisher-spec.coffee
1
37
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Pub...
var Publisher, createClient; Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', function() { describe('when called', function() { ...
CoffeeScript
JavaScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
32803658e5d5b6cdd2553cd353c4d589d36e5306
815
https://github.com/octoblu/meshblu/blob/32803658e5d5b6cdd2553cd353c4d589d36e5306/test/lib/Publisher-spec.coffee
1
37
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Publisher, createClient; Publisher = require('../../lib/Publisher'); ({createClient} = require('../../lib/redis')); describe('Publisher', function() { beforeEach(function() { return this.redis = createClient(); }); return describe('->publish', func...
Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher uuid: 'mah-uuid', namespace: 'test' @redis...
JavaScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
32803658e5d5b6cdd2553cd353c4d589d36e5306
815
https://github.com/octoblu/meshblu/blob/32803658e5d5b6cdd2553cd353c4d589d36e5306/test/lib/Publisher-spec.coffee
1
37
octoblu/meshblu:test/lib/Publisher-spec.coffee:1:completion
completion
Publisher = require '../../lib/Publisher' {createClient} = require '../../lib/redis' describe 'Publisher', -> beforeEach -> @redis = createClient() describe '->publish', -> describe 'when called', -> beforeEach (done) -> @sut = new Publisher uuid: 'mah-uuid', namespace: 'test' @redis...
expect(JSON.parse @message).to.deep.equal bee_sting: 'hey, free honey!' it 'should publish into the correct channel', -> expect(@channel).to.deep.equal 'test:mah-uuid' describe 'when called again', -> beforeEach (done) -> @sut = new Publisher uuid: 'yer-id', namespace: 'testy' ...
CoffeeScript
CoffeeScript
octoblu/meshblu
test/lib/Publisher-spec.coffee
MIT
32803658e5d5b6cdd2553cd353c4d589d36e5306
815
https://github.com/octoblu/meshblu/blob/32803658e5d5b6cdd2553cd353c4d589d36e5306/test/lib/Publisher-spec.coffee
1
37
jianliaoim/talk-os:talk-web/client/schema.coffee:1:raw_corpus
raw_corpus
Immutable = require 'immutable' defaultConfig = require '../config/default' loadingSentences = require './util/loading-sentences' exports.device = Immutable.fromJS _teamId: null disconnection: false # isTuned will be set to true when the scrollbar is # at the bottom of the message scroll timeline # this is ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/schema.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/schema.coffee
1
43
jianliaoim/talk-os:talk-web/client/schema.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Immutable = require 'immutable' defaultConfig = require '../config/default' loadingSentences = require './util/loading-sentences' exports.device = Immutable.fromJS _teamId: null disconnection: false # isTuned will be set to true when the scrollbar is # ...
var Immutable, defaultConfig, loadingSentences; Immutable = require('immutable'); defaultConfig = require('../config/default'); loadingSentences = require('./util/loading-sentences'); exports.device = Immutable.fromJS({ _teamId: null, disconnection: false, // isTuned will be set to true when the scrollbar is ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/schema.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/schema.coffee
1
43
jianliaoim/talk-os:talk-web/client/schema.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, defaultConfig, loadingSentences; Immutable = require('immutable'); defaultConfig = require('../config/default'); loadingSentences = require('./util/loading-sentences'); exports.device = Immutable.fromJS({ _teamId: null, disconnection: false, ...
Immutable = require 'immutable' defaultConfig = require '../config/default' loadingSentences = require './util/loading-sentences' exports.device = Immutable.fromJS _teamId: null disconnection: false # isTuned will be set to true when the scrollbar is # at the bottom of the message scroll timeline # this is ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/schema.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/schema.coffee
1
43
jianliaoim/talk-os:talk-web/client/schema.coffee:1:completion
completion
Immutable = require 'immutable' defaultConfig = require '../config/default' loadingSentences = require './util/loading-sentences' exports.device = Immutable.fromJS _teamId: null disconnection: false # isTuned will be set to true when the scrollbar is # at the bottom of the message scroll timeline # this is ...
exports.drafts = Immutable.fromJS post: {} # "#{_teamId}+#{_channelId}" => {title, text} draft: {} # "#{_teamId}+#{_channelId}" => string story: {} # _teamid snippet: {} # "#{_teamId}+#{_channelId}" => {title, text, codeType} activeMarkdown: true exports.settings = Immutable.fromJS isLoggedIn: false show...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/schema.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/schema.coffee
1
43
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:1:raw_corpus
raw_corpus
{getVimState, dispatch, TextData} = require './spec-helper' settings = require '../lib/settings' describe "Motion Scroll", -> [set, ensure, editor, editorElement, vimState] = [] lines = (n + " " + 'X'.repeat(10) for n in [0...100]).join("\n") text = new TextData(lines) beforeEach -> getVimState (state, _v...
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/motion-scroll-spec.coffee
1
41
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:1:completion
completion
{getVimState, dispatch, TextData} = require './spec-helper' settings = require '../lib/settings' describe "Motion Scroll", -> [set, ensure, editor, editorElement, vimState] = [] lines = (n + " " + 'X'.repeat(10) for n in [0...100]).join("\n") text = new TextData(lines) beforeEach -> getVimState (state, _v...
if editorElement.measureDimensions? # For Atom-v1.19 editorElement.measureDimensions() else # For Atom-v1.18 # [TODO] Remove when v.1.19 become stable atom.views.performDocumentPoll() editorElement.setScrollTop(40 * 10) set cursor: [42, 0] describe "the ctrl-u keybi...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/motion-scroll-spec.coffee
1
41
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:2:raw_corpus
raw_corpus
it "selects on linewise mode", -> ensure 'V ctrl-u', selectedText: text.getLines([32..42]) describe "the ctrl-b keybinding", -> it "moves screen up one page", -> ensure 'ctrl-b', scrollTop: 200 cursor: [22, 0] it "selects on visual mode", -> set cursor: [42, 1] ...
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/motion-scroll-spec.coffee
43
81
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:2:completion
completion
it "selects on linewise mode", -> ensure 'V ctrl-u', selectedText: text.getLines([32..42]) describe "the ctrl-b keybinding", -> it "moves screen up one page", -> ensure 'ctrl-b', scrollTop: 200 cursor: [22, 0] it "selects on visual mode", -> set cursor: [42, 1] ...
describe "the ctrl-d keybinding", -> it "moves the screen down by half screen size and keeps cursor onscreen", -> ensure 'ctrl-d', scrollTop: 500 cursor: [52, 0] it "selects on visual mode", -> set cursor: [42, 1] ensure 'v ctrl-d', selectedText: text.getLines([42..51]...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/motion-scroll-spec.coffee
43
81
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:3:raw_corpus
raw_corpus
it "selects on visual mode", -> set cursor: [42, 1] ensure 'v ctrl-f', selectedText: text.getLines([42..61]).slice(1) + "62" it "selects on linewise mode", -> ensure 'V ctrl-f', selectedText: text.getLines([42..62]) describe "ctrl-f, ctrl-b, ctrl-d, ctrl-u", -> beforeEach -...
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/motion-scroll-spec.coffee
83
111
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:3:completion
completion
it "selects on visual mode", -> set cursor: [42, 1] ensure 'v ctrl-f', selectedText: text.getLines([42..61]).slice(1) + "62" it "selects on linewise mode", -> ensure 'V ctrl-f', selectedText: text.getLines([42..62]) describe "ctrl-f, ctrl-b, ctrl-d, ctrl-u", -> beforeEach -...
it "go to row with keep column and respect cursor.goalColum", -> ensure 'ctrl-b', scrollTop: 200, cursor: [22, 10] ensure 'ctrl-f', scrollTop: 400, cursor: [42, 10] ensure 'ctrl-u', scrollTop: 300, cursor: [32, 10] ensure 'ctrl-d', scrollTop: 400, cursor: [42, 10] ensure '$', cursor: [42, ...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
8d6f93ae3e3c43c205d6b51aeee911525a7ded78
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/8d6f93ae3e3c43c205d6b51aeee911525a7ded78/spec/motion-scroll-spec.coffee
83
111
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:3:raw_corpus
raw_corpus
it "selects on visual mode", -> set cursor: [42, 1] ensure 'v ctrl-f', selectedText: text.getLines([42..61]).slice(1) + "62" it "selects on linewise mode", -> ensure 'V ctrl-f', selectedText: text.getLines([42..62]) describe "ctrl-f, ctrl-b, ctrl-d, ctrl-u", -> beforeEach -...
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
d882126ee4254bf564eb37b9f3a7cdd322482439
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/motion-scroll-spec.coffee
83
111
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:3:completion
completion
it "selects on visual mode", -> set cursor: [42, 1] ensure 'v ctrl-f', selectedText: text.getLines([42..61]).slice(1) + "62" it "selects on linewise mode", -> ensure 'V ctrl-f', selectedText: text.getLines([42..62]) describe "ctrl-f, ctrl-b, ctrl-d, ctrl-u", -> beforeEach -...
it "go to row with keep column and respect cursor.goalColum", -> ensure 'ctrl-b', scrollTop: 200, cursor: [22, 10] ensure 'ctrl-f', scrollTop: 400, cursor: [42, 10] ensure 'ctrl-u', scrollTop: 300, cursor: [32, 10] ensure 'ctrl-d', scrollTop: 400, cursor: [42, 10] ensure '$', cursor: [42, ...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
d882126ee4254bf564eb37b9f3a7cdd322482439
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/d882126ee4254bf564eb37b9f3a7cdd322482439/spec/motion-scroll-spec.coffee
83
111
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:1:raw_corpus
raw_corpus
{getVimState, dispatch, TextData} = require './spec-helper' settings = require '../lib/settings' describe "Motion Scroll", -> [set, ensure, keystroke, editor, editorElement, vimState] = [] lines = (n + " " + 'X'.repeat(10) for n in [0...100]).join("\n") text = new TextData(lines) beforeEach -> getVimState...
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
3d91feba5c1d9da1ea68dab348522ad539db69a7
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/3d91feba5c1d9da1ea68dab348522ad539db69a7/spec/motion-scroll-spec.coffee
1
41
t9md/atom-vim-mode-plus:spec/motion-scroll-spec.coffee:1:completion
completion
{getVimState, dispatch, TextData} = require './spec-helper' settings = require '../lib/settings' describe "Motion Scroll", -> [set, ensure, keystroke, editor, editorElement, vimState] = [] lines = (n + " " + 'X'.repeat(10) for n in [0...100]).join("\n") text = new TextData(lines) beforeEach -> getVimState...
if editorElement.measureDimensions? # For Atom-v1.19 editorElement.measureDimensions() else # For Atom-v1.18 # [TODO] Remove when v.1.19 become stable atom.views.performDocumentPoll() editorElement.setScrollTop(40 * 10) set cursor: [42, 0] describe "the ctrl-u keybi...
CoffeeScript
CoffeeScript
t9md/atom-vim-mode-plus
spec/motion-scroll-spec.coffee
MIT
3d91feba5c1d9da1ea68dab348522ad539db69a7
1,389
https://github.com/t9md/atom-vim-mode-plus/blob/3d91feba5c1d9da1ea68dab348522ad539db69a7/spec/motion-scroll-spec.coffee
1
41
jianliaoim/talk-os:talk-web/client/app/topic-details.coffee:1:raw_corpus
raw_corpus
React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' roomActions = require '../actions/room' TopicSettings ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/topic-details.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-details.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/topic-details.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe'...
var Immutable, Permission, PureRenderMixin, React, SwitchTabs, T, TopicConfigsClass, TopicConfigsPermission, TopicSettings, div, lang, mixinSubscribe, query, recorder, roomActions, tabs; React = require('react'); recorder = require('actions-recorder'); Immutable = require('immutable'); PureRenderMixin = require('re...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/topic-details.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-details.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/topic-details.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Immutable, Permission, PureRenderMixin, React, SwitchTabs, T, TopicConfigsClass, TopicConfigsPermission, TopicSettings, div, lang, mixinSubscribe, query, recorder, roomActions, tabs; React = require('react'); recorder = require('actions-recorder'); Immutable...
React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' roomActions = require '../actions/room' TopicSettings ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/topic-details.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-details.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/topic-details.coffee:1:completion
completion
React = require 'react' recorder = require 'actions-recorder' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' query = require '../query' lang = require '../locales/lang' mixinSubscribe = require '../mixin/subscribe' roomActions = require '../actions/room' TopicSettings ...
module.exports = React.createClass displayName: 'topic-details' mixins: [mixinSubscribe, PureRenderMixin] propTypes: topic: T.instanceOf(Immutable.Map) closeView: T.func.isRequired initialTab: T.oneOf(tabs) getInitialState: -> tab: @props.initialTab or tabs[0] onTabClick: (tab) -> ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/topic-details.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-details.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/topic-details.coffee:2:raw_corpus
raw_corpus
getText: lang.getText switch @state.tab when 'topic-configs' TopicConfigsPermission _teamId: @props.topic.get('_teamId') _creatorId: @props.topic.get('_creatorId') topic: @props.topic saveConfigs: @onSave when 'topic-settings' Top...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/topic-details.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-details.coffee
51
62
jianliaoim/talk-os:talk-web/client/app/topic-details.coffee:2:completion
completion
getText: lang.getText switch @state.tab when 'topic-configs' TopicConfigsPermission _teamId: @props.topic.get('_teamId') _creatorId: @props.topic.get('_creatorId')
topic: @props.topic saveConfigs: @onSave when 'topic-settings' TopicSettings topic: @props.topic closeView: @props.closeView
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/topic-details.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-details.coffee
51
62
AriaMinaei/pretty-error:scripts/coffee/lib/ParsedError.coffee:1:raw_corpus
raw_corpus
module.exports = class ParsedError constructor: (@error) -> unless typeof @error is 'object' return new ParsedError new Error "Caught an error that is not a valid error type: #{@error}" @_trace = [] do @_parse _parse: -> @_message = @error.message stack = @error.stack @_kind = 'Error' if m ...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/ParsedError.coffee
MIT
14d0edee58ac648fff28d10dc15f34bc6635ea0f
1,524
https://github.com/AriaMinaei/pretty-error/blob/14d0edee58ac648fff28d10dc15f34bc6635ea0f/scripts/coffee/lib/ParsedError.coffee
4
53
AriaMinaei/pretty-error:scripts/coffee/lib/ParsedError.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class ParsedError constructor: (@error) -> unless typeof @error is 'object' return new ParsedError new Error "Caught an error that is not a valid error type: #{@error}" @_trace = [] do @_parse _parse: -> @_message = @error.mes...
var ParsedError; module.exports = ParsedError = class ParsedError { constructor(error) { this.error = error; if (typeof this.error !== 'object') { return new ParsedError(new Error(`Caught an error that is not a valid error type: ${this.error}`)); } this._trace = []; this._parse(); } _p...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/ParsedError.coffee
MIT
14d0edee58ac648fff28d10dc15f34bc6635ea0f
1,524
https://github.com/AriaMinaei/pretty-error/blob/14d0edee58ac648fff28d10dc15f34bc6635ea0f/scripts/coffee/lib/ParsedError.coffee
4
53
AriaMinaei/pretty-error:scripts/coffee/lib/ParsedError.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ParsedError; module.exports = ParsedError = class ParsedError { constructor(error) { this.error = error; if (typeof this.error !== 'object') { return new ParsedError(new Error(`Caught an error that is not a valid error type: ${this.error}`)); ...
module.exports = class ParsedError constructor: (@error) -> unless typeof @error is 'object' return new ParsedError new Error "Caught an error that is not a valid error type: #{@error}" @_trace = [] do @_parse _parse: -> @_message = @error.message stack = @error.stack @_kind = 'Error' if m ...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/ParsedError.coffee
MIT
14d0edee58ac648fff28d10dc15f34bc6635ea0f
1,524
https://github.com/AriaMinaei/pretty-error/blob/14d0edee58ac648fff28d10dc15f34bc6635ea0f/scripts/coffee/lib/ParsedError.coffee
4
53
AriaMinaei/pretty-error:scripts/coffee/lib/ParsedError.coffee:1:completion
completion
module.exports = class ParsedError constructor: (@error) -> unless typeof @error is 'object' return new ParsedError new Error "Caught an error that is not a valid error type: #{@error}" @_trace = [] do @_parse _parse: -> @_message = @error.message stack = @error.stack @_kind = 'Error' if m ...
_parseLines: -> text = @error.stack # remove the error kind text = text.replace /^([a-zA-Z0-9\_\$]+):\ /, '' # remove the message, if it matches if text.substr(0, @message.length) is @message text = text.substr(@message.length, text.length) text = text.trim() for line in text.split "\n" @_add...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/ParsedError.coffee
MIT
14d0edee58ac648fff28d10dc15f34bc6635ea0f
1,524
https://github.com/AriaMinaei/pretty-error/blob/14d0edee58ac648fff28d10dc15f34bc6635ea0f/scripts/coffee/lib/ParsedError.coffee
4
53
AriaMinaei/pretty-error:scripts/coffee/lib/ParsedError.coffee:2:raw_corpus
raw_corpus
return if text is '' unless text.match /^at\ / throw Error "cannot read line `#{text}`" # remove the 'at ' part text = text.replace /^at /, '' original = text # the part that comes before the address what = null # address, including path to module and line/col addr = null # path to modul...
CoffeeScript
AriaMinaei/pretty-error
scripts/coffee/lib/ParsedError.coffee
MIT
14d0edee58ac648fff28d10dc15f34bc6635ea0f
1,524
https://github.com/AriaMinaei/pretty-error/blob/14d0edee58ac648fff28d10dc15f34bc6635ea0f/scripts/coffee/lib/ParsedError.coffee
54
103
AriaMinaei/pretty-error:scripts/coffee/lib/ParsedError.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript return if text is '' unless text.match /^at\ / throw Error "cannot read line `#{text}`" # remove the 'at ' part text = text.replace /^at /, '' original = text # the part that comes before the address what = null # address, including path ...
var addr, col, dir, file, jsCol, jsLine, line, modName, original, path, shortenedAddr, shortenedPath, text, what; if (text === '') { if (!text.match(/^at\ /)) { throw Error(`cannot read line \`${text}\``); } // remove the 'at ' part text = text.replace(/^at /, ''); original = text; // the part that com...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
scripts/coffee/lib/ParsedError.coffee
MIT
14d0edee58ac648fff28d10dc15f34bc6635ea0f
1,524
https://github.com/AriaMinaei/pretty-error/blob/14d0edee58ac648fff28d10dc15f34bc6635ea0f/scripts/coffee/lib/ParsedError.coffee
54
103