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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CaryLandholt/AngularFun:routes.coffee:1:raw_corpus | raw_corpus | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app, dir) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
ap... | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | f5569d72cc33698a645d136d4d866296b8f4b10e | 672 | https://github.com/CaryLandholt/AngularFun/blob/f5569d72cc33698a645d136d4d866296b8f4b10e/routes.coffee | 1 | 39 | ||
CaryLandholt/AngularFun:routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app, dir) ->
app.get... | var isUniqueName, nextId, people;
nextId = 0;
people = [
{
"id": `${nextId++}`,
"name": "Saasha",
"age": "5"
},
{
"id": `${nextId++}`,
"name": "Planet",
"age": "7"
}
];
isUniqueName = function(name) {
var person;
return ((function() {
var i, len, results;
results = [];
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | routes.coffee | MIT | f5569d72cc33698a645d136d4d866296b8f4b10e | 672 | https://github.com/CaryLandholt/AngularFun/blob/f5569d72cc33698a645d136d4d866296b8f4b10e/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var isUniqueName, nextId, people;
nextId = 0;
people = [
{
"id": `${nextId++}`,
"name": "Saasha",
"age": "5"
},
{
"id": `${nextId++}`,
"name": "Planet",
"age": "7"
}
];
isUniqueName = function(name) {
var person;
return ((func... | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app, dir) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
ap... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | f5569d72cc33698a645d136d4d866296b8f4b10e | 672 | https://github.com/CaryLandholt/AngularFun/blob/f5569d72cc33698a645d136d4d866296b8f4b10e/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:completion | completion | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app, dir) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
ap... | message =
"title": "Duplicate!"
"message": "#{name} is a duplicate. Please enter a new name."
return res.send(message, 403) if not isUniqueName name
person =
"id": "#{nextId++}"
"name": "#{name}"
"age": "0"
people.push person
res.json person
app.get '/people/:id', (req, res) ->
id = req.p... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | f5569d72cc33698a645d136d4d866296b8f4b10e | 672 | https://github.com/CaryLandholt/AngularFun/blob/f5569d72cc33698a645d136d4d866296b8f4b10e/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:raw_corpus | raw_corpus | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
app.get... | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/routes.coffee | 1 | 39 | ||
CaryLandholt/AngularFun:routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/',... | var isUniqueName, nextId, people;
nextId = 0;
people = [
{
"id": `${nextId++}`,
"name": "Saasha",
"age": "5"
},
{
"id": `${nextId++}`,
"name": "Planet",
"age": "7"
}
];
isUniqueName = function(name) {
var person;
return ((function() {
var i, len, results;
results = [];
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | routes.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var isUniqueName, nextId, people;
nextId = 0;
people = [
{
"id": `${nextId++}`,
"name": "Saasha",
"age": "5"
},
{
"id": `${nextId++}`,
"name": "Planet",
"age": "7"
}
];
isUniqueName = function(name) {
var person;
return ((func... | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
app.get... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:completion | completion | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
app.get... | message =
"title": "Duplicate!"
"message": "#{name} is a duplicate. Please enter a new name."
return res.send(message, 403) if not isUniqueName name
person =
"id": "#{nextId++}"
"name": "#{name}"
"age": "0"
people.push person
res.json person
app.get '/people/:id', (req, res) ->
id = req.p... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | 83f11ba52970aa46e3d85f6dfad9ae495fd52e50 | 672 | https://github.com/CaryLandholt/AngularFun/blob/83f11ba52970aa46e3d85f6dfad9ae495fd52e50/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:raw_corpus | raw_corpus | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
app.get... | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | f9909d080baf8b1265492fe7cef5e21a5b12e57c | 672 | https://github.com/CaryLandholt/AngularFun/blob/f9909d080baf8b1265492fe7cef5e21a5b12e57c/routes.coffee | 1 | 39 | ||
CaryLandholt/AngularFun:routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/',... | var isUniqueName, nextId, people;
nextId = 0;
people = [
{
"id": `${nextId++}`,
"name": "Saasha",
"age": "5"
},
{
"id": `${nextId++}`,
"name": "Planet",
"age": "7"
}
];
isUniqueName = function(name) {
var person;
return ((function() {
var i, len, results;
results = [];
... | CoffeeScript | JavaScript | CaryLandholt/AngularFun | routes.coffee | MIT | f9909d080baf8b1265492fe7cef5e21a5b12e57c | 672 | https://github.com/CaryLandholt/AngularFun/blob/f9909d080baf8b1265492fe7cef5e21a5b12e57c/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var isUniqueName, nextId, people;
nextId = 0;
people = [
{
"id": `${nextId++}`,
"name": "Saasha",
"age": "5"
},
{
"id": `${nextId++}`,
"name": "Planet",
"age": "7"
}
];
isUniqueName = function(name) {
var person;
return ((func... | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
app.get... | JavaScript | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | f9909d080baf8b1265492fe7cef5e21a5b12e57c | 672 | https://github.com/CaryLandholt/AngularFun/blob/f9909d080baf8b1265492fe7cef5e21a5b12e57c/routes.coffee | 1 | 39 |
CaryLandholt/AngularFun:routes.coffee:1:completion | completion | nextId = 0
people = [
{"id": "#{nextId++}", "name": "Saasha", "age": "5"}
{"id": "#{nextId++}", "name": "Planet", "age": "7"}
]
isUniqueName = (name) ->
(name for person in people when person.name is name).length is 0
module.exports = (app) ->
app.get '/', (req, res) ->
res.render "#{dir}/index.html"
app.get... | message =
"title": "Duplicate!"
"message": "#{name} is a duplicate. Please enter a new name."
return res.send(message, 403) if not isUniqueName name
person =
"id": "#{nextId++}"
"name": "#{name}"
"age": "0"
people.push person
res.json person
app.get '/people/details/:id', (req, res) ->
id... | CoffeeScript | CoffeeScript | CaryLandholt/AngularFun | routes.coffee | MIT | f9909d080baf8b1265492fe7cef5e21a5b12e57c | 672 | https://github.com/CaryLandholt/AngularFun/blob/f9909d080baf8b1265492fe7cef5e21a5b12e57c/routes.coffee | 1 | 39 |
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:raw_corpus | raw_corpus | module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels]
grey = @channelData[i]
alpha = if @channels() is 2
@channelData[@channelLength + i]
else
255
... | CoffeeScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/greyscale.coffee | 1 | 14 | ||
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels]
grey = @channelData[i]
alpha = if @channels() is 2
@chan... | module.exports = {
setGreyscaleChannels: function() {
this.channelsInfo = [
{
id: 0
}
];
if (this.channels() === 2) {
return this.channelsInfo.push({
id: -1
});
}
},
combineGreyscaleChannel: function() {
var alpha, grey, i, j, ref, results;
results =... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/greyscale.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = {
setGreyscaleChannels: function() {
this.channelsInfo = [
{
id: 0
}
];
if (this.channels() === 2) {
return this.channelsInfo.push({
id: -1
});
}
},
combineGreyscaleChannel: function() {... | module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels]
grey = @channelData[i]
alpha = if @channels() is 2
@channelData[@channelLength + i]
else
255
... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/greyscale.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:completion | completion | module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels] | grey = @channelData[i]
alpha = if @channels() is 2
@channelData[@channelLength + i]
else
255
@pixelData.set([grey, grey, grey, alpha], i*4) | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/image_modes/greyscale.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:raw_corpus | raw_corpus | module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels]
grey = @channelData[i]
alpha = if @channels() is 2
@channelData[@channelLength + i]
else
255
... | CoffeeScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | a2cae2d804efae8776f8124dbc890c59acf15423 | 2,846 | https://github.com/meltingice/psd.js/blob/a2cae2d804efae8776f8124dbc890c59acf15423/lib/psd/image_modes/greyscale.coffee | 1 | 14 | ||
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels]
grey = @channelData[i]
alpha = if @channels() is 2
@chan... | module.exports = {
setGreyscaleChannels: function() {
this.channelsInfo = [
{
id: 0
}
];
if (this.channels() === 2) {
return this.channelsInfo.push({
id: -1
});
}
},
combineGreyscaleChannel: function() {
var alpha, grey, i, j, ref, results;
results =... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | a2cae2d804efae8776f8124dbc890c59acf15423 | 2,846 | https://github.com/meltingice/psd.js/blob/a2cae2d804efae8776f8124dbc890c59acf15423/lib/psd/image_modes/greyscale.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = {
setGreyscaleChannels: function() {
this.channelsInfo = [
{
id: 0
}
];
if (this.channels() === 2) {
return this.channelsInfo.push({
id: -1
});
}
},
combineGreyscaleChannel: function() {... | module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels]
grey = @channelData[i]
alpha = if @channels() is 2
@channelData[@channelLength + i]
else
255
... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | a2cae2d804efae8776f8124dbc890c59acf15423 | 2,846 | https://github.com/meltingice/psd.js/blob/a2cae2d804efae8776f8124dbc890c59acf15423/lib/psd/image_modes/greyscale.coffee | 1 | 14 |
meltingice/psd.js:lib/psd/image_modes/greyscale.coffee:1:completion | completion | module.exports =
setGreyscaleChannels: ->
@channelsInfo = [{id: 0}]
@channelsInfo.push {id: -1} if @channels() is 2
combineGreyscaleChannel: ->
for i in [0...@numPixels] | grey = @channelData[i]
alpha = if @channels() is 2
@channelData[@channelLength + i]
else
255
@pixelData.push grey, grey, grey, alpha | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/image_modes/greyscale.coffee | MIT | a2cae2d804efae8776f8124dbc890c59acf15423 | 2,846 | https://github.com/meltingice/psd.js/blob/a2cae2d804efae8776f8124dbc890c59acf15423/lib/psd/image_modes/greyscale.coffee | 1 | 14 |
jianliaoim/talk-os:talk-account/test/apis/user.coffee:1:raw_corpus | raw_corpus | should = require 'should'
config = require 'config'
Promise = require 'bluebird'
util = require '../util'
limbo = require 'limbo'
{
UserModel
MobileModel
} = limbo.use 'account'
_createUser = (done) ->
phoneNumber = '18500000000'
user = new UserModel
mobile = new MobileModel
user: user._id
phoneNumb... | CoffeeScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-account/test/apis/user.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
should = require 'should'
config = require 'config'
Promise = require 'bluebird'
util = require '../util'
limbo = require 'limbo'
{
UserModel
MobileModel
} = limbo.use 'account'
_createUser = (done) ->
phoneNumber = '18500000000'
user = new UserModel
... | var MobileModel, Promise, UserModel, _createUser, config, limbo, should, util;
should = require('should');
config = require('config');
Promise = require('bluebird');
util = require('../util');
limbo = require('limbo');
({UserModel, MobileModel} = limbo.use('account'));
_createUser = function(done) {
var mobile... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 1 | 50 |
jianliaoim/talk-os:talk-account/test/apis/user.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var MobileModel, Promise, UserModel, _createUser, config, limbo, should, util;
should = require('should');
config = require('config');
Promise = require('bluebird');
util = require('../util');
limbo = require('limbo');
({UserModel, MobileModel} = limbo.use('a... | should = require 'should'
config = require 'config'
Promise = require 'bluebird'
util = require '../util'
limbo = require 'limbo'
{
UserModel
MobileModel
} = limbo.use 'account'
_createUser = (done) ->
phoneNumber = '18500000000'
user = new UserModel
mobile = new MobileModel
user: user._id
phoneNumb... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 1 | 50 |
jianliaoim/talk-os:talk-account/test/apis/user.coffee:1:completion | completion | should = require 'should'
config = require 'config'
Promise = require 'bluebird'
util = require '../util'
limbo = require 'limbo'
{
UserModel
MobileModel
} = limbo.use 'account'
_createUser = (done) ->
phoneNumber = '18500000000'
user = new UserModel
mobile = new MobileModel
user: user._id
phoneNumb... | describe 'User', ->
before _createUser
it 'should read user infomation by account token', (done) ->
options =
method: 'GET'
url: '/user/get'
qs: accountToken: util.user.accountToken
util.request options, (err, res, user) ->
user._id.should.eql "#{util.user._id}"
user.should.h... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 1 | 50 |
jianliaoim/talk-os:talk-account/test/apis/user.coffee:2:raw_corpus | raw_corpus | $bindUnion.then ->
options =
method: 'GET'
url: '/user/accounts'
qs: accountToken: util.user.accountToken
util.requestAsync options
.spread (res, accounts) ->
accounts.length.should.eql 2
accounts[0].login.should.eql 'mobile'
accounts[0].should.have.properties ... | CoffeeScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 51 | 68 | ||
jianliaoim/talk-os:talk-account/test/apis/user.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$bindUnion.then ->
options =
method: 'GET'
url: '/user/accounts'
qs: accountToken: util.user.accountToken
util.requestAsync options
.spread (res, accounts) ->
accounts.length.should.eql 2
accounts[0].login.shou... | $bindUnion.then(function() {
var options;
options = {
method: 'GET',
url: '/user/accounts',
qs: {
accountToken: util.user.accountToken
}
};
return util.requestAsync(options);
}).spread(function(res, accounts) {
accounts.length.should.eql(2);
accounts[0].login.should.eql('mobile');
ac... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 51 | 68 |
jianliaoim/talk-os:talk-account/test/apis/user.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$bindUnion.then(function() {
var options;
options = {
method: 'GET',
url: '/user/accounts',
qs: {
accountToken: util.user.accountToken
}
};
return util.requestAsync(options);
}).spread(function(res, accounts) {
accounts.length.should... | $bindUnion.then ->
options =
method: 'GET'
url: '/user/accounts'
qs: accountToken: util.user.accountToken
util.requestAsync options
.spread (res, accounts) ->
accounts.length.should.eql 2
accounts[0].login.should.eql 'mobile'
accounts[0].should.have.properties ... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 51 | 68 |
jianliaoim/talk-os:talk-account/test/apis/user.coffee:2:completion | completion | $bindUnion.then ->
options =
method: 'GET'
url: '/user/accounts'
qs: accountToken: util.user.accountToken
util.requestAsync options
.spread (res, accounts) ->
accounts.length.should.eql 2 | accounts[0].login.should.eql 'mobile'
accounts[0].should.have.properties 'phoneNumber'
accounts[1].login.should.eql 'teambition'
accounts[1].should.have.properties 'openId', 'refer'
done()
.catch done
after util.cleanup | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/test/apis/user.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/test/apis/user.coffee | 51 | 68 |
jeremyfa/yaml.js:src/Unescaper.coffee:1:raw_corpus | raw_corpus | class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single quoted string.
#
# @param [String] value A... | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Unescaper.coffee | 6 | 55 | ||
jeremyfa/yaml.js:src/Unescaper.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single... | var Unescaper;
Unescaper = (function() {
class Unescaper {
static unescapeSingleQuotedString(value) {
return value.replace(/\'\'/g, '\'');
}
// Unescapes a double quoted string.
// @param [String] value A double quoted string.
// @return [String] The unescaped string.
sta... | CoffeeScript | JavaScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Unescaper.coffee | 6 | 55 |
jeremyfa/yaml.js:src/Unescaper.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Unescaper;
Unescaper = (function() {
class Unescaper {
static unescapeSingleQuotedString(value) {
return value.replace(/\'\'/g, '\'');
}
// Unescapes a double quoted string.
// @param [String] value A double quoted string.
... | class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single quoted string.
#
# @param [String] value A... | JavaScript | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Unescaper.coffee | 6 | 55 |
jeremyfa/yaml.js:src/Unescaper.coffee:1:completion | completion | class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single quoted string.
#
# @param [String] value A... | return @unescapeCharacter(str)
# Evaluate the string
return @PATTERN_ESCAPED_CHARACTER.replace value, @_unescapeCallback
# Unescapes a character that was found in a double-quoted string
#
# @param [String] value An escaped character
#
# @return [String] The unescaped ch... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Unescaper.coffee | 6 | 55 |
jeremyfa/yaml.js:src/Unescaper.coffee:2:raw_corpus | raw_corpus | when 'n'
return "\n"
when 'v'
return ch(11)
when 'f'
return ch(12)
when 'r'
return ch(13)
when 'e'
return ch(27)
when ' '
return ' '
when '"'
... | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Unescaper.coffee | 56 | 93 | ||
jeremyfa/yaml.js:src/Unescaper.coffee:2:completion | completion | when 'n'
return "\n"
when 'v'
return ch(11)
when 'f'
return ch(12)
when 'r'
return ch(13)
when 'e'
return ch(27)
when ' '
return ' '
when '"'
... | # U+0085 NEXT LINE
return ch(0x0085)
when '_'
# U+00A0 NO-BREAK SPACE
return ch(0x00A0)
when 'L'
# U+2028 LINE SEPARATOR
return ch(0x2028)
when 'P'
# U+2029 PARAGRAPH SEPARATOR
... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Unescaper.coffee | 56 | 93 |
jeremyfa/yaml.js:src/Unescaper.coffee:1:raw_corpus | raw_corpus | class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single quoted string.
#
# @param [String] value A... | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | c6cbcf0326723c5f0013490d1fea489694790775 | 887 | https://github.com/jeremyfa/yaml.js/blob/c6cbcf0326723c5f0013490d1fea489694790775/src/Unescaper.coffee | 6 | 55 | ||
jeremyfa/yaml.js:src/Unescaper.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single... | var Unescaper;
Unescaper = (function() {
class Unescaper {
static unescapeSingleQuotedString(value) {
return value.replace('\'\'', '\'');
}
// Unescapes a double quoted string.
// @param [String] value A double quoted string.
// @return [String] The unescaped string.
stat... | CoffeeScript | JavaScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | c6cbcf0326723c5f0013490d1fea489694790775 | 887 | https://github.com/jeremyfa/yaml.js/blob/c6cbcf0326723c5f0013490d1fea489694790775/src/Unescaper.coffee | 6 | 55 |
jeremyfa/yaml.js:src/Unescaper.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Unescaper;
Unescaper = (function() {
class Unescaper {
static unescapeSingleQuotedString(value) {
return value.replace('\'\'', '\'');
}
// Unescapes a double quoted string.
// @param [String] value A double quoted string.
/... | class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single quoted string.
#
# @param [String] value A... | JavaScript | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | c6cbcf0326723c5f0013490d1fea489694790775 | 887 | https://github.com/jeremyfa/yaml.js/blob/c6cbcf0326723c5f0013490d1fea489694790775/src/Unescaper.coffee | 6 | 55 |
jeremyfa/yaml.js:src/Unescaper.coffee:1:completion | completion | class Unescaper
# Regex fragment that matches an escaped character in
# a double quoted string.
@PATTERN_ESCAPED_CHARACTER: new Pattern '\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
# Unescapes a single quoted string.
#
# @param [String] value A... | return @unescapeCharacter(str)
# Evaluate the string
return @PATTERN_ESCAPED_CHARACTER.replace value, @_unescapeCallback
# Unescapes a character that was found in a double-quoted string
#
# @param [String] value An escaped character
#
# @return [String] The unescaped ch... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Unescaper.coffee | MIT | c6cbcf0326723c5f0013490d1fea489694790775 | 887 | https://github.com/jeremyfa/yaml.js/blob/c6cbcf0326723c5f0013490d1fea489694790775/src/Unescaper.coffee | 6 | 55 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:raw_corpus | raw_corpus | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) ->
return displayHelp(recipeRepo) if recipes.length == 0
fetcher recipes, {recipeRepo}, (er) ->
grunt.warn(er) if er?
return cb?(er)... | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/cli/lineman-fetch.coffee | 1 | 18 | ||
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) ->
return displayHelp(recipeRepo) if recipes.length == 0
fetcher recipes, {recipeRe... | var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) {
if (recipes.length === 0) {
return displayHelp(recipeRepo);
}
return fetcher(recipes, {... | CoffeeScript | JavaScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/cli/lineman-fetch.coffee | 1 | 18 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) {
if (recipes.length === 0) {
return d... | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) ->
return displayHelp(recipeRepo) if recipes.length == 0
fetcher recipes, {recipeRepo}, (er) ->
grunt.warn(er) if er?
return cb?(er)... | JavaScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/cli/lineman-fetch.coffee | 1 | 18 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:completion | completion | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], recipeRepo = "https://github.com/linemanjs/fetcher-recipes", cb) ->
return displayHelp(recipeRepo) if recipes.length == 0
fetcher recipes, {recipeRepo}, (er) ->
grunt.warn(er) if er?
return cb?(er)... | displayHelp = (recipeRepo) ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a list of available recipes, see:
#{recipeRepo}/tree/master/recipes
""" | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/cli/lineman-fetch.coffee | 1 | 18 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:raw_corpus | raw_corpus | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "https://github.com/linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
return cb?(er) if er?
cb?(nul... | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 5e0549a46723f865a18420b87b151313a911443e | 1,168 | https://github.com/linemanjs/lineman/blob/5e0549a46723f865a18420b87b151313a911443e/lib/cli/lineman-fetch.coffee | 1 | 19 | ||
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "https://github.com/linemanjs/fetcher-recipes.git"}, (er) ->
gr... | var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = [], cb) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, {
recipeRepo: "https://github.com/linemanjs/fetcher-recipes.git"
}... | CoffeeScript | JavaScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 5e0549a46723f865a18420b87b151313a911443e | 1,168 | https://github.com/linemanjs/lineman/blob/5e0549a46723f865a18420b87b151313a911443e/lib/cli/lineman-fetch.coffee | 1 | 19 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = [], cb) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, {
recipeRepo:... | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "https://github.com/linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
return cb?(er) if er?
cb?(nul... | JavaScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 5e0549a46723f865a18420b87b151313a911443e | 1,168 | https://github.com/linemanjs/lineman/blob/5e0549a46723f865a18420b87b151313a911443e/lib/cli/lineman-fetch.coffee | 1 | 19 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:completion | completion | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "https://github.com/linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
return cb?(er) if er?
cb?(nul... | displayHelp = ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a list of available recipes, see:
https://github.com/linemanjs/fetcher-recipes/tree/master/recipes
""" | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 5e0549a46723f865a18420b87b151313a911443e | 1,168 | https://github.com/linemanjs/lineman/blob/5e0549a46723f865a18420b87b151313a911443e/lib/cli/lineman-fetch.coffee | 1 | 19 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:raw_corpus | raw_corpus | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
return cb?(er) if er?
cb?(null)
... | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 11920785fe75977c4eba7b895ac506155498572a | 1,168 | https://github.com/linemanjs/lineman/blob/11920785fe75977c4eba7b895ac506155498572a/lib/cli/lineman-fetch.coffee | 1 | 19 | ||
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.... | var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = [], cb) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, {
recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"
}, fu... | CoffeeScript | JavaScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 11920785fe75977c4eba7b895ac506155498572a | 1,168 | https://github.com/linemanjs/lineman/blob/11920785fe75977c4eba7b895ac506155498572a/lib/cli/lineman-fetch.coffee | 1 | 19 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = [], cb) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, {
recipeRepo:... | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
return cb?(er) if er?
cb?(null)
... | JavaScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 11920785fe75977c4eba7b895ac506155498572a | 1,168 | https://github.com/linemanjs/lineman/blob/11920785fe75977c4eba7b895ac506155498572a/lib/cli/lineman-fetch.coffee | 1 | 19 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:completion | completion | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = [], cb) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
return cb?(er) if er?
cb?(null) | displayHelp = ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a list of available recipes, see:
https://github.com/linemanjs/fetcher-recipes/tree/master/recipes
""" | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 11920785fe75977c4eba7b895ac506155498572a | 1,168 | https://github.com/linemanjs/lineman/blob/11920785fe75977c4eba7b895ac506155498572a/lib/cli/lineman-fetch.coffee | 1 | 19 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:raw_corpus | raw_corpus | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
displayHelp = ->
grunt.warn """
... | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb | 1,168 | https://github.com/linemanjs/lineman/blob/6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb/lib/cli/lineman-fetch.coffee | 1 | 17 | ||
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn... | var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = []) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, {
recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"
}, functi... | CoffeeScript | JavaScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb | 1,168 | https://github.com/linemanjs/lineman/blob/6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb/lib/cli/lineman-fetch.coffee | 1 | 17 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = []) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, {
recipeRepo: "gi... | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er?
displayHelp = ->
grunt.warn """
... | JavaScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb | 1,168 | https://github.com/linemanjs/lineman/blob/6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb/lib/cli/lineman-fetch.coffee | 1 | 17 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:completion | completion | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, {recipeRepo: "git@github.com:linemanjs/fetcher-recipes.git"}, (er) ->
grunt.warn(er) if er? | displayHelp = ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a list of available recipes, see:
https://github.com/linemanjs/fetcher-recipes/tree/master/recipes
""" | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | 6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb | 1,168 | https://github.com/linemanjs/lineman/blob/6fb285e5dc7696f101c1bf2d788c82c1bd9b15eb/lib/cli/lineman-fetch.coffee | 1 | 17 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:raw_corpus | raw_corpus | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, (er) ->
grunt.warn(er) if er?
displayHelp = ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a lis... | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | f91ee84610d1c855703beb00748352cd9cd4dedb | 1,168 | https://github.com/linemanjs/lineman/blob/f91ee84610d1c855703beb00748352cd9cd4dedb/lib/cli/lineman-fetch.coffee | 1 | 17 | ||
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, (er) ->
grunt.warn(er) if er?
displayHelp = ->
grunt.warn """
Us... | var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = []) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, function(er) {
if (er != null) {
return grunt.warn(er);
}
})... | CoffeeScript | JavaScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | f91ee84610d1c855703beb00748352cd9cd4dedb | 1,168 | https://github.com/linemanjs/lineman/blob/f91ee84610d1c855703beb00748352cd9cd4dedb/lib/cli/lineman-fetch.coffee | 1 | 17 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var displayHelp, fetcher, grunt;
grunt = require('./../requires-grunt').require();
fetcher = require('fetcher');
module.exports = function(recipes = []) {
if (recipes.length === 0) {
return displayHelp();
}
return fetcher(recipes, function(er) {
if... | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, (er) ->
grunt.warn(er) if er?
displayHelp = ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a lis... | JavaScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | f91ee84610d1c855703beb00748352cd9cd4dedb | 1,168 | https://github.com/linemanjs/lineman/blob/f91ee84610d1c855703beb00748352cd9cd4dedb/lib/cli/lineman-fetch.coffee | 1 | 17 |
linemanjs/lineman:lib/cli/lineman-fetch.coffee:1:completion | completion | grunt = require('./../requires-grunt').require()
fetcher = require('fetcher')
module.exports = (recipes = []) ->
return displayHelp() if recipes.length == 0
fetcher recipes, (er) ->
grunt.warn(er) if er? | displayHelp = ->
grunt.warn """
Usage: `lineman fetch <recipe_name>`
For a list of available recipes, see:
https://github.com/linemanjs/fetcher-recipes/tree/master/recipes
""" | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/cli/lineman-fetch.coffee | MIT | f91ee84610d1c855703beb00748352cd9cd4dedb | 1,168 | https://github.com/linemanjs/lineman/blob/f91ee84610d1c855703beb00748352cd9cd4dedb/lib/cli/lineman-fetch.coffee | 1 | 17 |
Atraci/Atraci:coffee/_history.coffee:1:raw_corpus | raw_corpus | class History
@clear: (success) ->
db.history.remove({}, { multi: true }, (error) ->
if error
console.log("History.clear remove erorr :")
console.log(error)
success?()
else
success?()
)
@addTrack: (artist, title, cover_url_medium, cover_url_large) ->
unix_tim... | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca | 800 | https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_history.coffee | 1 | 50 | ||
Atraci/Atraci:coffee/_history.coffee:1:completion | completion | class History
@clear: (success) ->
db.history.remove({}, { multi: true }, (error) ->
if error
console.log("History.clear remove erorr :")
console.log(error)
success?()
else
success?()
)
@addTrack: (artist, title, cover_url_medium, cover_url_large) ->
unix_tim... | cover_url_large: cover_url_large,
last_played: unix_timestamp
}, (error) ->
if error
console.log("History.addTrack insert erorr :")
console.log(error)
)
)
@removeTrack: (artist, title) ->
db.history.remove({
artist: artist,
title: title
... | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca | 800 | https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_history.coffee | 1 | 50 |
Atraci/Atraci:coffee/_history.coffee:2:raw_corpus | raw_corpus | console.log(error)
success?([])
else
success?(foundTracks)
)
@countTracks: (success) ->
db.history.count({}, (error, count) ->
if error
console.log("History.countTracks count erorr :")
console.log(error)
success?(0)
else
success?(count)
) | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca | 800 | https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_history.coffee | 51 | 65 | ||
Atraci/Atraci:coffee/_history.coffee:2:completion | completion | console.log(error)
success?([])
else
success?(foundTracks)
)
@countTracks: (success) -> | db.history.count({}, (error, count) ->
if error
console.log("History.countTracks count erorr :")
console.log(error)
success?(0)
else
success?(count)
) | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca | 800 | https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_history.coffee | 51 | 65 |
Atraci/Atraci:coffee/_history.coffee:1:raw_corpus | raw_corpus | # Init preparation (should be improved later)
db.transaction (tx) ->
tx.executeSql(
'CREATE TABLE IF NOT EXISTS history ' +
'(artist, title, cover_url_medium, cover_url_large, last_played)'
)
class History
@clear: (success) ->
db.transaction (tx) ->
tx.executeSql 'DROP TABLE history'
succ... | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | a922ce45362086764d02f2643bc2a7108214a1a8 | 800 | https://github.com/Atraci/Atraci/blob/a922ce45362086764d02f2643bc2a7108214a1a8/coffee/_history.coffee | 1 | 50 | ||
Atraci/Atraci:coffee/_history.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Init preparation (should be improved later)
db.transaction (tx) ->
tx.executeSql(
'CREATE TABLE IF NOT EXISTS history ' +
'(artist, title, cover_url_medium, cover_url_large, last_played)'
)
class History
@clear: (success) ->
db.transaction (t... | // Init preparation (should be improved later)
var History;
db.transaction(function(tx) {
return tx.executeSql('CREATE TABLE IF NOT EXISTS history ' + '(artist, title, cover_url_medium, cover_url_large, last_played)');
});
History = class History {
static clear(success) {
return db.transaction(function(tx) {
... | CoffeeScript | JavaScript | Atraci/Atraci | coffee/_history.coffee | MIT | a922ce45362086764d02f2643bc2a7108214a1a8 | 800 | https://github.com/Atraci/Atraci/blob/a922ce45362086764d02f2643bc2a7108214a1a8/coffee/_history.coffee | 1 | 50 |
Atraci/Atraci:coffee/_history.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Init preparation (should be improved later)
var History;
db.transaction(function(tx) {
return tx.executeSql('CREATE TABLE IF NOT EXISTS history ' + '(artist, title, cover_url_medium, cover_url_large, last_played)');
});
History = class History {
static cle... | # Init preparation (should be improved later)
db.transaction (tx) ->
tx.executeSql(
'CREATE TABLE IF NOT EXISTS history ' +
'(artist, title, cover_url_medium, cover_url_large, last_played)'
)
class History
@clear: (success) ->
db.transaction (tx) ->
tx.executeSql 'DROP TABLE history'
succ... | JavaScript | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | a922ce45362086764d02f2643bc2a7108214a1a8 | 800 | https://github.com/Atraci/Atraci/blob/a922ce45362086764d02f2643bc2a7108214a1a8/coffee/_history.coffee | 1 | 50 |
Atraci/Atraci:coffee/_history.coffee:1:completion | completion | # Init preparation (should be improved later)
db.transaction (tx) ->
tx.executeSql(
'CREATE TABLE IF NOT EXISTS history ' +
'(artist, title, cover_url_medium, cover_url_large, last_played)'
)
class History
@clear: (success) ->
db.transaction (tx) ->
tx.executeSql 'DROP TABLE history'
succ... | tx.executeSql(
'INSERT INTO history ' +
'(artist, title, cover_url_medium, cover_url_large, last_played) ' +
'VALUES (?, ?, ?, ?, ?)',
[artist, title, cover_url_medium, cover_url_large, unix_timestamp]
)
@removeTrack: (artist, title) ->
db.transaction (tx) ->
tx.execut... | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | a922ce45362086764d02f2643bc2a7108214a1a8 | 800 | https://github.com/Atraci/Atraci/blob/a922ce45362086764d02f2643bc2a7108214a1a8/coffee/_history.coffee | 1 | 50 |
Atraci/Atraci:coffee/_history.coffee:2:raw_corpus | raw_corpus | @countTracks: (success) ->
db.transaction (tx) ->
tx.executeSql 'SELECT COUNT(*) AS cnt FROM history', [], (tx, results) ->
success? results.rows.item(0).cnt | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | a922ce45362086764d02f2643bc2a7108214a1a8 | 800 | https://github.com/Atraci/Atraci/blob/a922ce45362086764d02f2643bc2a7108214a1a8/coffee/_history.coffee | 51 | 55 | ||
Atraci/Atraci:coffee/_history.coffee:2:completion | completion | @countTracks: (success) ->
db.transaction (tx) -> | tx.executeSql 'SELECT COUNT(*) AS cnt FROM history', [], (tx, results) ->
success? results.rows.item(0).cnt | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_history.coffee | MIT | a922ce45362086764d02f2643bc2a7108214a1a8 | 800 | https://github.com/Atraci/Atraci/blob/a922ce45362086764d02f2643bc2a7108214a1a8/coffee/_history.coffee | 51 | 55 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:raw_corpus | raw_corpus | module.exports = class GitRevSelector
constructor: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
@$element = $("<div class='timemachine-rev-select #{lef... | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 8 | 57 | ||
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class GitRevSelector
constructor: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
... | var GitRevSelector;
module.exports = GitRevSelector = class GitRevSelector {
constructor(leftOrRight, commit, onPreviousRevision, onNextRevision) {
var $splitdiffElement;
this.onPreviousRevision = onPreviousRevision;
this.onNextRevision = onNextRevision;
$splitdiffElement = $(".tool-panel .split-diff... | CoffeeScript | JavaScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 8 | 57 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var GitRevSelector;
module.exports = GitRevSelector = class GitRevSelector {
constructor(leftOrRight, commit, onPreviousRevision, onNextRevision) {
var $splitdiffElement;
this.onPreviousRevision = onPreviousRevision;
this.onNextRevision = onNextRevis... | module.exports = class GitRevSelector
constructor: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
@$element = $("<div class='timemachine-rev-select #{lef... | JavaScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 8 | 57 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:completion | completion | module.exports = class GitRevSelector
constructor: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
@$element = $("<div class='timemachine-rev-select #{lef... | if commit?
# commitLabel = "#{commitDate} #{revHash}" #takes up too much space with revHash
commitLabel = moment.unix(commit.authorDate).format(dateFormat)
return if commit == undefined
else if commit == null
@_renderLeftButton()
@_renderVersionLabel("Local Version")
@_renderRigh... | CoffeeScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 8 | 57 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:raw_corpus | raw_corpus | _renderRightButton: (options={}) ->
options = _.defaults options,
click: @_onNextRevClick
@_renderButton " > ", options
_renderButton: (text, options={}) ->
options = _.defaults options,
class: 'btn btn-small'
click: null
disabled: false
$button = $("<button class='#{option... | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 58 | 89 | ||
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_renderRightButton: (options={}) ->
options = _.defaults options,
click: @_onNextRevClick
@_renderButton " > ", options
_renderButton: (text, options={}) ->
options = _.defaults options,
class: 'btn btn-small'
click: null
... | ({
_renderRightButton: function(options = {}) {
options = _.defaults(options, {
click: this._onNextRevClick
});
return this._renderButton(" > ", options);
},
_renderButton: function(text, options = {}) {
var $button;
options = _.defaults(options, {
class: 'btn btn-small',
cli... | CoffeeScript | JavaScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 58 | 89 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
_renderRightButton: function(options = {}) {
options = _.defaults(options, {
click: this._onNextRevClick
});
return this._renderButton(" > ", options);
},
_renderButton: function(text, options = {}) {
var $button;
options = _.defa... | _renderRightButton: (options={}) ->
options = _.defaults options,
click: @_onNextRevClick
@_renderButton " > ", options
_renderButton: (text, options={}) ->
options = _.defaults options,
class: 'btn btn-small'
click: null
disabled: false
$button = $("<button class='#{option... | JavaScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 58 | 89 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:completion | completion | _renderRightButton: (options={}) ->
options = _.defaults options,
click: @_onNextRevClick
@_renderButton " > ", options
_renderButton: (text, options={}) ->
options = _.defaults options,
class: 'btn btn-small'
click: null
disabled: false
$button = $("<button class='#{option... | if options.click?
$button.on 'click.gtmRevSelector', options.click
@$element.append $button
_renderVersionLabel: (label) ->
@$element.append $("<span>#{label}</span>")
_onPreviousRevClick: =>
@onPreviousRevision?.apply(@, arguments)
_onNextRevClick: =>
@onNextRevision?.apply(@, argume... | CoffeeScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | 2b2a9b6ccc55dda0429a45aae913d1a0f6666439 | 1,111 | https://github.com/littlebee/git-time-machine/blob/2b2a9b6ccc55dda0429a45aae913d1a0f6666439/lib/git-rev-selector.coffee | 58 | 89 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:raw_corpus | raw_corpus | {$, View} = require "atom-space-pen-views"
_ = require 'underscore-plus'
moment = require 'moment'
GitRevSelectorPopup = require './git-revselector-popup'
module.exports = class GitRevSelector extends View
@content = (leftOrRight, commit) ->
dateFormat = "MMM DD YYYY ha"
commitLabel = ""
if commit?
... | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 1 | 50 | ||
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{$, View} = require "atom-space-pen-views"
_ = require 'underscore-plus'
moment = require 'moment'
GitRevSelectorPopup = require './git-revselector-popup'
module.exports = class GitRevSelector extends View
@content = (leftOrRight, commit) ->
dateFormat ... | var $, GitRevSelector, GitRevSelectorPopup, View, _, moment;
({$, View} = require("atom-space-pen-views"));
_ = require('underscore-plus');
moment = require('moment');
GitRevSelectorPopup = require('./git-revselector-popup');
module.exports = GitRevSelector = class GitRevSelector extends View {
static content(le... | CoffeeScript | JavaScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 1 | 50 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var $, GitRevSelector, GitRevSelectorPopup, View, _, moment;
({$, View} = require("atom-space-pen-views"));
_ = require('underscore-plus');
moment = require('moment');
GitRevSelectorPopup = require('./git-revselector-popup');
module.exports = GitRevSelector = ... | {$, View} = require "atom-space-pen-views"
_ = require 'underscore-plus'
moment = require 'moment'
GitRevSelectorPopup = require './git-revselector-popup'
module.exports = class GitRevSelector extends View
@content = (leftOrRight, commit) ->
dateFormat = "MMM DD YYYY ha"
commitLabel = ""
if commit?
... | JavaScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 1 | 50 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:1:completion | completion | {$, View} = require "atom-space-pen-views"
_ = require 'underscore-plus'
moment = require 'moment'
GitRevSelectorPopup = require './git-revselector-popup'
module.exports = class GitRevSelector extends View
@content = (leftOrRight, commit) ->
dateFormat = "MMM DD YYYY ha"
commitLabel = ""
if commit?
... | else
@leftButton()
@span commitLabel
@rightButton()
@leftButton: (options={}) ->
options = _.defaults options,
click: '_onPreviousRevClick'
@button " < ", options
@rightButton: (options={}) ->
options = _.defaults options,
click: '_onNextRevClick'
@button " ... | CoffeeScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 1 | 50 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:raw_corpus | raw_corpus | initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiffElement.prepend @
else
$splitdiffElement.append... | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 51 | 74 | ||
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiff... | ({
initialize: function(leftOrRight, commit, onPreviousRevision, onNextRevision) {
var $splitdiffElement, ref;
this.onPreviousRevision = onPreviousRevision;
this.onNextRevision = onNextRevision;
$splitdiffElement = $(".tool-panel .split-diff-ui .mid");
$splitdiffElement.find(`.timemachine-rev-sele... | CoffeeScript | JavaScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 51 | 74 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
initialize: function(leftOrRight, commit, onPreviousRevision, onNextRevision) {
var $splitdiffElement, ref;
this.onPreviousRevision = onPreviousRevision;
this.onNextRevision = onNextRevision;
$splitdiffElement = $(".tool-panel .split-diff-ui .m... | initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiffElement.prepend @
else
$splitdiffElement.append... | JavaScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 51 | 74 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:completion | completion | initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiffElement.prepend @
else
$splitdiffElement.append... | detached: ->
@revPopup?.remove()
_onPreviousRevClick: ->
@onPreviousRevision?.apply(@, arguments)
_onNextRevClick: ->
@onNextRevision?.apply(@, arguments) | CoffeeScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99 | 1,111 | https://github.com/littlebee/git-time-machine/blob/dd49d9d288bd6cd06a6fe1ed25b72f30e7a32c99/lib/git-rev-selector.coffee | 51 | 74 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:raw_corpus | raw_corpus | initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiffElement.prepend @
else
$splitdiffElement.append... | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1 | 1,111 | https://github.com/littlebee/git-time-machine/blob/b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1/lib/git-rev-selector.coffee | 51 | 72 | ||
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiff... | ({
initialize: function(leftOrRight, commit, onPreviousRevision, onNextRevision) {
var $splitdiffElement, ref;
this.onPreviousRevision = onPreviousRevision;
this.onNextRevision = onNextRevision;
$splitdiffElement = $(".tool-panel .split-diff-ui .mid");
$splitdiffElement.find(`.timemachine-rev-sele... | CoffeeScript | JavaScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1 | 1,111 | https://github.com/littlebee/git-time-machine/blob/b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1/lib/git-rev-selector.coffee | 51 | 72 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
initialize: function(leftOrRight, commit, onPreviousRevision, onNextRevision) {
var $splitdiffElement, ref;
this.onPreviousRevision = onPreviousRevision;
this.onNextRevision = onNextRevision;
$splitdiffElement = $(".tool-panel .split-diff-ui .m... | initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiffElement.prepend @
else
$splitdiffElement.append... | JavaScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1 | 1,111 | https://github.com/littlebee/git-time-machine/blob/b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1/lib/git-rev-selector.coffee | 51 | 72 |
littlebee/git-time-machine:lib/git-rev-selector.coffee:2:completion | completion | initialize: (leftOrRight, commit, @onPreviousRevision, @onNextRevision) ->
$splitdiffElement = $(".tool-panel .split-diff-ui .mid")
$splitdiffElement.find(".timemachine-rev-select.#{leftOrRight}-rev").remove()
if leftOrRight == 'left'
$splitdiffElement.prepend @
else
$splitdiffElement.append... | @revPopup = new GitRevSelectorPopup(commit, leftOrRight, @)
_onPreviousRevClick: ->
@onPreviousRevision?.apply(@, arguments)
_onNextRevClick: ->
@onNextRevision?.apply(@, arguments) | CoffeeScript | CoffeeScript | littlebee/git-time-machine | lib/git-rev-selector.coffee | MIT | b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1 | 1,111 | https://github.com/littlebee/git-time-machine/blob/b5b5d9c14f365f48a0568d5eba5dd02cb3b52ff1/lib/git-rev-selector.coffee | 51 | 72 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
require '../src/batch'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubA... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 4e14df19a1d7fd3747c73620648df56853902087 | 730 | https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/routes/index.coffee | 1 | 37 | ||
outsideris/popularconvention:routes/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
service = require '../src/service'
require '../src/batch'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, r... | var service;
service = require('../src/service');
require('../src/batch');
exports.index = function(req, res) {
return service.findDescription(false, function(err, desc) {
if (err != null) {
return res.send(500);
} else {
return res.render('index', {
desc: desc
});
}
});
};
... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | 4e14df19a1d7fd3747c73620648df56853902087 | 730 | https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/routes/index.coffee | 1 | 37 |
outsideris/popularconvention:routes/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var service;
service = require('../src/service');
require('../src/batch');
exports.index = function(req, res) {
return service.findDescription(false, function(err, desc) {
if (err != null) {
return res.send(500);
} else {
return res.render(... | service = require '../src/service'
require '../src/batch'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubA... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 4e14df19a1d7fd3747c73620648df56853902087 | 730 | https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/routes/index.coffee | 1 | 37 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
require '../src/batch'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubA... | res.render 'fetcharchive', { msg: 'Registred' }
exports.progressTimeline = (req, res) ->
service.progressTimeline ->
res.render 'fetcharchive', { msg: 'progressed' }
exports.summarizeScore = (req, res) ->
service.summarizeScore ->
res.render 'fetcharchive', { msg: 'summarized' }
exports.findScore = (req,... | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 4e14df19a1d7fd3747c73620648df56853902087 | 730 | https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/routes/index.coffee | 1 | 37 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 6c394c7aaf0b77d20a0a79c506db4113e53de1fb | 730 | https://github.com/outsideris/popularconvention/blob/6c394c7aaf0b77d20a0a79c506db4113e53de1fb/routes/index.coffee | 1 | 36 | ||
outsideris/popularconvention:routes/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
service = require '../src/service'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req... | var service;
service = require('../src/service');
exports.index = function(req, res) {
return service.findDescription(false, function(err, desc) {
if (err != null) {
return res.send(500);
} else {
return res.render('index', {
desc: desc
});
}
});
};
exports.fetcharchive = fu... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | 6c394c7aaf0b77d20a0a79c506db4113e53de1fb | 730 | https://github.com/outsideris/popularconvention/blob/6c394c7aaf0b77d20a0a79c506db4113e53de1fb/routes/index.coffee | 1 | 36 |
outsideris/popularconvention:routes/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var service;
service = require('../src/service');
exports.index = function(req, res) {
return service.findDescription(false, function(err, desc) {
if (err != null) {
return res.send(500);
} else {
return res.render('index', {
desc: d... | service = require '../src/service'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 6c394c7aaf0b77d20a0a79c506db4113e53de1fb | 730 | https://github.com/outsideris/popularconvention/blob/6c394c7aaf0b77d20a0a79c506db4113e53de1fb/routes/index.coffee | 1 | 36 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
exports.index = (req, res) ->
service.findDescription false, (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ... | exports.progressTimeline = (req, res) ->
service.progressTimeline ->
res.render 'fetcharchive', { msg: 'progressed' }
exports.summarizeScore = (req, res) ->
service.summarizeScore ->
res.render 'fetcharchive', { msg: 'summarized' }
exports.findScore = (req, res) ->
service.findScore req.params.lang, (er... | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 6c394c7aaf0b77d20a0a79c506db4113e53de1fb | 730 | https://github.com/outsideris/popularconvention/blob/6c394c7aaf0b77d20a0a79c506db4113e53de1fb/routes/index.coffee | 1 | 36 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
exports.index = (req, res) ->
service.findDescription (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | f07b56087ab66b18ab5102969be95f75da5268ad | 730 | https://github.com/outsideris/popularconvention/blob/f07b56087ab66b18ab5102969be95f75da5268ad/routes/index.coffee | 1 | 36 | ||
outsideris/popularconvention:routes/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
service = require '../src/service'
exports.index = (req, res) ->
service.findDescription (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.... | var service;
service = require('../src/service');
exports.index = function(req, res) {
return service.findDescription(function(err, desc) {
if (err != null) {
return res.send(500);
} else {
return res.render('index', {
desc: desc
});
}
});
};
exports.fetcharchive = function(... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | f07b56087ab66b18ab5102969be95f75da5268ad | 730 | https://github.com/outsideris/popularconvention/blob/f07b56087ab66b18ab5102969be95f75da5268ad/routes/index.coffee | 1 | 36 |
outsideris/popularconvention:routes/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var service;
service = require('../src/service');
exports.index = function(req, res) {
return service.findDescription(function(err, desc) {
if (err != null) {
return res.send(500);
} else {
return res.render('index', {
desc: desc
... | service = require '../src/service'
exports.index = (req, res) ->
service.findDescription (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | f07b56087ab66b18ab5102969be95f75da5268ad | 730 | https://github.com/outsideris/popularconvention/blob/f07b56087ab66b18ab5102969be95f75da5268ad/routes/index.coffee | 1 | 36 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
exports.index = (req, res) ->
service.findDescription (err, desc) ->
if err?
res.send 500
else
res.render 'index', {
desc: desc
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
... | exports.progressTimeline = (req, res) ->
service.progressTimeline ->
res.render 'fetcharchive', { msg: 'progressed' }
exports.summarizeScore = (req, res) ->
service.summarizeScore ->
res.render 'fetcharchive', { msg: 'summarized' }
exports.findScore = (req, res) ->
service.findScore req.params.lang, (er... | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | f07b56087ab66b18ab5102969be95f75da5268ad | 730 | https://github.com/outsideris/popularconvention/blob/f07b56087ab66b18ab5102969be95f75da5268ad/routes/index.coffee | 1 | 36 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.