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
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:raw_corpus
raw_corpus
.getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className) @When /^I add class "([^"]*)" to "([^"]*)" in "([^"]*)"$/, (className...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
40d78cbe8f85d6d0cf5d876956576708379f820e
523
https://github.com/mojotech/pioneer/blob/40d78cbe8f85d6d0cf5d876956576708379f820e/test/integration/steps/widget_steps.coffee
54
103
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:completion
completion
.getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className) @When /^I add class "([^"]*)" to "([^"]*)" in "([^"]*)"$/, (className...
selector: childSelector }) @When /^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ root: selector }) .toggleClass({ className: className, selector: childSelector }) @Then /^"([^"]*)" should contain class "([^"]*)"$/,...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
40d78cbe8f85d6d0cf5d876956576708379f820e
523
https://github.com/mojotech/pioneer/blob/40d78cbe8f85d6d0cf5d876956576708379f820e/test/integration/steps/widget_steps.coffee
54
103
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:raw_corpus
raw_corpus
widget = new @Widget({ root: selector }) .hasClass({ className: className selector: childSelector }).should.eventually.be.true @Then /^"([^"]*)" should not contain class "([^"]*)" in "([^"]*)"$/, (childSelector, className, selector) => widget = new @Widget({ root: selector ...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
40d78cbe8f85d6d0cf5d876956576708379f820e
523
https://github.com/mojotech/pioneer/blob/40d78cbe8f85d6d0cf5d876956576708379f820e/test/integration/steps/widget_steps.coffee
104
147
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:completion
completion
widget = new @Widget({ root: selector }) .hasClass({ className: className selector: childSelector }).should.eventually.be.true @Then /^"([^"]*)" should not contain class "([^"]*)" in "([^"]*)"$/, (childSelector, className, selector) => widget = new @Widget({ root: selector ...
.then (w) -> w.read() .should.eventually .eql("ok ok only on hover") @Given /^I should be able to double click an element$/, -> new @W({ root: '.double' }) .doubleClick() .then (w) -> w.read() .should.eventually .eql("wow such click") @Given /^I should be ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
40d78cbe8f85d6d0cf5d876956576708379f820e
523
https://github.com/mojotech/pioneer/blob/40d78cbe8f85d6d0cf5d876956576708379f820e/test/integration/steps/widget_steps.coffee
104
147
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:raw_corpus
raw_corpus
module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I see if "([^"]*...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
5
54
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(...
module.exports = function() { this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child); }).then(function(present) { return expect(...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
5
54
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function() { this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return widget.isPresent(child...
module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I see if "([^"]*...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
5
54
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:completion
completion
module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPresent) @When /^I see if "([^"]*...
@When /^I make sure inputbox is empty$/, -> new @Widget({root: ".inputbox"}).then (w) => w.find().then (el) -> el.clear() @Then /^I send keys to an element with an object I should be able to read them$/, -> w = new @Widget({ root: "p" }) w.sendKeys({ selector: ".inputbox", key...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
5
54
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:raw_corpus
raw_corpus
new @Widget({ root: selector }) .addClass(className) @Then /^"([^"]*)" should have class "([^"]*)"$/, (selector, expected) -> new @Widget({ root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.not.eql(-1) @When /^I remove class ...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
55
104
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:completion
completion
new @Widget({ root: selector }) .addClass(className) @Then /^"([^"]*)" should have class "([^"]*)"$/, (selector, expected) -> new @Widget({ root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.not.eql(-1) @When /^I remove class ...
attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className) @When /^I add class "([^"]*)" to "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
55
104
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:raw_corpus
raw_corpus
@When /^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ root: selector }) .toggleClass({ className: className, selector: childSelector }) @Then /^"([^"]*)" should contain class "([^"]*)"$/, (selector, className) => widg...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
105
143
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @When /^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ root: selector }) .toggleClass({ className: className, selector: childSelector }) @Then /^"([^"]*)" should con...
this.When(/^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, function(className, childSelector, selector) { return new this.Widget({ root: selector }).toggleClass({ className: className, selector: childSelector }); }); this.Then(/^"([^"]*)" should contain class "([^"]*)"$/, (selector, className)...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
105
143
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.When(/^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, function(className, childSelector, selector) { return new this.Widget({ root: selector }).toggleClass({ className: className, selector: childSelector }); }); this.Then(/^"([^"]*)" ...
@When /^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ root: selector }) .toggleClass({ className: className, selector: childSelector }) @Then /^"([^"]*)" should contain class "([^"]*)"$/, (selector, className) => widg...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
105
143
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:completion
completion
@When /^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ root: selector }) .toggleClass({ className: className, selector: childSelector }) @Then /^"([^"]*)" should contain class "([^"]*)"$/, (selector, className) => widg...
.hasClass(className).should.eventually.be.false @Then /^"([^"]*)" should contain class "([^"]*)" in "([^"]*)"$/, (childSelector, className, selector) => widget = new @Widget({ root: selector }) .hasClass({ className: className selector: childSelector }).should.eventually.be.true ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
a81b17d6adeb88ce8db2549378bd5ecae10abc46
523
https://github.com/mojotech/pioneer/blob/a81b17d6adeb88ce8db2549378bd5ecae10abc46/test/integration/steps/widget_steps.coffee
105
143
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:raw_corpus
raw_corpus
widget = new @Widget({ root: selector }) .hasClass({ className: className selector: childSelector }).should.eventually.be.true @Then /^"([^"]*)" should not contain class "([^"]*)" in "([^"]*)"$/, (childSelector, className, selector) => widget = new @Widget({ root: selector ...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
0ce4b3f2f15ff4b700eb08c404f30a0437e9aa47
523
https://github.com/mojotech/pioneer/blob/0ce4b3f2f15ff4b700eb08c404f30a0437e9aa47/test/integration/steps/widget_steps.coffee
104
119
mojotech/pioneer:test/integration/steps/widget_steps.coffee:3:completion
completion
widget = new @Widget({ root: selector }) .hasClass({ className: className selector: childSelector }).should.eventually.be.true
@Then /^"([^"]*)" should not contain class "([^"]*)" in "([^"]*)"$/, (childSelector, className, selector) => widget = new @Widget({ root: selector }) .hasClass({ className: className selector: childSelector }).should.eventually.be.false
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
0ce4b3f2f15ff4b700eb08c404f30a0437e9aa47
523
https://github.com/mojotech/pioneer/blob/0ce4b3f2f15ff4b700eb08c404f30a0437e9aa47/test/integration/steps/widget_steps.coffee
104
119
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:raw_corpus
raw_corpus
.getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className) @When /^I add class "([^"]*)" to "([^"]*)" in "([^"]*)"$/, (className...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
57a28e1b4cd432efb7f4b5c5baab1d01fa6fa88a
523
https://github.com/mojotech/pioneer/blob/57a28e1b4cd432efb7f4b5c5baab1d01fa6fa88a/test/integration/steps/widget_steps.coffee
54
89
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:completion
completion
.getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className) @When /^I add class "([^"]*)" to "([^"]*)" in "([^"]*)"$/, (className...
@When /^I remove class "([^"]*)" from "([^"]*)" in "([^"]*)"$/, (className, childSelector, selector) -> new @Widget({ root: selector }) .removeClass({ className: className, selector: childSelector }) @When /^I toggle class "([^"]*)" on "([^"]*)" in "([^"]*)"$/, (className, childSele...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
57a28e1b4cd432efb7f4b5c5baab1d01fa6fa88a
523
https://github.com/mojotech/pioneer/blob/57a28e1b4cd432efb7f4b5c5baab1d01fa6fa88a/test/integration/steps/widget_steps.coffee
54
89
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:raw_corpus
raw_corpus
_ = require('lodash') expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expe...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require('lodash') expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget...
var _, expect; _ = require('lodash'); expect = require("chai").expect; module.exports = function() { this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ root: root }).then(function(widget) { return wid...
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _, expect; _ = require('lodash'); expect = require("chai").expect; module.exports = function() { this.When(/^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, function(child, root, isPresent) { return this.Widget.find({ roo...
_ = require('lodash') expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expe...
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:completion
completion
_ = require('lodash') expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expe...
w.sendKeys(sent) .then -> w.getValue().should.eventually.eql(read) @When /^I add class "([^"]*)" to "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .addClass(className) @Then /^"([^"]*)" should have class "([^"]*)"$/, (selector, expected) -> new @Widget({ ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:raw_corpus
raw_corpus
new @Widget({ root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className)
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
51
62
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript new @Widget({ root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector ...
new this.Widget({ root: selector }).getAttribute('class').then(function(attribute) { return attribute.indexOf(expected).should.eql(-1); }); this.When(/^I toggle class "([^"]*)" on "([^"]*)"$/, function(className, selector) { return new this.Widget({ root: selector }).toggleClass(className); });
CoffeeScript
JavaScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
51
62
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript new this.Widget({ root: selector }).getAttribute('class').then(function(attribute) { return attribute.indexOf(expected).should.eql(-1); }); this.When(/^I toggle class "([^"]*)" on "([^"]*)"$/, function(className, selector) { return new this.Widget({ root...
new @Widget({ root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className)
JavaScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
51
62
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:completion
completion
new @Widget({ root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1)
@When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
057253586504292edd1dbdfd39bf2c79f434a459
523
https://github.com/mojotech/pioneer/blob/057253586504292edd1dbdfd39bf2c79f434a459/test/integration/steps/widget_steps.coffee
51
62
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:raw_corpus
raw_corpus
expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPre...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
90d4a66a885bab106437ace7e6774d70965c75df
523
https://github.com/mojotech/pioneer/blob/90d4a66a885bab106437ace7e6774d70965c75df/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:completion
completion
expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPre...
.then -> w.getValue().should.eventually.eql(read) @When /^I add class "([^"]*)" to "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .addClass(className) @Then /^"([^"]*)" should have class "([^"]*)"$/, (selector, expected) -> new @Widget({ root: selector ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
90d4a66a885bab106437ace7e6774d70965c75df
523
https://github.com/mojotech/pioneer/blob/90d4a66a885bab106437ace7e6774d70965c75df/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:raw_corpus
raw_corpus
root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1) @When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className)
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
90d4a66a885bab106437ace7e6774d70965c75df
523
https://github.com/mojotech/pioneer/blob/90d4a66a885bab106437ace7e6774d70965c75df/test/integration/steps/widget_steps.coffee
51
61
mojotech/pioneer:test/integration/steps/widget_steps.coffee:2:completion
completion
root: selector }) .getAttribute('class') .then (attribute) -> attribute.indexOf(expected).should.eql(-1)
@When /^I toggle class "([^"]*)" on "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .toggleClass(className)
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
90d4a66a885bab106437ace7e6774d70965c75df
523
https://github.com/mojotech/pioneer/blob/90d4a66a885bab106437ace7e6774d70965c75df/test/integration/steps/widget_steps.coffee
51
61
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:raw_corpus
raw_corpus
expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPre...
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
fc9304277372b1bf3022de1d5ab687f79bbcbeb7
523
https://github.com/mojotech/pioneer/blob/fc9304277372b1bf3022de1d5ab687f79bbcbeb7/test/integration/steps/widget_steps.coffee
1
50
mojotech/pioneer:test/integration/steps/widget_steps.coffee:1:completion
completion
expect = require("chai").expect module.exports = -> @When /^I see if "([^"]*)" is present within "([^"]*)" I should get "([^"]*)"$/, (child, root, isPresent) -> @Widget.find({ root: root }).then((widget) -> widget.isPresent(child) ) .then (present) -> expect(""+present).to.eql(isPre...
.then -> w.read().should.eventually.eql(read) @When /^I add class "([^"]*)" to "([^"]*)"$/, (className, selector) -> new @Widget({ root: selector }) .addClass(className) @Then /^"([^"]*)" should have class "([^"]*)"$/, (selector, expected) -> new @Widget({ root: selector }) ...
CoffeeScript
CoffeeScript
mojotech/pioneer
test/integration/steps/widget_steps.coffee
MIT
fc9304277372b1bf3022de1d5ab687f79bbcbeb7
523
https://github.com/mojotech/pioneer/blob/fc9304277372b1bf3022de1d5ab687f79bbcbeb7/test/integration/steps/widget_steps.coffee
1
50
Atraci/Atraci:coffee/_tracking.coffee:1:raw_corpus
raw_corpus
getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() clientId = Settings.get("trackingId") ...
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId"...
var dummyMethod, getTrackingId, ua, userTracking; getTrackingId = function() { var clientId, uuid; clientId = Settings.get("trackingId"); if (typeof clientId === "undefined" || (clientId == null) || clientId === "") { // A UUID v4 (random) is the recommended format for Google Analytics uuid = require("no...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dummyMethod, getTrackingId, ua, userTracking; getTrackingId = function() { var clientId, uuid; clientId = Settings.get("trackingId"); if (typeof clientId === "undefined" || (clientId == null) || clientId === "") { // A UUID v4 (random) is the recomme...
getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() clientId = Settings.get("trackingId") ...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:completion
completion
getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() clientId = Settings.get("trackingId") ...
ua = require("universal-analytics") unless getTrackingId()? # Don't report anything if we don't have a trackingId dummyMethod = -> send: -> userTracking = window.userTracking = event: dummyMethod pageview: dummyMethod timing: dummyMethod exception: dummyMethod transaction: dummyMethod els...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:2:raw_corpus
raw_corpus
getOperatingSystem = -> platform = os.platform() return "windows" if platform is "win32" or platform is "win64" return "mac" if platform is "darwin" return "linux" if platform is "linux" null # General Device Stats userTracking.event( "Device Stats", "Version", gui.App.manifest.version ).send() us...
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
36
85
Atraci/Atraci:coffee/_tracking.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getOperatingSystem = -> platform = os.platform() return "windows" if platform is "win32" or platform is "win64" return "mac" if platform is "darwin" return "linux" if platform is "linux" null # General Device Stats userTracking.event( "Device Sta...
var getOperatingSystem, resolution; getOperatingSystem = function() { var platform; platform = os.platform(); if (platform === "win32" || platform === "win64") { return "windows"; } if (platform === "darwin") { return "mac"; } if (platform === "linux") { return "linux"; } return null; }; ...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
36
85
Atraci/Atraci:coffee/_tracking.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var getOperatingSystem, resolution; getOperatingSystem = function() { var platform; platform = os.platform(); if (platform === "win32" || platform === "win64") { return "windows"; } if (platform === "darwin") { return "mac"; } if (platform ==...
getOperatingSystem = -> platform = os.platform() return "windows" if platform is "win32" or platform is "win64" return "mac" if platform is "darwin" return "linux" if platform is "linux" null # General Device Stats userTracking.event( "Device Stats", "Version", gui.App.manifest.version ).send() us...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
36
85
Atraci/Atraci:coffee/_tracking.coffee:2:completion
completion
getOperatingSystem = -> platform = os.platform() return "windows" if platform is "win32" or platform is "win64" return "mac" if platform is "darwin" return "linux" if platform is "linux" null # General Device Stats userTracking.event( "Device Stats", "Version", gui.App.manifest.version ).send() us...
os.type() + " " + os.release() ).send() userTracking.event( "Device Stats", "CPU", os.cpus()[0].model + " @ " + (os.cpus()[0].speed / 1000).toFixed(1) + "GHz" + " x " + os.cpus().length ).send() userTracking.event( "Device Stats", "RAM", Math.round(os.totalmem() / 1024 / 1024 / 1024) + "GB" ).send() us...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
36
85
Atraci/Atraci:coffee/_tracking.coffee:3:raw_corpus
raw_corpus
if typeof screen.pixelDepth is "number" resolution += "@" + (screen.pixelDepth).toString() if typeof window.devicePixelRatio is "number" resolution += "#" + (window.devicePixelRatio).toString() userTracking.event("Device Stats", "Resolution", resolution).send() # User Language userTracking.event( "Devic...
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
86
106
Atraci/Atraci:coffee/_tracking.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript if typeof screen.pixelDepth is "number" resolution += "@" + (screen.pixelDepth).toString() if typeof window.devicePixelRatio is "number" resolution += "#" + (window.devicePixelRatio).toString() userTracking.event("Device Stats", "Resolution", resolut...
if (typeof screen.pixelDepth === "number") { resolution += "@" + screen.pixelDepth.toString(); } if (typeof window.devicePixelRatio === "number") { resolution += "#" + window.devicePixelRatio.toString(); } userTracking.event("Device Stats", "Resolution", resolution).send(); // User Language userTracking.event("D...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
86
106
Atraci/Atraci:coffee/_tracking.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript if (typeof screen.pixelDepth === "number") { resolution += "@" + screen.pixelDepth.toString(); } if (typeof window.devicePixelRatio === "number") { resolution += "#" + window.devicePixelRatio.toString(); } userTracking.event("Device Stats", "Resolution", reso...
if typeof screen.pixelDepth is "number" resolution += "@" + (screen.pixelDepth).toString() if typeof window.devicePixelRatio is "number" resolution += "#" + (window.devicePixelRatio).toString() userTracking.event("Device Stats", "Resolution", resolution).send() # User Language userTracking.event( "Devic...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
86
106
Atraci/Atraci:coffee/_tracking.coffee:3:completion
completion
if typeof screen.pixelDepth is "number" resolution += "@" + (screen.pixelDepth).toString() if typeof window.devicePixelRatio is "number" resolution += "#" + (window.devicePixelRatio).toString() userTracking.event("Device Stats", "Resolution", resolution).send() # User Language userTracking.event( "Devic...
"Language", navigator.language.toLowerCase() ).send() # Track one page view at launch userTracking.pageview("/").send() # Keep session alive to get actual session durations in GA setInterval (-> userTracking.event("_KeepAlive", "Pulse").send() ), 600*1000 # every 10 minutes
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_tracking.coffee
86
106
Atraci/Atraci:coffee/_tracking.coffee:1:raw_corpus
raw_corpus
getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() clientId = Settings.get("trackingId") ...
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId"...
var dummyMethod, getTrackingId, ua, userTracking; getTrackingId = function() { var clientId, uuid; clientId = Settings.get("trackingId"); if (typeof clientId === "undefined" || (clientId == null) || clientId === "") { // A UUID v4 (random) is the recommended format for Google Analytics uuid = require("no...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dummyMethod, getTrackingId, ua, userTracking; getTrackingId = function() { var clientId, uuid; clientId = Settings.get("trackingId"); if (typeof clientId === "undefined" || (clientId == null) || clientId === "") { // A UUID v4 (random) is the recomme...
getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() clientId = Settings.get("trackingId") ...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:completion
completion
getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() clientId = Settings.get("trackingId") ...
ua = require("universal-analytics") unless getTrackingId()? # Don't report anything if we don't have a trackingId dummyMethod = -> send: -> userTracking = window.userTracking = event: dummyMethod pageview: dummyMethod timing: dummyMethod exception: dummyMethod transaction: dummyMethod els...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f
800
https://github.com/Atraci/Atraci/blob/a4e3a69e284a1ef05051d95c0dc9bbb90c15b74f/coffee/_tracking.coffee
3
35
Atraci/Atraci:coffee/_tracking.coffee:1:raw_corpus
raw_corpus
os = require('os') getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() ...
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
1
50
Atraci/Atraci:coffee/_tracking.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript os = require('os') getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uui...
var dummyMethod, getOperatingSystem, getTrackingId, os, ua, userTracking; os = require('os'); getTrackingId = function() { var clientId, uuid; clientId = Settings.get("trackingId"); if (typeof clientId === "undefined" || (clientId == null) || clientId === "") { // A UUID v4 (random) is the recommended forma...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
1
50
Atraci/Atraci:coffee/_tracking.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dummyMethod, getOperatingSystem, getTrackingId, os, ua, userTracking; os = require('os'); getTrackingId = function() { var clientId, uuid; clientId = Settings.get("trackingId"); if (typeof clientId === "undefined" || (clientId == null) || clientId === "...
os = require('os') getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() ...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
1
50
Atraci/Atraci:coffee/_tracking.coffee:1:completion
completion
os = require('os') getTrackingId = -> clientId = Settings.get("trackingId") if typeof clientId is "undefined" or not clientId? or clientId is "" # A UUID v4 (random) is the recommended format for Google Analytics uuid = require("node-uuid") Settings.set "trackingId", uuid.v4() ...
userTracking = window.userTracking = event: dummyMethod pageview: dummyMethod timing: dummyMethod exception: dummyMethod transaction: dummyMethod else userTracking = window.userTracking = ua("UA-49098639-1", getTrackingId()) # Detect the operating system of the user getOpera...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
1
50
Atraci/Atraci:coffee/_tracking.coffee:2:raw_corpus
raw_corpus
userTracking.event("Device Stats", "Uptime", Math.round(os.uptime() / 60 / 60) + "hs").send() # Screen resolution, depth and pixel ratio (retina displays) if typeof screen.width is "number" and typeof screen.height is "number" resolution = (screen.width).toString() + "x" + (screen.height.toString()) resolution...
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
51
69
Atraci/Atraci:coffee/_tracking.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript userTracking.event("Device Stats", "Uptime", Math.round(os.uptime() / 60 / 60) + "hs").send() # Screen resolution, depth and pixel ratio (retina displays) if typeof screen.width is "number" and typeof screen.height is "number" resolution = (screen.width).toS...
var resolution; userTracking.event("Device Stats", "Uptime", Math.round(os.uptime() / 60 / 60) + "hs").send(); // Screen resolution, depth and pixel ratio (retina displays) if (typeof screen.width === "number" && typeof screen.height === "number") { resolution = screen.width.toString() + "x" + (screen.height.toStri...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
51
69
Atraci/Atraci:coffee/_tracking.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var resolution; userTracking.event("Device Stats", "Uptime", Math.round(os.uptime() / 60 / 60) + "hs").send(); // Screen resolution, depth and pixel ratio (retina displays) if (typeof screen.width === "number" && typeof screen.height === "number") { resolution ...
userTracking.event("Device Stats", "Uptime", Math.round(os.uptime() / 60 / 60) + "hs").send() # Screen resolution, depth and pixel ratio (retina displays) if typeof screen.width is "number" and typeof screen.height is "number" resolution = (screen.width).toString() + "x" + (screen.height.toString()) resolution...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
51
69
Atraci/Atraci:coffee/_tracking.coffee:2:completion
completion
userTracking.event("Device Stats", "Uptime", Math.round(os.uptime() / 60 / 60) + "hs").send() # Screen resolution, depth and pixel ratio (retina displays) if typeof screen.width is "number" and typeof screen.height is "number" resolution = (screen.width).toString() + "x" + (screen.height.toString()) resolution...
# User Language userTracking.event("Device Stats", "Language", navigator.language.toLowerCase()).send() # Track one page view at launch userTracking.pageview("/").send() # Keep session alive to get actual session durations in GA setInterval (-> userTracking.event("_KeepAlive", "Pulse").send() ), 600*1000 # every ...
CoffeeScript
CoffeeScript
Atraci/Atraci
coffee/_tracking.coffee
MIT
d4b7f952575352efeff69f232ab345bac48fe586
800
https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_tracking.coffee
51
69
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee:1:raw_corpus
raw_corpus
countdown: num for num in [10..1] egg_delivery: -> for i in [0...eggs.length] by 12 dozen_eggs: eggs[i...i+12] deliver new egg_carton(dozen)
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
1
6
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript countdown: num for num in [10..1] egg_delivery: -> for i in [0...eggs.length] by 12 dozen_eggs: eggs[i...i+12] deliver new egg_carton(dozen) ```
var num; ({ countdown: (function() { var j, results; results = []; for (num = j = 10; j >= 1; num = --j) { results.push(num); } return results; })(), egg_delivery: function() { var i, j, ref, results; results = []; for (i = j = 0, ref = eggs.length; j < ref; i = j += 12) { ...
CoffeeScript
JavaScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
1
6
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var num; ({ countdown: (function() { var j, results; results = []; for (num = j = 10; j >= 1; num = --j) { results.push(num); } return results; })(), egg_delivery: function() { var i, j, ref, results; results = []; for (...
countdown: num for num in [10..1] egg_delivery: -> for i in [0...eggs.length] by 12 dozen_eggs: eggs[i...i+12] deliver new egg_carton(dozen)
JavaScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
1
6
twilson63/express-coffee:lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee:1:completion
completion
countdown: num for num in [10..1] egg_delivery: ->
for i in [0...eggs.length] by 12 dozen_eggs: eggs[i...i+12] deliver new egg_carton(dozen)
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/documentation/coffee/range_comprehensions.coffee
1
6
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:1:raw_corpus
raw_corpus
_buildConditions = (options) -> {_sessionUserId, _teamId, maxDate} = options _teamId or= options.team throw new Err('PARAMS_MISSING', '_teamId') unless _teamId conditions = team: _teamId members: _sessionUserId return conditions ###* * Apply the story data getter and cache this field ###
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
17
30
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _buildConditions = (options) -> {_sessionUserId, _teamId, maxDate} = options _teamId or= options.team throw new Err('PARAMS_MISSING', '_teamId') unless _teamId conditions = team: _teamId members: _sessionUserId return conditions ###* * Apply...
var _buildConditions; _buildConditions = function(options) { var _sessionUserId, _teamId, conditions, maxDate; ({_sessionUserId, _teamId, maxDate} = options); _teamId || (_teamId = options.team); if (!_teamId) { throw new Err('PARAMS_MISSING', '_teamId'); } conditions = { team: _teamId, members...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
17
30
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var _buildConditions; _buildConditions = function(options) { var _sessionUserId, _teamId, conditions, maxDate; ({_sessionUserId, _teamId, maxDate} = options); _teamId || (_teamId = options.team); if (!_teamId) { throw new Err('PARAMS_MISSING', '_teamId...
_buildConditions = (options) -> {_sessionUserId, _teamId, maxDate} = options _teamId or= options.team throw new Err('PARAMS_MISSING', '_teamId') unless _teamId conditions = team: _teamId members: _sessionUserId return conditions ###* * Apply the story data getter and cache this field ###
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
17
30
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:1:completion
completion
_buildConditions = (options) -> {_sessionUserId, _teamId, maxDate} = options _teamId or= options.team throw new Err('PARAMS_MISSING', '_teamId') unless _teamId conditions = team: _teamId
members: _sessionUserId return conditions ###* * Apply the story data getter and cache this field ###
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
17
30
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:2:raw_corpus
raw_corpus
dataGetter = (data) -> return {} unless @category in supportedStories return unless data unless @_data category = @category StoryDataModel = @model "#{category}Story" if StoryDataModel @_data = new StoryDataModel(data).toObject virtuals: true, getters: true else @_data = data return ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
31
45
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript dataGetter = (data) -> return {} unless @category in supportedStories return unless data unless @_data category = @category StoryDataModel = @model "#{category}Story" if StoryDataModel @_data = new StoryDataModel(data).toObject virtuals: t...
var dataGetter, indexOf = [].indexOf; dataGetter = function(data) { var StoryDataModel, category, ref; if (ref = this.category, indexOf.call(supportedStories, ref) < 0) { return {}; } if (!data) { return; } if (!this._data) { category = this.category; StoryDataModel = this.model(`${catego...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
31
45
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dataGetter, indexOf = [].indexOf; dataGetter = function(data) { var StoryDataModel, category, ref; if (ref = this.category, indexOf.call(supportedStories, ref) < 0) { return {}; } if (!data) { return; } if (!this._data) { category = t...
dataGetter = (data) -> return {} unless @category in supportedStories return unless data unless @_data category = @category StoryDataModel = @model "#{category}Story" if StoryDataModel @_data = new StoryDataModel(data).toObject virtuals: true, getters: true else @_data = data return ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
31
45
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:2:completion
completion
dataGetter = (data) -> return {} unless @category in supportedStories return unless data unless @_data category = @category StoryDataModel = @model "#{category}Story" if StoryDataModel
@_data = new StoryDataModel(data).toObject virtuals: true, getters: true else @_data = data return @_data ###* * Remove field cache ###
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
31
45
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:3:raw_corpus
raw_corpus
dataSetter = (data) -> delete @_data return data
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
46
48
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript dataSetter = (data) -> delete @_data return data ```
var dataSetter; dataSetter = function(data) { delete this._data; return data; };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
46
48
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var dataSetter; dataSetter = function(data) { delete this._data; return data; }; ```
dataSetter = (data) -> delete @_data return data
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
46
48
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:4:raw_corpus
raw_corpus
module.exports = StorySchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' category: type: String data: type: Object, set: dataSetter, get: dataGetter members: [ type: Schema.Types.ObjectId, ref: 'User' ] isPublic: type: Boolean, default:...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
50
99
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = StorySchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' category: type: String data: type: Object, set: dataSetter, get: dataGetter members: [ type: Schema.Types.Obje...
var StorySchema; module.exports = StorySchema = new Schema({ creator: { type: Schema.Types.ObjectId, ref: 'User' }, team: { type: Schema.Types.ObjectId, ref: 'Team' }, category: { type: String }, data: { type: Object, set: dataSetter, get: dataGetter }, members: [ ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
50
99
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var StorySchema; module.exports = StorySchema = new Schema({ creator: { type: Schema.Types.ObjectId, ref: 'User' }, team: { type: Schema.Types.ObjectId, ref: 'Team' }, category: { type: String }, data: { type: Object, set:...
module.exports = StorySchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' category: type: String data: type: Object, set: dataSetter, get: dataGetter members: [ type: Schema.Types.ObjectId, ref: 'User' ] isPublic: type: Boolean, default:...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
50
99
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:4:completion
completion
module.exports = StorySchema = new Schema creator: type: Schema.Types.ObjectId, ref: 'User' team: type: Schema.Types.ObjectId, ref: 'Team' category: type: String data: type: Object, set: dataSetter, get: dataGetter members: [ type: Schema.Types.ObjectId, ref: 'User' ] isPublic: type: Boolean, default:...
StorySchema.virtual '_creatorId' .get -> @creator?._id or @creator .set (_id) -> @creator = _id StorySchema.virtual '_memberIds' .get -> @members.map (member) -> member?._id or member .filter (_memberId) -> _memberId .set (_memberIds) -> @members = _memberIds StorySchema.virtual 'text' .get ->...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
50
99
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:5:raw_corpus
raw_corpus
.get -> @_pinnedAt .set (@_pinnedAt) -> @_pinnedAt StorySchema.virtual 'isPinned' .get -> @_isPinned .set (@_isPinned) -> @_isPinned ################## Hooks ################## ###* * Save the data property as pure story data element ### StorySchema.pre 'save', (next) -> story = this if @data category ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
100
121
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:5:completion
completion
.get -> @_pinnedAt .set (@_pinnedAt) -> @_pinnedAt StorySchema.virtual 'isPinned' .get -> @_isPinned .set (@_isPinned) -> @_isPinned ################## Hooks ################## ###* * Save the data property as pure story data element ###
StorySchema.pre 'save', (next) -> story = this if @data category = @category return next(new Err('INVALID_OBJECT', "story.category #{category}")) unless category in supportedStories StoryDataModel = @model "#{category}Story" _data = new StoryDataModel @data @data = _data.toObject virtuals: false...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
100
121
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:7:raw_corpus
raw_corpus
StorySchema.methods.indexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON() searchStory.index callback
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
125
128
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript StorySchema.methods.indexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON() searchStory.index callback ```
StorySchema.methods.indexSearch = function(callback = function() {}) { var SearchStoryModel, searchStory; SearchStoryModel = this.model('SearchStory'); searchStory = new SearchStoryModel(this.toJSON()); return searchStory.index(callback); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
125
128
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript StorySchema.methods.indexSearch = function(callback = function() {}) { var SearchStoryModel, searchStory; SearchStoryModel = this.model('SearchStory'); searchStory = new SearchStoryModel(this.toJSON()); return searchStory.index(callback); }; ```
StorySchema.methods.indexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON() searchStory.index callback
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
125
128
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:7:completion
completion
StorySchema.methods.indexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory'
searchStory = new SearchStoryModel @toJSON() searchStory.index callback
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
125
128
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:8:raw_corpus
raw_corpus
StorySchema.methods.unIndexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON() searchStory.unIndex callback ################## Statics ##################
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
130
135
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript StorySchema.methods.unIndexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON() searchStory.unIndex callback ################## Statics ################## ```
StorySchema.methods.unIndexSearch = function(callback = function() {}) { var SearchStoryModel, searchStory; SearchStoryModel = this.model('SearchStory'); searchStory = new SearchStoryModel(this.toJSON()); return searchStory.unIndex(callback); }; //################# Statics ##################
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
130
135
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript StorySchema.methods.unIndexSearch = function(callback = function() {}) { var SearchStoryModel, searchStory; SearchStoryModel = this.model('SearchStory'); searchStory = new SearchStoryModel(this.toJSON()); return searchStory.unIndex(callback); }; //########...
StorySchema.methods.unIndexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON() searchStory.unIndex callback ################## Statics ##################
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
130
135
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:8:completion
completion
StorySchema.methods.unIndexSearch = (callback = ->) -> SearchStoryModel = @model 'SearchStory' searchStory = new SearchStoryModel @toJSON()
searchStory.unIndex callback ################## Statics ##################
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
130
135
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:9:raw_corpus
raw_corpus
StorySchema.statics.findByOptions = (options, callback) -> try conditions = _buildConditions options catch err return callback err @_buildQuery.call(this, conditions, options).populate(POPULATE_FIELDS).exec callback
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
137
142
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:9:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript StorySchema.statics.findByOptions = (options, callback) -> try conditions = _buildConditions options catch err return callback err @_buildQuery.call(this, conditions, options).populate(POPULATE_FIELDS).exec callback ```
StorySchema.statics.findByOptions = function(options, callback) { var conditions, err; try { conditions = _buildConditions(options); } catch (error) { err = error; return callback(err); } return this._buildQuery.call(this, conditions, options).populate(POPULATE_FIELDS).exec(callback); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
137
142
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:9:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript StorySchema.statics.findByOptions = function(options, callback) { var conditions, err; try { conditions = _buildConditions(options); } catch (error) { err = error; return callback(err); } return this._buildQuery.call(this, conditions, options)...
StorySchema.statics.findByOptions = (options, callback) -> try conditions = _buildConditions options catch err return callback err @_buildQuery.call(this, conditions, options).populate(POPULATE_FIELDS).exec callback
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
137
142
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:9:completion
completion
StorySchema.statics.findByOptions = (options, callback) -> try conditions = _buildConditions options
catch err return callback err @_buildQuery.call(this, conditions, options).populate(POPULATE_FIELDS).exec callback
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
137
142
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:10:raw_corpus
raw_corpus
StorySchema.statics.findByIds = (_storyIds, callback) -> @find _id: $in: _storyIds .populate POPULATE_FIELDS .exec callback
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
144
147
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:10:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript StorySchema.statics.findByIds = (_storyIds, callback) -> @find _id: $in: _storyIds .populate POPULATE_FIELDS .exec callback ```
StorySchema.statics.findByIds = function(_storyIds, callback) { return this.find({ _id: { $in: _storyIds } }).populate(POPULATE_FIELDS).exec(callback); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
144
147
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:10:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript StorySchema.statics.findByIds = function(_storyIds, callback) { return this.find({ _id: { $in: _storyIds } }).populate(POPULATE_FIELDS).exec(callback); }; ```
StorySchema.statics.findByIds = (_storyIds, callback) -> @find _id: $in: _storyIds .populate POPULATE_FIELDS .exec callback
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
144
147
jianliaoim/talk-os:talk-api2x/server/schemas/story.coffee:10:completion
completion
StorySchema.statics.findByIds = (_storyIds, callback) -> @find _id: $in: _storyIds
.populate POPULATE_FIELDS .exec callback
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/story.coffee
144
147
lucasmotta/dploy:src/version.coffee:1:raw_corpus
raw_corpus
fs = require "fs" Signal = require "signals" module.exports = class Generator constructor: -> packageConfig = require "../package.json" console.log "v" + packageConfig.version process.exit(code=0)
CoffeeScript
lucasmotta/dploy
src/version.coffee
MIT
00b02a4902db4650df865874ad52397d05a44638
973
https://github.com/lucasmotta/dploy/blob/00b02a4902db4650df865874ad52397d05a44638/src/version.coffee
1
11
lucasmotta/dploy:src/version.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript fs = require "fs" Signal = require "signals" module.exports = class Generator constructor: -> packageConfig = require "../package.json" console.log "v" + packageConfig.version process.exit(code=0) ```
var Generator, Signal, fs; fs = require("fs"); Signal = require("signals"); module.exports = Generator = class Generator { constructor() { var code, packageConfig; packageConfig = require("../package.json"); console.log("v" + packageConfig.version); process.exit(code = 0); } };
CoffeeScript
JavaScript
lucasmotta/dploy
src/version.coffee
MIT
00b02a4902db4650df865874ad52397d05a44638
973
https://github.com/lucasmotta/dploy/blob/00b02a4902db4650df865874ad52397d05a44638/src/version.coffee
1
11
lucasmotta/dploy:src/version.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Generator, Signal, fs; fs = require("fs"); Signal = require("signals"); module.exports = Generator = class Generator { constructor() { var code, packageConfig; packageConfig = require("../package.json"); console.log("v" + packageConfig.version)...
fs = require "fs" Signal = require "signals" module.exports = class Generator constructor: -> packageConfig = require "../package.json" console.log "v" + packageConfig.version process.exit(code=0)
JavaScript
CoffeeScript
lucasmotta/dploy
src/version.coffee
MIT
00b02a4902db4650df865874ad52397d05a44638
973
https://github.com/lucasmotta/dploy/blob/00b02a4902db4650df865874ad52397d05a44638/src/version.coffee
1
11
lucasmotta/dploy:src/version.coffee:1:completion
completion
fs = require "fs" Signal = require "signals" module.exports = class Generator
constructor: -> packageConfig = require "../package.json" console.log "v" + packageConfig.version process.exit(code=0)
CoffeeScript
CoffeeScript
lucasmotta/dploy
src/version.coffee
MIT
00b02a4902db4650df865874ad52397d05a44638
973
https://github.com/lucasmotta/dploy/blob/00b02a4902db4650df865874ad52397d05a44638/src/version.coffee
1
11
buttercoin/buttercoin:lib/ews/ws_connection.coffee:1:raw_corpus
raw_corpus
module.exports = class Connection extends EventEmitter constructor: (@parent) -> @parent.stumpify(@, @_get_obj_desc) @conncounter = globalconncounter globalconncounter += 1 @ws = null deferred = Q.defer() @senddeferred = deferred socket_accepted: (@ws) => @prepare_ws() @senddeferr...
CoffeeScript
buttercoin/buttercoin
lib/ews/ws_connection.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ws_connection.coffee
14
63
buttercoin/buttercoin:lib/ews/ws_connection.coffee:1:completion
completion
module.exports = class Connection extends EventEmitter constructor: (@parent) -> @parent.stumpify(@, @_get_obj_desc) @conncounter = globalconncounter globalconncounter += 1 @ws = null deferred = Q.defer() @senddeferred = deferred socket_accepted: (@ws) => @prepare_ws() @senddeferr...
@senddeferred.resolve(@ws.send) # .done() @once 'close', => @info 'ONCECLOSE' @senddeferred.reject( "Connection closed" ) # .done() prepare_ws: => @ws.on 'error', @handle_error @ws.on 'open', wrap_error(@handle_open, @uncaught_exception) @ws.on 'close', wrap_error(@handle_clo...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/ews/ws_connection.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ws_connection.coffee
14
63
buttercoin/buttercoin:lib/ews/ws_connection.coffee:2:raw_corpus
raw_corpus
handle_error: (error) => # @error 'uncaught error', error, '\n', error.stack # @disconnect() # if not is_node # throw error @error error throw error handle_open: => @info 'handle_open' @emit('open', @) handle_close: => @info 'Connection Closed' @emit('close') handle_da...
CoffeeScript
buttercoin/buttercoin
lib/ews/ws_connection.coffee
MIT
a825a9ea31d695f8abb600f3f27ff635a839c0c2
663
https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/ws_connection.coffee
64
105