id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | a5afffb1294d669638282003e04e488d8b226319 | 730 | https://github.com/outsideris/popularconvention/blob/a5afffb1294d669638282003e04e488d8b226319/routes/index.coffee | 1 | 32 | ||
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) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetc... | var service;
service = require('../src/service');
exports.index = function(req, res) {
return res.render('index', {
title: 'Express'
});
};
exports.fetcharchive = function(req, res) {
var datetime;
datetime = req.query.file;
return service.fetchGithubArchive(datetime, function(err) {
if (err != nul... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | a5afffb1294d669638282003e04e488d8b226319 | 730 | https://github.com/outsideris/popularconvention/blob/a5afffb1294d669638282003e04e488d8b226319/routes/index.coffee | 1 | 32 |
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 res.render('index', {
title: 'Express'
});
};
exports.fetcharchive = function(req, res) {
var datetime;
datetime = req.query.file;
return service.fetchGit... | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | a5afffb1294d669638282003e04e488d8b226319 | 730 | https://github.com/outsideris/popularconvention/blob/a5afffb1294d669638282003e04e488d8b226319/routes/index.coffee | 1 | 32 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
... | 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, (err, data) ->
if not err?
res.json ... | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | a5afffb1294d669638282003e04e488d8b226319 | 730 | https://github.com/outsideris/popularconvention/blob/a5afffb1294d669638282003e04e488d8b226319/routes/index.coffee | 1 | 32 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4 | 730 | https://github.com/outsideris/popularconvention/blob/8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4/routes/index.coffee | 1 | 29 | ||
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) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetc... | var service;
service = require('../src/service');
exports.index = function(req, res) {
return res.render('index', {
title: 'Express'
});
};
exports.fetcharchive = function(req, res) {
var datetime;
datetime = req.query.file;
return service.fetchGithubArchive(datetime, function(err) {
if (err != nul... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | 8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4 | 730 | https://github.com/outsideris/popularconvention/blob/8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4/routes/index.coffee | 1 | 29 |
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 res.render('index', {
title: 'Express'
});
};
exports.fetcharchive = function(req, res) {
var datetime;
datetime = req.query.file;
return service.fetchGit... | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4 | 730 | https://github.com/outsideris/popularconvention/blob/8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4/routes/index.coffee | 1 | 29 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', {
title: 'Express'
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
... | 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 | 8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4 | 730 | https://github.com/outsideris/popularconvention/blob/8399f21ea47138f6e49d4bec1f10ddd84cbdf6f4/routes/index.coffee | 1 | 29 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6 | 730 | https://github.com/outsideris/popularconvention/blob/12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6/routes/index.coffee | 1 | 34 | ||
outsideris/popularconvention:routes/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render... | var hljs, service;
service = require('../src/service');
hljs = require('highlight.js');
exports.index = function(req, res) {
var highlight1, highlight2;
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value;
highlight2 = hljs.highlight('javascript', 'key: value,').value;
ret... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | 12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6 | 730 | https://github.com/outsideris/popularconvention/blob/12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6/routes/index.coffee | 1 | 34 |
outsideris/popularconvention:routes/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var hljs, service;
service = require('../src/service');
hljs = require('highlight.js');
exports.index = function(req, res) {
var highlight1, highlight2;
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value;
highlight2 = h... | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6 | 730 | https://github.com/outsideris/popularconvention/blob/12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6/routes/index.coffee | 1 | 34 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | else
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.findSc... | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | 12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6 | 730 | https://github.com/outsideris/popularconvention/blob/12cd79fa7e3b56d34092cbbf4315a7ea4d7ba3c6/routes/index.coffee | 1 | 34 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | e779fca9bffe97d42787d561f88395c72c4342e0 | 730 | https://github.com/outsideris/popularconvention/blob/e779fca9bffe97d42787d561f88395c72c4342e0/routes/index.coffee | 1 | 27 | ||
outsideris/popularconvention:routes/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render... | var hljs, service;
service = require('../src/service');
hljs = require('highlight.js');
exports.index = function(req, res) {
var highlight1, highlight2;
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value;
highlight2 = hljs.highlight('javascript', 'key: value,').value;
ret... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | e779fca9bffe97d42787d561f88395c72c4342e0 | 730 | https://github.com/outsideris/popularconvention/blob/e779fca9bffe97d42787d561f88395c72c4342e0/routes/index.coffee | 1 | 27 |
outsideris/popularconvention:routes/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var hljs, service;
service = require('../src/service');
hljs = require('highlight.js');
exports.index = function(req, res) {
var highlight1, highlight2;
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value;
highlight2 = h... | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | e779fca9bffe97d42787d561f88395c72c4342e0 | 730 | https://github.com/outsideris/popularconvention/blob/e779fca9bffe97d42787d561f88395c72c4342e0/routes/index.coffee | 1 | 27 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
res.render 'fetcharchive', { msg: 'Registred' }
exports.progressTimeline = (req, res) ->
service.progressTimeline ->
res.render 'fetcharchive', { ... | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | e779fca9bffe97d42787d561f88395c72c4342e0 | 730 | https://github.com/outsideris/popularconvention/blob/e779fca9bffe97d42787d561f88395c72c4342e0/routes/index.coffee | 1 | 27 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | fa0712203910410e0defa199df9e2781d242d3e6 | 730 | https://github.com/outsideris/popularconvention/blob/fa0712203910410e0defa199df9e2781d242d3e6/routes/index.coffee | 1 | 19 | ||
outsideris/popularconvention:routes/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render... | var hljs, service;
service = require('../src/service');
hljs = require('highlight.js');
exports.index = function(req, res) {
var highlight1, highlight2;
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value;
highlight2 = hljs.highlight('javascript', 'key: value,').value;
ret... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | fa0712203910410e0defa199df9e2781d242d3e6 | 730 | https://github.com/outsideris/popularconvention/blob/fa0712203910410e0defa199df9e2781d242d3e6/routes/index.coffee | 1 | 19 |
outsideris/popularconvention:routes/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var hljs, service;
service = require('../src/service');
hljs = require('highlight.js');
exports.index = function(req, res) {
var highlight1, highlight2;
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value;
highlight2 = h... | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | fa0712203910410e0defa199df9e2781d242d3e6 | 730 | https://github.com/outsideris/popularconvention/blob/fa0712203910410e0defa199df9e2781d242d3e6/routes/index.coffee | 1 | 19 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
hljs = require 'highlight.js'
exports.index = (req, res) ->
highlight1 = hljs.highlight('javascript', ', key: value\nvar a = function() {};').value
highlight2 = hljs.highlight('javascript', 'key: value,').value
res.render 'index', {
title: 'Express'
highlight1: highligh... | highlight2: highlight2
}
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
res.render 'fetcharchive', { msg: 'Registred' } | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | fa0712203910410e0defa199df9e2781d242d3e6 | 730 | https://github.com/outsideris/popularconvention/blob/fa0712203910410e0defa199df9e2781d242d3e6/routes/index.coffee | 1 | 19 |
outsideris/popularconvention:routes/index.coffee:1:raw_corpus | raw_corpus | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', { title: 'Express' }
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
res.... | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | afa80ea3eb995b0e96f51dd2f08ab7472e701b51 | 730 | https://github.com/outsideris/popularconvention/blob/afa80ea3eb995b0e96f51dd2f08ab7472e701b51/routes/index.coffee | 1 | 12 | ||
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) ->
res.render 'index', { title: 'Express' }
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchi... | var service;
service = require('../src/service');
exports.index = function(req, res) {
return res.render('index', {
title: 'Express'
});
};
exports.fetcharchive = function(req, res) {
var datetime;
datetime = req.query.file;
return service.fetchGithubArchive(datetime, function(err) {
if (err != nul... | CoffeeScript | JavaScript | outsideris/popularconvention | routes/index.coffee | MIT | afa80ea3eb995b0e96f51dd2f08ab7472e701b51 | 730 | https://github.com/outsideris/popularconvention/blob/afa80ea3eb995b0e96f51dd2f08ab7472e701b51/routes/index.coffee | 1 | 12 |
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 res.render('index', {
title: 'Express'
});
};
exports.fetcharchive = function(req, res) {
var datetime;
datetime = req.query.file;
return service.fetchGit... | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', { title: 'Express' }
exports.fetcharchive = (req, res) ->
datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
res.... | JavaScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | afa80ea3eb995b0e96f51dd2f08ab7472e701b51 | 730 | https://github.com/outsideris/popularconvention/blob/afa80ea3eb995b0e96f51dd2f08ab7472e701b51/routes/index.coffee | 1 | 12 |
outsideris/popularconvention:routes/index.coffee:1:completion | completion | service = require '../src/service'
exports.index = (req, res) ->
res.render 'index', { title: 'Express' }
exports.fetcharchive = (req, res) -> | datetime = req.query.file
service.fetchGithubArchive datetime, (err) ->
if err?
res.render 'fetcharchive', { msg: 'Something is wrong!!!' }
else
res.render 'fetcharchive', { msg: 'Registred' } | CoffeeScript | CoffeeScript | outsideris/popularconvention | routes/index.coffee | MIT | afa80ea3eb995b0e96f51dd2f08ab7472e701b51 | 730 | https://github.com/outsideris/popularconvention/blob/afa80ea3eb995b0e96f51dd2f08ab7472e701b51/routes/index.coffee | 1 | 12 |
jianliaoim/talk-os:talk-web/client/fullstory.coffee:1:raw_corpus | raw_corpus | eventBus = require './event-bus'
eventBus.once 'fullstory', (user) ->
if window.FS?
window.FS.identify user._id,
displayName: user.name | CoffeeScript | jianliaoim/talk-os | talk-web/client/fullstory.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/fullstory.coffee | 1 | 6 | ||
jianliaoim/talk-os:talk-web/client/fullstory.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
eventBus = require './event-bus'
eventBus.once 'fullstory', (user) ->
if window.FS?
window.FS.identify user._id,
displayName: user.name
``` | var eventBus;
eventBus = require('./event-bus');
eventBus.once('fullstory', function(user) {
if (window.FS != null) {
return window.FS.identify(user._id, {
displayName: user.name
});
}
}); | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/fullstory.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/fullstory.coffee | 1 | 6 |
jianliaoim/talk-os:talk-web/client/fullstory.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var eventBus;
eventBus = require('./event-bus');
eventBus.once('fullstory', function(user) {
if (window.FS != null) {
return window.FS.identify(user._id, {
displayName: user.name
});
}
});
``` | eventBus = require './event-bus'
eventBus.once 'fullstory', (user) ->
if window.FS?
window.FS.identify user._id,
displayName: user.name | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/fullstory.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/fullstory.coffee | 1 | 6 |
jianliaoim/talk-os:talk-web/client/fullstory.coffee:1:completion | completion | eventBus = require './event-bus'
eventBus.once 'fullstory', (user) -> | if window.FS?
window.FS.identify user._id,
displayName: user.name | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/fullstory.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/fullstory.coffee | 1 | 6 |
JoelBesada/activate-power-mode:lib/effect-list.coffee:1:raw_corpus | raw_corpus | SelectListView = require "atom-select-list"
module.exports =
init: (effectRegistry) ->
@effectRegistry = effectRegistry
@selectListView = new SelectListView({
emptyMessage: 'No effects in the registry.',
itemsClassList: ['mark-active'],
items: [],
filterKeyForItem: (item) -> item.titl... | CoffeeScript | JoelBesada/activate-power-mode | lib/effect-list.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect-list.coffee | 1 | 50 | ||
JoelBesada/activate-power-mode:lib/effect-list.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
SelectListView = require "atom-select-list"
module.exports =
init: (effectRegistry) ->
@effectRegistry = effectRegistry
@selectListView = new SelectListView({
emptyMessage: 'No effects in the registry.',
itemsClassList: ['mark-active'],
... | var SelectListView;
SelectListView = require("atom-select-list");
module.exports = {
init: function(effectRegistry) {
this.effectRegistry = effectRegistry;
this.selectListView = new SelectListView({
emptyMessage: 'No effects in the registry.',
itemsClassList: ['mark-active'],
items: [],
... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/effect-list.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect-list.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/effect-list.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var SelectListView;
SelectListView = require("atom-select-list");
module.exports = {
init: function(effectRegistry) {
this.effectRegistry = effectRegistry;
this.selectListView = new SelectListView({
emptyMessage: 'No effects in the registry.',
... | SelectListView = require "atom-select-list"
module.exports =
init: (effectRegistry) ->
@effectRegistry = effectRegistry
@selectListView = new SelectListView({
emptyMessage: 'No effects in the registry.',
itemsClassList: ['mark-active'],
items: [],
filterKeyForItem: (item) -> item.titl... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect-list.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect-list.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/effect-list.coffee:1:completion | completion | SelectListView = require "atom-select-list"
module.exports =
init: (effectRegistry) ->
@effectRegistry = effectRegistry
@selectListView = new SelectListView({
emptyMessage: 'No effects in the registry.',
itemsClassList: ['mark-active'],
items: [],
filterKeyForItem: (item) -> item.titl... | @selectListView.element.classList.add('effect-list')
dispose: ->
@cancel()
@selectListView.destroy()
cancel: ->
if @panel?
@panel.destroy()
@panel = null
@currentEffect = null
if @previouslyFocusedElement
@previouslyFocusedElement.focus()
@previouslyFocusedElement = null
... | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect-list.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect-list.coffee | 1 | 50 |
JoelBesada/activate-power-mode:lib/effect-list.coffee:2:raw_corpus | raw_corpus | else
@currentEffect = @effectRegistry.effect
effects = []
for code, effect of @effectRegistry.effects
effects.push({
code: code,
effect: effect,
title: if effect.title then effect.title else code,
description: effect.description
image: effect.i... | CoffeeScript | JoelBesada/activate-power-mode | lib/effect-list.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect-list.coffee | 51 | 63 | ||
JoelBesada/activate-power-mode:lib/effect-list.coffee:2:completion | completion | else
@currentEffect = @effectRegistry.effect
effects = []
for code, effect of @effectRegistry.effects
effects.push({
code: code, | effect: effect,
title: if effect.title then effect.title else code,
description: effect.description
image: effect.image
})
@selectListView.update({items: effects})
@attach() | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/effect-list.coffee | MIT | ac060c2476ba8b323ca932eda97da9bc0c051b34 | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/ac060c2476ba8b323ca932eda97da9bc0c051b34/lib/effect-list.coffee | 51 | 63 |
jianliaoim/talk-os:talk-account/client/app/forcebind-thirdparty.coffee:1:raw_corpus | raw_corpus | React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, button, input, a} = React.DOM
module.exports = React.createClass
displayName: 'bind-thirdparty'
pro... | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/forcebind-thirdparty.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/forcebind-thirdparty.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-account/client/app/forcebind-thirdparty.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, button, input, a} = React.DOM
module.exports = ... | var Immutable, React, Space, a, ajax, button, controllers, div, input, locales;
React = require('react');
Immutable = require('immutable');
ajax = require('../ajax');
locales = require('../locales');
controllers = require('../controllers');
Space = React.createFactory(require('react-lite-space'));
({div, button,... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/client/app/forcebind-thirdparty.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/forcebind-thirdparty.coffee | 1 | 50 |
jianliaoim/talk-os:talk-account/client/app/forcebind-thirdparty.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Immutable, React, Space, a, ajax, button, controllers, div, input, locales;
React = require('react');
Immutable = require('immutable');
ajax = require('../ajax');
locales = require('../locales');
controllers = require('../controllers');
Space = React.crea... | React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, button, input, a} = React.DOM
module.exports = React.createClass
displayName: 'bind-thirdparty'
pro... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/forcebind-thirdparty.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/forcebind-thirdparty.coffee | 1 | 50 |
jianliaoim/talk-os:talk-account/client/app/forcebind-thirdparty.coffee:1:completion | completion | React = require 'react'
Immutable = require 'immutable'
ajax = require '../ajax'
locales = require '../locales'
controllers = require '../controllers'
Space = React.createFactory require 'react-lite-space'
{div, button, input, a} = React.DOM
module.exports = React.createClass
displayName: 'bind-thirdparty'
pro... | data:
bindCode: @props.bindCode
success: (resp) =>
controllers.signInRedirect()
error: (err) =>
error = JSON.parse err.response
console.log error
onCancel: ->
controllers.signInRedirect()
render: ->
guideText = locales.get('unionAlreayBoundWhetherForceBind', @pr... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/forcebind-thirdparty.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/forcebind-thirdparty.coffee | 1 | 50 |
jianliaoim/talk-os:talk-account/client/app/forcebind-thirdparty.coffee:2:raw_corpus | raw_corpus | Space height: 15
button className: 'button is-default', onClick: @onCancel,
locales.get('cancel', @props.language) | CoffeeScript | jianliaoim/talk-os | talk-account/client/app/forcebind-thirdparty.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/app/forcebind-thirdparty.coffee | 51 | 53 | ||
linemanjs/lineman:tasks/fetch.coffee:1:raw_corpus | raw_corpus | linemanFetch = require('./../lib/cli/lineman-fetch')
module.exports = (grunt) ->
grunt.registerTask "fetch", "invoke `lineman fetch` as part of your build", (recipeNames...) ->
linemanFetch(recipeNames, @async()) | CoffeeScript | linemanjs/lineman | tasks/fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/fetch.coffee | 1 | 5 | ||
linemanjs/lineman:tasks/fetch.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
linemanFetch = require('./../lib/cli/lineman-fetch')
module.exports = (grunt) ->
grunt.registerTask "fetch", "invoke `lineman fetch` as part of your build", (recipeNames...) ->
linemanFetch(recipeNames, @async())
``` | var linemanFetch;
linemanFetch = require('./../lib/cli/lineman-fetch');
module.exports = function(grunt) {
return grunt.registerTask("fetch", "invoke `lineman fetch` as part of your build", function(...recipeNames) {
return linemanFetch(recipeNames, this.async());
});
}; | CoffeeScript | JavaScript | linemanjs/lineman | tasks/fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/fetch.coffee | 1 | 5 |
linemanjs/lineman:tasks/fetch.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var linemanFetch;
linemanFetch = require('./../lib/cli/lineman-fetch');
module.exports = function(grunt) {
return grunt.registerTask("fetch", "invoke `lineman fetch` as part of your build", function(...recipeNames) {
return linemanFetch(recipeNames, this.as... | linemanFetch = require('./../lib/cli/lineman-fetch')
module.exports = (grunt) ->
grunt.registerTask "fetch", "invoke `lineman fetch` as part of your build", (recipeNames...) ->
linemanFetch(recipeNames, @async()) | JavaScript | CoffeeScript | linemanjs/lineman | tasks/fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/fetch.coffee | 1 | 5 |
linemanjs/lineman:tasks/fetch.coffee:1:completion | completion | linemanFetch = require('./../lib/cli/lineman-fetch') | module.exports = (grunt) ->
grunt.registerTask "fetch", "invoke `lineman fetch` as part of your build", (recipeNames...) ->
linemanFetch(recipeNames, @async()) | CoffeeScript | CoffeeScript | linemanjs/lineman | tasks/fetch.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/tasks/fetch.coffee | 1 | 5 |
jianliaoim/talk-os:talk-api2x/test/servers/account.coffee:1:raw_corpus | raw_corpus | express = require 'express'
module.exports = app = express()
app.get '/v1/user/get', (req, res) ->
accountToken = req.query['accountToken']
accountToken.should.eql 'OKKKKKKK'
data =
_id: '55f7d19c85efe377996a1232'
unions:
[
refer: 'teambition'
openId: '55f7d19c85efe377996a1231'
... | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/servers/account.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/account.coffee | 1 | 26 | ||
jianliaoim/talk-os:talk-api2x/test/servers/account.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
express = require 'express'
module.exports = app = express()
app.get '/v1/user/get', (req, res) ->
accountToken = req.query['accountToken']
accountToken.should.eql 'OKKKKKKK'
data =
_id: '55f7d19c85efe377996a1232'
unions:
[
refer: '... | var app, express;
express = require('express');
module.exports = app = express();
app.get('/v1/user/get', function(req, res) {
var accountToken, data;
accountToken = req.query['accountToken'];
accountToken.should.eql('OKKKKKKK');
data = {
_id: '55f7d19c85efe377996a1232',
unions: [
{
ref... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/test/servers/account.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/account.coffee | 1 | 26 |
jianliaoim/talk-os:talk-api2x/test/servers/account.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var app, express;
express = require('express');
module.exports = app = express();
app.get('/v1/user/get', function(req, res) {
var accountToken, data;
accountToken = req.query['accountToken'];
accountToken.should.eql('OKKKKKKK');
data = {
_id: '55f7d... | express = require 'express'
module.exports = app = express()
app.get '/v1/user/get', (req, res) ->
accountToken = req.query['accountToken']
accountToken.should.eql 'OKKKKKKK'
data =
_id: '55f7d19c85efe377996a1232'
unions:
[
refer: 'teambition'
openId: '55f7d19c85efe377996a1231'
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/servers/account.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/account.coffee | 1 | 26 |
jianliaoim/talk-os:talk-api2x/test/servers/account.coffee:1:completion | completion | express = require 'express'
module.exports = app = express()
app.get '/v1/user/get', (req, res) ->
accountToken = req.query['accountToken']
accountToken.should.eql 'OKKKKKKK'
data =
_id: '55f7d19c85efe377996a1232'
unions:
[
refer: 'teambition' | openId: '55f7d19c85efe377996a1231'
accessToken: 'afasdfasdfas'
showname: 'Teambition'
avatarUrl: 'www.project.ci/striker/png1'
,
refer: 'github'
openId: '55f7d19c85efe377996a1233'
accessToken: 'helloworld'
showname: 'github'
avatarUrl: 'www.project.c... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/servers/account.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/account.coffee | 1 | 26 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:1:raw_corpus | raw_corpus | describe 'claimDevice', ->
beforeEach ->
@oldUpdateDevice = sinon.stub()
@canConfigure = sinon.stub()
@getDeviceWithToken = sinon.stub()
@canConfigure.yields null, true
@dependencies = {oldUpdateDevice: @oldUpdateDevice, canConfigure: @canConfigure, getDeviceWithToken: @getDeviceWithToken}
... | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 1 | 49 | ||
octoblu/meshblu:test/lib/claimDevice-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'claimDevice', ->
beforeEach ->
@oldUpdateDevice = sinon.stub()
@canConfigure = sinon.stub()
@getDeviceWithToken = sinon.stub()
@canConfigure.yields null, true
@dependencies = {oldUpdateDevice: @oldUpdateDevice, canConfigure: @ca... | describe('claimDevice', function() {
beforeEach(function() {
this.oldUpdateDevice = sinon.stub();
this.canConfigure = sinon.stub();
this.getDeviceWithToken = sinon.stub();
this.canConfigure.yields(null, true);
this.dependencies = {
oldUpdateDevice: this.oldUpdateDevice,
canConfigure: t... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 1 | 49 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('claimDevice', function() {
beforeEach(function() {
this.oldUpdateDevice = sinon.stub();
this.canConfigure = sinon.stub();
this.getDeviceWithToken = sinon.stub();
this.canConfigure.yields(null, true);
this.dependencies = {
oldUp... | describe 'claimDevice', ->
beforeEach ->
@oldUpdateDevice = sinon.stub()
@canConfigure = sinon.stub()
@getDeviceWithToken = sinon.stub()
@canConfigure.yields null, true
@dependencies = {oldUpdateDevice: @oldUpdateDevice, canConfigure: @canConfigure, getDeviceWithToken: @getDeviceWithToken}
... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 1 | 49 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:1:completion | completion | describe 'claimDevice', ->
beforeEach ->
@oldUpdateDevice = sinon.stub()
@canConfigure = sinon.stub()
@getDeviceWithToken = sinon.stub()
@canConfigure.yields null, true
@dependencies = {oldUpdateDevice: @oldUpdateDevice, canConfigure: @canConfigure, getDeviceWithToken: @getDeviceWithToken}
... | it 'should callback with an error', ->
expect(@error).to.exist
describe 'when called with a bunch of something', ->
beforeEach (done) ->
@fromDevice = {uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'}
@device = {uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa'}
@getDeviceWithToken.yields nu... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 1 | 49 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:2:raw_corpus | raw_corpus | describe 'when called with params other than uuid', ->
beforeEach (done) ->
@fromDevice = {uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'}
@device = {uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa', name: 'Cookie Crisp'}
@getDeviceWithToken.yields null, {name: 'Cookie Crisp', uuid: '07a4ed85-acc5-... | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 51 | 95 | ||
octoblu/meshblu:test/lib/claimDevice-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'when called with params other than uuid', ->
beforeEach (done) ->
@fromDevice = {uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'}
@device = {uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa', name: 'Cookie Crisp'}
@getDeviceWithToken.... | describe('when called with params other than uuid', function() {
beforeEach(function(done) {
this.fromDevice = {
uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'
};
this.device = {
uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa',
name: 'Cookie Crisp'
};
this.getDeviceWithToken.yields(nu... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 51 | 95 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('when called with params other than uuid', function() {
beforeEach(function(done) {
this.fromDevice = {
uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'
};
this.device = {
uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa',
name: 'Coo... | describe 'when called with params other than uuid', ->
beforeEach (done) ->
@fromDevice = {uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'}
@device = {uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa', name: 'Cookie Crisp'}
@getDeviceWithToken.yields null, {name: 'Cookie Crisp', uuid: '07a4ed85-acc5-... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 51 | 95 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:2:completion | completion | describe 'when called with params other than uuid', ->
beforeEach (done) ->
@fromDevice = {uuid: '89e9cd5f-dfff-4771-b821-d35614b7a506'}
@device = {uuid: '07a4ed85-acc5-4495-b3d7-2d93439c04fa', name: 'Cookie Crisp'}
@getDeviceWithToken.yields null, {name: 'Cookie Crisp', uuid: '07a4ed85-acc5-... | describe 'when called with an owner param', ->
beforeEach (done) ->
@fromDevice = {uuid: 'e33c1844-6888-4698-852a-7be584327a1d'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops', owner: 'wrong'}
@getDeviceWithToken.yields null, {name: 'Fruit Loops', uuid: '9b97159e... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 51 | 95 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:raw_corpus | raw_corpus | describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => done()
@canConfigure.yields null, false
@get... | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 97 | 133 | ||
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => ... | describe('when called by an unauthorized user', function() {
beforeEach(function(done) {
var storeError;
this.fromDevice = {
uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'
};
this.device = {
uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9',
name: 'Fruit Loops'
};
storeError = (erro... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 97 | 133 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('when called by an unauthorized user', function() {
beforeEach(function(done) {
var storeError;
this.fromDevice = {
uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'
};
this.device = {
uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9',
... | describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => done()
@canConfigure.yields null, false
@get... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 97 | 133 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:completion | completion | describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => done()
@canConfigure.yields null, false
@get... | it 'should not call oldUpdateDevice with that uuid and name', ->
expect(@oldUpdateDevice).not.to.have.been.called
it 'should call the callback with an error', ->
expect(@error).to.exist
describe 'when called', ->
beforeEach (done) ->
fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d7... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 8a7441943c4e38c0e1907e98084cee16c7705c25 | 815 | https://github.com/octoblu/meshblu/blob/8a7441943c4e38c0e1907e98084cee16c7705c25/test/lib/claimDevice-spec.coffee | 97 | 133 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:raw_corpus | raw_corpus | describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => done()
@canConfigure.yields null, false
@get... | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 6c6af069bb29f9ffd0684eb6e519011774bf6579 | 815 | https://github.com/octoblu/meshblu/blob/6c6af069bb29f9ffd0684eb6e519011774bf6579/test/lib/claimDevice-spec.coffee | 97 | 133 | ||
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => ... | describe('when called by an unauthorized user', function() {
beforeEach(function(done) {
var storeError;
this.fromDevice = {
uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'
};
this.device = {
uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9',
name: 'Fruit Loops'
};
storeError = (erro... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 6c6af069bb29f9ffd0684eb6e519011774bf6579 | 815 | https://github.com/octoblu/meshblu/blob/6c6af069bb29f9ffd0684eb6e519011774bf6579/test/lib/claimDevice-spec.coffee | 97 | 133 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('when called by an unauthorized user', function() {
beforeEach(function(done) {
var storeError;
this.fromDevice = {
uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'
};
this.device = {
uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9',
... | describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => done()
@canConfigure.yields null, false
@get... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 6c6af069bb29f9ffd0684eb6e519011774bf6579 | 815 | https://github.com/octoblu/meshblu/blob/6c6af069bb29f9ffd0684eb6e519011774bf6579/test/lib/claimDevice-spec.coffee | 97 | 133 |
octoblu/meshblu:test/lib/claimDevice-spec.coffee:3:completion | completion | describe 'when called by an unauthorized user', ->
beforeEach (done) ->
@fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d76'}
@device = {uuid: '9b97159e-63c2-4a71-9327-8fadad97f1e9', name: 'Fruit Loops'}
storeError = (@error) => done()
@canConfigure.yields null, false
@get... | it 'should not call oldUpdateDevice with that uuid and name', ->
expect(@oldUpdateDevice).not.to.have.been.called
it 'should call the callback with an error', ->
expect(@error).to.exist
describe 'when called', ->
beforeEach (done) ->
fromDevice = {uuid: '1267b0fe-407a-4872-b09d-dd4853d59d7... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/claimDevice-spec.coffee | MIT | 6c6af069bb29f9ffd0684eb6e519011774bf6579 | 815 | https://github.com/octoblu/meshblu/blob/6c6af069bb29f9ffd0684eb6e519011774bf6579/test/lib/claimDevice-spec.coffee | 97 | 133 |
mojs/mojs:spec/shapes/circle.coffee:1:raw_corpus | raw_corpus | Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
expect(circle instanceof Bit).toBe(true)
describe '_draw m... | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 1 | 50 | ||
mojs/mojs:spec/shapes/circle.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
exp... | var Bit, Circle, circle, ns, svg;
Circle = mojs.shapesMap.getShape('circle');
Bit = mojs.shapesMap.getShape('bit');
ns = 'http://www.w3.org/2000/svg';
svg = typeof document.createElementNS === "function" ? document.createElementNS(ns, "svg") : void 0;
circle = new Circle({
ctx: svg
});
describe('Circle ->', fun... | CoffeeScript | JavaScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 1 | 50 |
mojs/mojs:spec/shapes/circle.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Bit, Circle, circle, ns, svg;
Circle = mojs.shapesMap.getShape('circle');
Bit = mojs.shapesMap.getShape('bit');
ns = 'http://www.w3.org/2000/svg';
svg = typeof document.createElementNS === "function" ? document.createElementNS(ns, "svg") : void 0;
circle =... | Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
expect(circle instanceof Bit).toBe(true)
describe '_draw m... | JavaScript | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 1 | 50 |
mojs/mojs:spec/shapes/circle.coffee:1:completion | completion | Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
expect(circle instanceof Bit).toBe(true)
describe '_draw m... | expect(ry).toBe('35')
expect(cx).toBe('50')
expect(cy).toBe('50')
it 'should fallback to radius', ->
svg = document.createElementNS?(ns, "svg")
circle = new Circle
radius: 20
radiusY: 35
circle._draw()
rx = circle.el.getAttribute('rx')
ry = circle.el... | CoffeeScript | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 1 | 50 |
mojs/mojs:spec/shapes/circle.coffee:2:raw_corpus | raw_corpus | it 'should calculate total length of the path', ->
radius = 100
bit = new Circle
ctx: document.createElementNS ns, 'svg'
radius: radius
expect(bit._getLength()).toBe 2*Math.PI*radius
it 'should calculate total length of the with different radiusX/Y', ->
radiusX = 100
... | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 51 | 66 | ||
mojs/mojs:spec/shapes/circle.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'should calculate total length of the path', ->
radius = 100
bit = new Circle
ctx: document.createElementNS ns, 'svg'
radius: radius
expect(bit._getLength()).toBe 2*Math.PI*radius
it 'should calculate total length of t... | it('should calculate total length of the path', function() {
var bit, radius;
radius = 100;
bit = new Circle({
ctx: document.createElementNS(ns, 'svg'),
radius: radius
});
return expect(bit._getLength()).toBe(2 * Math.PI * radius);
});
it('should calculate total length of the with different radiusX/Y... | CoffeeScript | JavaScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 51 | 66 |
mojs/mojs:spec/shapes/circle.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should calculate total length of the path', function() {
var bit, radius;
radius = 100;
bit = new Circle({
ctx: document.createElementNS(ns, 'svg'),
radius: radius
});
return expect(bit._getLength()).toBe(2 * Math.PI * radius);
});
it('should... | it 'should calculate total length of the path', ->
radius = 100
bit = new Circle
ctx: document.createElementNS ns, 'svg'
radius: radius
expect(bit._getLength()).toBe 2*Math.PI*radius
it 'should calculate total length of the with different radiusX/Y', ->
radiusX = 100
... | JavaScript | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 51 | 66 |
mojs/mojs:spec/shapes/circle.coffee:2:completion | completion | it 'should calculate total length of the path', ->
radius = 100
bit = new Circle
ctx: document.createElementNS ns, 'svg'
radius: radius
expect(bit._getLength()).toBe 2*Math.PI*radius
it 'should calculate total length of the with different radiusX/Y', -> | radiusX = 100
radiusY = 50
bit = new Circle
ctx: document.createElementNS ns, 'svg'
radiusX: radiusX
radiusY: radiusY
sqrt = Math.sqrt (radiusX*radiusX + radiusY*radiusY)/2
expect(bit._getLength()).toBe 2*Math.PI*sqrt | CoffeeScript | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/spec/shapes/circle.coffee | 51 | 66 |
mojs/mojs:spec/shapes/circle.coffee:1:raw_corpus | raw_corpus | Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
expect(circle instanceof Bit).toBe(true)
describe '_draw m... | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 768850a20165488e3098a3003b153e905266dac8 | 18,698 | https://github.com/mojs/mojs/blob/768850a20165488e3098a3003b153e905266dac8/spec/shapes/circle.coffee | 1 | 50 | ||
mojs/mojs:spec/shapes/circle.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
exp... | var Bit, Circle, circle, ns, svg;
Circle = mojs.shapesMap.getShape('circle');
Bit = mojs.shapesMap.getShape('bit');
ns = 'http://www.w3.org/2000/svg';
svg = typeof document.createElementNS === "function" ? document.createElementNS(ns, "svg") : void 0;
circle = new Circle({
ctx: svg
});
describe('Circle ->', fun... | CoffeeScript | JavaScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 768850a20165488e3098a3003b153e905266dac8 | 18,698 | https://github.com/mojs/mojs/blob/768850a20165488e3098a3003b153e905266dac8/spec/shapes/circle.coffee | 1 | 50 |
mojs/mojs:spec/shapes/circle.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Bit, Circle, circle, ns, svg;
Circle = mojs.shapesMap.getShape('circle');
Bit = mojs.shapesMap.getShape('bit');
ns = 'http://www.w3.org/2000/svg';
svg = typeof document.createElementNS === "function" ? document.createElementNS(ns, "svg") : void 0;
circle =... | Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
expect(circle instanceof Bit).toBe(true)
describe '_draw m... | JavaScript | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 768850a20165488e3098a3003b153e905266dac8 | 18,698 | https://github.com/mojs/mojs/blob/768850a20165488e3098a3003b153e905266dac8/spec/shapes/circle.coffee | 1 | 50 |
mojs/mojs:spec/shapes/circle.coffee:1:completion | completion | Circle = mojs.shapesMap.getShape('circle')
Bit = mojs.shapesMap.getShape('bit')
ns = 'http://www.w3.org/2000/svg'
svg = document.createElementNS?(ns, "svg")
circle = new Circle ctx: svg
describe 'Circle ->', ->
it 'should extend Bit', ->
expect(circle instanceof Bit).toBe(true)
describe '_draw m... | expect(ry).toBe('35')
expect(cx).toBe('50')
expect(cy).toBe('50')
it 'should fallback to radius', ->
svg = document.createElementNS?(ns, "svg")
circle = new Circle
radius: 20
radiusY: 35
circle._draw()
rx = circle.el.getAttribute('rx')
ry = circle.el... | CoffeeScript | CoffeeScript | mojs/mojs | spec/shapes/circle.coffee | MIT | 768850a20165488e3098a3003b153e905266dac8 | 18,698 | https://github.com/mojs/mojs/blob/768850a20165488e3098a3003b153e905266dac8/spec/shapes/circle.coffee | 1 | 50 |
gss/engine:src/types/Easing.coffee:1:raw_corpus | raw_corpus | Command = require '../commands/Variable'
class Easing extends Command
constructor: (obj) ->
if typeof obj == 'string'
if obj = @Type.Timings[obj]
return obj
else if obj[0] == 'steps' || obj[0] == 'cubic-bezier'
return obj
@define
'ease': ['cubic-bezier', .42, 0, 1, 1]
... | CoffeeScript | gss/engine | src/types/Easing.coffee | MIT | e0d31eda3ebf8554204221731fbcfaa35d711a39 | 2,854 | https://github.com/gss/engine/blob/e0d31eda3ebf8554204221731fbcfaa35d711a39/src/types/Easing.coffee | 1 | 20 | ||
gss/engine:src/types/Easing.coffee:1:completion | completion | Command = require '../commands/Variable'
class Easing extends Command
constructor: (obj) ->
if typeof obj == 'string'
if obj = @Type.Timings[obj]
return obj
else if obj[0] == 'steps' || obj[0] == 'cubic-bezier'
return obj | @define
'ease': ['cubic-bezier', .42, 0, 1, 1]
'ease-in': ['cubic-bezier', .42, 0, 1, 1]
'ease-out': ['cubic-bezier', 0, 0, .58, 1]
'ease-in-out': ['cubic-bezier', .42, 0, .58, 1]
'linear': ['cubic-bezier', 0, 0, 1, 1]
'step-start': 'step-start'
'step-end': '... | CoffeeScript | CoffeeScript | gss/engine | src/types/Easing.coffee | MIT | e0d31eda3ebf8554204221731fbcfaa35d711a39 | 2,854 | https://github.com/gss/engine/blob/e0d31eda3ebf8554204221731fbcfaa35d711a39/src/types/Easing.coffee | 1 | 20 |
gss/engine:src/types/Easing.coffee:1:raw_corpus | raw_corpus | Command = require '../commands/Variable'
class Easing extends Command
@condition: (obj) ->
if typeof obj == 'string'
if obj = @Type.Timings[obj]
return obj
else if obj[0] == 'steps' || obj[0] == 'cubic-bezier'
return obj
@define
'ease': ['cubic-bezier', .42, 0, 1, 1]
'... | CoffeeScript | gss/engine | src/types/Easing.coffee | MIT | d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0 | 2,854 | https://github.com/gss/engine/blob/d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0/src/types/Easing.coffee | 1 | 20 | ||
gss/engine:src/types/Easing.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Command = require '../commands/Variable'
class Easing extends Command
@condition: (obj) ->
if typeof obj == 'string'
if obj = @Type.Timings[obj]
return obj
else if obj[0] == 'steps' || obj[0] == 'cubic-bezier'
return obj
@define
... | var Command, Easing;
Command = require('../commands/Variable');
Easing = (function() {
class Easing extends Command {
static condition(obj) {
if (typeof obj === 'string') {
if (obj = this.Type.Timings[obj]) {
return obj;
}
} else if (obj[0] === 'steps' || obj[0] === 'cubic-... | CoffeeScript | JavaScript | gss/engine | src/types/Easing.coffee | MIT | d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0 | 2,854 | https://github.com/gss/engine/blob/d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0/src/types/Easing.coffee | 1 | 20 |
gss/engine:src/types/Easing.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Command, Easing;
Command = require('../commands/Variable');
Easing = (function() {
class Easing extends Command {
static condition(obj) {
if (typeof obj === 'string') {
if (obj = this.Type.Timings[obj]) {
return obj;
}
... | Command = require '../commands/Variable'
class Easing extends Command
@condition: (obj) ->
if typeof obj == 'string'
if obj = @Type.Timings[obj]
return obj
else if obj[0] == 'steps' || obj[0] == 'cubic-bezier'
return obj
@define
'ease': ['cubic-bezier', .42, 0, 1, 1]
'... | JavaScript | CoffeeScript | gss/engine | src/types/Easing.coffee | MIT | d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0 | 2,854 | https://github.com/gss/engine/blob/d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0/src/types/Easing.coffee | 1 | 20 |
gss/engine:src/types/Easing.coffee:1:completion | completion | Command = require '../commands/Variable'
class Easing extends Command
@condition: (obj) ->
if typeof obj == 'string'
if obj = @Type.Timings[obj]
return obj
else if obj[0] == 'steps' || obj[0] == 'cubic-bezier'
return obj | @define
'ease': ['cubic-bezier', .42, 0, 1, 1]
'ease-in': ['cubic-bezier', .42, 0, 1, 1]
'ease-out': ['cubic-bezier', 0, 0, .58, 1]
'ease-in-out': ['cubic-bezier', .42, 0, .58, 1]
'linear': ['cubic-bezier', 0, 0, 1, 1]
'step-start': 'step-start'
'step-end': '... | CoffeeScript | CoffeeScript | gss/engine | src/types/Easing.coffee | MIT | d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0 | 2,854 | https://github.com/gss/engine/blob/d3a6c74b85e6d12a9ec02c24fef87d4c22bd9cb0/src/types/Easing.coffee | 1 | 20 |
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:1:raw_corpus | raw_corpus | should = require 'should'
async = require 'async'
limbo = require 'limbo'
db = limbo.use 'talk'
{NoticeModel} = db
app = require '../../app'
{prepare, clear, request} = app
_createNotice = (callback) ->
options =
method: 'post'
url: 'cms/notices'
body: JSON.stringify
_sessionUserId: app.user1._id
... | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
should = require 'should'
async = require 'async'
limbo = require 'limbo'
db = limbo.use 'talk'
{NoticeModel} = db
app = require '../../app'
{prepare, clear, request} = app
_createNotice = (callback) ->
options =
method: 'post'
url: 'cms/notices'
b... | var NoticeModel, _createNotice, app, async, clear, db, limbo, prepare, request, should;
should = require('should');
async = require('async');
limbo = require('limbo');
db = limbo.use('talk');
({NoticeModel} = db);
app = require('../../app');
({prepare, clear, request} = app);
_createNotice = function(callback) ... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NoticeModel, _createNotice, app, async, clear, db, limbo, prepare, request, should;
should = require('should');
async = require('async');
limbo = require('limbo');
db = limbo.use('talk');
({NoticeModel} = db);
app = require('../../app');
({prepare, clear... | should = require 'should'
async = require 'async'
limbo = require 'limbo'
db = limbo.use 'talk'
{NoticeModel} = db
app = require '../../app'
{prepare, clear, request} = app
_createNotice = (callback) ->
options =
method: 'post'
url: 'cms/notices'
body: JSON.stringify
_sessionUserId: app.user1._id
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:1:completion | completion | should = require 'should'
async = require 'async'
limbo = require 'limbo'
db = limbo.use 'talk'
{NoticeModel} = db
app = require '../../app'
{prepare, clear, request} = app
_createNotice = (callback) ->
options =
method: 'post'
url: 'cms/notices'
body: JSON.stringify
_sessionUserId: app.user1._id
... | notice.should.have.properties 'content', 'postAt'
done err
after clear
describe 'cms/notice#update', ->
before (done) ->
async.auto
prepare: prepare
createNotice: ['prepare', (callback) ->
_createNotice (err, res, notice) ->
app.notice = notice
callback err
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 1 | 50 |
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:2:raw_corpus | raw_corpus | _sessionUserId: app.user1._id
content: 'Two'
request options, (err, res, notice) ->
notice.content.should.eql 'Two'
done err
after clear | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 51 | 57 | ||
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_sessionUserId: app.user1._id
content: 'Two'
request options, (err, res, notice) ->
notice.content.should.eql 'Two'
done err
after clear
``` | ({
_sessionUserId: app.user1._id({
content: 'Two'
})
});
request(options, function(err, res, notice) {
notice.content.should.eql('Two');
return done(err);
});
after(clear); | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 51 | 57 |
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
_sessionUserId: app.user1._id({
content: 'Two'
})
});
request(options, function(err, res, notice) {
notice.content.should.eql('Two');
return done(err);
});
after(clear);
``` | _sessionUserId: app.user1._id
content: 'Two'
request options, (err, res, notice) ->
notice.content.should.eql 'Two'
done err
after clear | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 51 | 57 |
jianliaoim/talk-os:talk-api2x/test/controllers/cms/notice.coffee:2:completion | completion | _sessionUserId: app.user1._id
content: 'Two'
request options, (err, res, notice) -> | notice.content.should.eql 'Two'
done err
after clear | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/controllers/cms/notice.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/cms/notice.coffee | 51 | 57 |
cdglabs/apparatus:src/Storage/Serializer.coffee:1:raw_corpus | raw_corpus | module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
# Serialization
# ======================================... | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 5 | 54 | ||
cdglabs/apparatus:src/Storage/Serializer.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
#... | var Serializer,
hasProp = {}.hasOwnProperty;
module.exports = Serializer = class Serializer {
constructor(builtInObjects) {
var i, id, len, object;
this.builtIn = {};
for (i = 0, len = builtInObjects.length; i < len; i++) {
object = builtInObjects[i];
id = Util.getId(object);
this.bui... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 5 | 54 |
cdglabs/apparatus:src/Storage/Serializer.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Serializer,
hasProp = {}.hasOwnProperty;
module.exports = Serializer = class Serializer {
constructor(builtInObjects) {
var i, id, len, object;
this.builtIn = {};
for (i = 0, len = builtInObjects.length; i < len; i++) {
object = builtInOb... | module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
# Serialization
# ======================================... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 5 | 54 |
cdglabs/apparatus:src/Storage/Serializer.coffee:1:completion | completion | module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
# Serialization
# ======================================... | return jsonifyArray(value)
else if _.isObject(value)
return referenceTo(value)
else
return value
jsonifyArray = (array) =>
return (jsonifyValue(childValue) for childValue in array)
referenceTo = (object) =>
id = Util.getId(object)
if !@builtIn[id] and !objects[id]... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 5 | 54 |
cdglabs/apparatus:src/Storage/Serializer.coffee:2:raw_corpus | raw_corpus | proto = Object.getPrototypeOf(object)
unless proto == Object.prototype
result.__proto = jsonifyValue(proto)
return result
root = jsonifyValue(rootValue)
while objectsToJsonify.length > 0
nextObject = objectsToJsonify.pop()
objects[Util.getId(nextObject)] = jsonifyObject(nextObje... | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 55 | 104 | ||
cdglabs/apparatus:src/Storage/Serializer.coffee:2:completion | completion | proto = Object.getPrototypeOf(object)
unless proto == Object.prototype
result.__proto = jsonifyValue(proto)
return result
root = jsonifyValue(rootValue)
while objectsToJsonify.length > 0
nextObject = objectsToJsonify.pop()
objects[Util.getId(nextObject)] = jsonifyObject(nextObje... | if protoRef
proto = constructObject(protoRef.__ref)
constructedObject = Object.create(proto)
constructedObject.constructor?()
else
constructedObject = {}
return constructedObjects[id] = constructedObject
for own id, object of objects
constructObject(id)
# Assi... | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 55 | 104 |
cdglabs/apparatus:src/Storage/Serializer.coffee:3:raw_corpus | raw_corpus | else
return _.mapObject value, deref
else
return value
for own id, object of objects
assignKeyValues(id, object)
return deref(root) | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 105 | 113 | ||
cdglabs/apparatus:src/Storage/Serializer.coffee:3:completion | completion | else
return _.mapObject value, deref
else
return value | for own id, object of objects
assignKeyValues(id, object)
return deref(root) | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Storage/Serializer.coffee | 105 | 113 |
cdglabs/apparatus:src/Storage/Serializer.coffee:1:raw_corpus | raw_corpus | module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
# Serialization
# ======================================... | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | a5d0fda468599b02ead67939236e58b5e5f7133e | 1,052 | https://github.com/cdglabs/apparatus/blob/a5d0fda468599b02ead67939236e58b5e5f7133e/src/Storage/Serializer.coffee | 5 | 54 | ||
cdglabs/apparatus:src/Storage/Serializer.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
#... | var Serializer,
hasProp = {}.hasOwnProperty;
module.exports = Serializer = class Serializer {
constructor(builtInObjects) {
var i, id, len, object;
this.builtIn = {};
for (i = 0, len = builtInObjects.length; i < len; i++) {
object = builtInObjects[i];
id = Util.getId(object);
this.bui... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | a5d0fda468599b02ead67939236e58b5e5f7133e | 1,052 | https://github.com/cdglabs/apparatus/blob/a5d0fda468599b02ead67939236e58b5e5f7133e/src/Storage/Serializer.coffee | 5 | 54 |
cdglabs/apparatus:src/Storage/Serializer.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Serializer,
hasProp = {}.hasOwnProperty;
module.exports = Serializer = class Serializer {
constructor(builtInObjects) {
var i, id, len, object;
this.builtIn = {};
for (i = 0, len = builtInObjects.length; i < len; i++) {
object = builtInOb... | module.exports = class Serializer
constructor: (builtInObjects) ->
@builtIn = {}
for object in builtInObjects
id = Util.getId(object)
@builtIn[id] = object
# ===========================================================================
# Serialization
# ======================================... | JavaScript | CoffeeScript | cdglabs/apparatus | src/Storage/Serializer.coffee | MIT | a5d0fda468599b02ead67939236e58b5e5f7133e | 1,052 | https://github.com/cdglabs/apparatus/blob/a5d0fda468599b02ead67939236e58b5e5f7133e/src/Storage/Serializer.coffee | 5 | 54 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.