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:src/support/index.coffee:2:raw_corpus | raw_corpus | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Freeze = ->
keyPress = false
... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 2fdfd842b7cef0259d2433d0e8986e1eeea3eac4 | 523 | https://github.com/mojotech/pioneer/blob/2fdfd842b7cef0259d2433d0e8986e1eeea3eac4/src/support/index.coffee | 52 | 97 | ||
mojotech/pioneer:src/support/index.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepTyp... | var callforth, shouldPreventBrowserReload, terminateDriver;
callforth = () => {
return flowStep(code, args, callback, (error) => {
if (new Date() - start > this.timeout) {
return callback(error);
} else {
return $.delayed(1000).then(function() {
return callforth();
});
}
});
}... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | 2fdfd842b7cef0259d2433d0e8986e1eeea3eac4 | 523 | https://github.com/mojotech/pioneer/blob/2fdfd842b7cef0259d2433d0e8986e1eeea3eac4/src/support/index.coffee | 52 | 97 |
mojotech/pioneer:src/support/index.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var callforth, shouldPreventBrowserReload, terminateDriver;
callforth = () => {
return flowStep(code, args, callback, (error) => {
if (new Date() - start > this.timeout) {
return callback(error);
} else {
return $.delayed(1000).then(function(... | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Freeze = ->
keyPress = false
... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 2fdfd842b7cef0259d2433d0e8986e1eeea3eac4 | 523 | https://github.com/mojotech/pioneer/blob/2fdfd842b7cef0259d2433d0e8986e1eeea3eac4/src/support/index.coffee | 52 | 97 |
mojotech/pioneer:src/support/index.coffee:2:completion | completion | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Freeze = ->
keyPress = false
... | (()->
return keyPress
), Infinity).then -> process.stdin.pause()
@Before ->
@lastStepType = 'Given'
if !shouldPreventBrowserReload()
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities[argv.driver || 'chrome']()).build()
@After ->
terminateDriver() unless shouldPreven... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 2fdfd842b7cef0259d2433d0e8986e1eeea3eac4 | 523 | https://github.com/mojotech/pioneer/blob/2fdfd842b7cef0259d2433d0e8986e1eeea3eac4/src/support/index.coffee | 52 | 97 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Give... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a | 523 | https://github.com/mojotech/pioneer/blob/c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a/src/support/index.coffee | 51 | 79 | ||
mojotech/pioneer:src/support/index.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepTyp... | var callforth, shouldPreventBrowserReload, terminateDriver;
callforth = () => {
return flowStep(code, args, callback, (error) => {
if (new Date() - start > this.timeout) {
return callback(error);
} else {
return $.delayed(1000).then(function() {
return callforth();
});
}
});
}... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a | 523 | https://github.com/mojotech/pioneer/blob/c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a/src/support/index.coffee | 51 | 79 |
mojotech/pioneer:src/support/index.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var callforth, shouldPreventBrowserReload, terminateDriver;
callforth = () => {
return flowStep(code, args, callback, (error) => {
if (new Date() - start > this.timeout) {
return callback(error);
} else {
return $.delayed(1000).then(function(... | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Give... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a | 523 | https://github.com/mojotech/pioneer/blob/c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a/src/support/index.coffee | 51 | 79 |
mojotech/pioneer:src/support/index.coffee:2:completion | completion | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Give... | if !shouldPreventBrowserReload()
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities[argv.driver || 'chrome']()).build()
@After ->
terminateDriver() unless shouldPreventBrowserReload()
@registerHandler "AfterFeatures", (event, callback) =>
terminateDriver() if shouldPreventBrowserRel... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a | 523 | https://github.com/mojotech/pioneer/blob/c2e0f7ea7aa6bdfef2265fbea40fd619c1555b8a/src/support/index.coffee | 51 | 79 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Give... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b74ac8a807c14692d92142626936f1006aefafcc | 523 | https://github.com/mojotech/pioneer/blob/b74ac8a807c14692d92142626936f1006aefafcc/src/support/index.coffee | 51 | 69 | ||
mojotech/pioneer:src/support/index.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepTyp... | var callforth;
callforth = () => {
return flowStep(code, args, callback, (error) => {
if (new Date() - start > this.timeout) {
return callback(error);
} else {
return $.delayed(1000).then(function() {
return callforth();
});
}
});
};
callforth();
this.And = (pattern, code) =... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | b74ac8a807c14692d92142626936f1006aefafcc | 523 | https://github.com/mojotech/pioneer/blob/b74ac8a807c14692d92142626936f1006aefafcc/src/support/index.coffee | 51 | 69 |
mojotech/pioneer:src/support/index.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var callforth;
callforth = () => {
return flowStep(code, args, callback, (error) => {
if (new Date() - start > this.timeout) {
return callback(error);
} else {
return $.delayed(1000).then(function() {
return callforth();
});
... | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Give... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b74ac8a807c14692d92142626936f1006aefafcc | 523 | https://github.com/mojotech/pioneer/blob/b74ac8a807c14692d92142626936f1006aefafcc/src/support/index.coffee | 51 | 69 |
mojotech/pioneer:src/support/index.coffee:2:completion | completion | callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth() | @And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Given'
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities[argv.driver || 'chrome']()).build()
@After ->
@driver.close()
@driver.quit() | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b74ac8a807c14692d92142626936f1006aefafcc | 523 | https://github.com/mojotech/pioneer/blob/b74ac8a807c14692d92142626936f1006aefafcc/src/support/index.coffee | 51 | 69 |
mojotech/pioneer:src/support/index.coffee:1:raw_corpus | raw_corpus | module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw ... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b974284600a97b6c7c16217ef4321661c00078a2 | 523 | https://github.com/mojotech/pioneer/blob/b974284600a97b6c7c16217ef4321661c00078a2/src/support/index.coffee | 1 | 50 | ||
mojotech/pioneer:src/support/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
... | var splice = [].splice;
module.exports = function() {
var _After, _Before, flowStep;
this.logger = require('./logger');
this.timeout = 5000;
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.After;
this._inFlow = function(code, callback)... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | b974284600a97b6c7c16217ef4321661c00078a2 | 523 | https://github.com/mojotech/pioneer/blob/b974284600a97b6c7c16217ef4321661c00078a2/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var splice = [].splice;
module.exports = function() {
var _After, _Before, flowStep;
this.logger = require('./logger');
this.timeout = 5000;
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After ... | module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw ... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b974284600a97b6c7c16217ef4321661c00078a2 | 523 | https://github.com/mojotech/pioneer/blob/b974284600a97b6c7c16217ef4321661c00078a2/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:completion | completion | module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw ... | @BeforeAll = (code) ->
unless @_ranBeforeAll
@_ranBeforeAll = true
@Before code
@AfterAll = (code) ->
unless @_ranAfterAll
@_ranAfterAll = true
@After code
flowStep = (code, args, successCallback, errCallback) =>
$
.createFlow (flow) =>
flow.execute =>
code.ap... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b974284600a97b6c7c16217ef4321661c00078a2 | 523 | https://github.com/mojotech/pioneer/blob/b974284600a97b6c7c16217ef4321661c00078a2/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | start = new Date
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b974284600a97b6c7c16217ef4321661c00078a2 | 523 | https://github.com/mojotech/pioneer/blob/b974284600a97b6c7c16217ef4321661c00078a2/src/support/index.coffee | 51 | 71 | ||
mojotech/pioneer:src/support/index.coffee:2:completion | completion | start = new Date
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth() | @And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Given'
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities[argv.driver || 'chrome']()).build()
@After ->
@driver.close()
@driver.quit() | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | b974284600a97b6c7c16217ef4321661c00078a2 | 523 | https://github.com/mojotech/pioneer/blob/b974284600a97b6c7c16217ef4321661c00078a2/src/support/index.coffee | 51 | 71 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | start = new Date
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth()
@And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | d67d7f1ac0ff718d89e81748f368210b40b58a28 | 523 | https://github.com/mojotech/pioneer/blob/d67d7f1ac0ff718d89e81748f368210b40b58a28/src/support/index.coffee | 51 | 71 | ||
mojotech/pioneer:src/support/index.coffee:2:completion | completion | start = new Date
callforth = =>
flowStep code, args, callback, (error) =>
if new Date - start > @timeout
callback(error)
else
$.delayed(1000).then -> callforth()
callforth() | @And = (pattern, code) =>
@[@lastStepType](pattern, code)
@Before ->
@lastStepType = 'Given'
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build()
@After ->
@driver.close()
@driver.quit() | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | d67d7f1ac0ff718d89e81748f368210b40b58a28 | 523 | https://github.com/mojotech/pioneer/blob/d67d7f1ac0ff718d89e81748f368210b40b58a28/src/support/index.coffee | 51 | 71 |
mojotech/pioneer:src/support/index.coffee:1:raw_corpus | raw_corpus | module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw ... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 1 | 50 | ||
mojotech/pioneer:src/support/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
... | var splice = [].splice;
module.exports = function() {
var _After, _Before;
this.logger = require('./logger');
this.timeout = 5000;
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.After;
this._inFlow = function(code, callback) {
ret... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var splice = [].splice;
module.exports = function() {
var _After, _Before;
this.logger = require('./logger');
this.timeout = 5000;
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.Aft... | module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw ... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:completion | completion | module.exports = ->
@logger = require './logger'
@timeout = 5000
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw ... | @BeforeAll = (code) ->
unless @_ranBeforeAll
@_ranBeforeAll = true
@Before code
@AfterAll = (code) ->
unless @_ranAfterAll
@_ranAfterAll = true
@After code
@Given = @When = @Then = @And = (pattern, code) =>
@defineStep pattern, (args..., callback) =>
start = new Date
... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | @Before ->
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build()
@After ->
@driver.close()
@driver.quit() | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 51 | 57 | ||
mojotech/pioneer:src/support/index.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@Before ->
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build()
@After ->
@driver.close()
@driver.quit()
``` | this.Before(function() {
return this.driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build();
});
this.After(function() {
this.driver.close();
return this.driver.quit();
}); | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 51 | 57 |
mojotech/pioneer:src/support/index.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.Before(function() {
return this.driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build();
});
this.After(function() {
this.driver.close();
return this.driver.quit();
});
``` | @Before ->
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build()
@After ->
@driver.close()
@driver.quit() | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 51 | 57 |
mojotech/pioneer:src/support/index.coffee:2:completion | completion | @Before ->
@driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build() | @After ->
@driver.close()
@driver.quit() | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | 71cea788cc56a1a394e540d3600a9b0dfccf4590 | 523 | https://github.com/mojotech/pioneer/blob/71cea788cc56a1a394e540d3600a9b0dfccf4590/src/support/index.coffee | 51 | 57 |
mojotech/pioneer:src/support/index.coffee:1:raw_corpus | raw_corpus | module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw err
@Before = (c... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | a747d38a287f3e7824998793d9a84063d8d662d9 | 523 | https://github.com/mojotech/pioneer/blob/a747d38a287f3e7824998793d9a84063d8d662d9/src/support/index.coffee | 1 | 50 | ||
mojotech/pioneer:src/support/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(... | var splice = [].splice;
module.exports = function() {
var _After, _Before;
this.logger = require('./logger');
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.After;
this._inFlow = function(code, callback) {
return $.createFlow((flow)... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | a747d38a287f3e7824998793d9a84063d8d662d9 | 523 | https://github.com/mojotech/pioneer/blob/a747d38a287f3e7824998793d9a84063d8d662d9/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var splice = [].splice;
module.exports = function() {
var _After, _Before;
this.logger = require('./logger');
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.After;
this._inFlow = fu... | module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw err
@Before = (c... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | a747d38a287f3e7824998793d9a84063d8d662d9 | 523 | https://github.com/mojotech/pioneer/blob/a747d38a287f3e7824998793d9a84063d8d662d9/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:completion | completion | module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null),
(err) -> throw err
@Before = (c... | @_ranBeforeAll = true
@Before code
@AfterAll = (code) ->
unless @_ranAfterAll
@_ranAfterAll = true
@After code
@Given = @When = @Then = @And = (pattern, code) =>
@defineStep pattern, (args..., callback) =>
start = new Date
callforth = =>
$
.createFlow (flow) ... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | a747d38a287f3e7824998793d9a84063d8d662d9 | 523 | https://github.com/mojotech/pioneer/blob/a747d38a287f3e7824998793d9a84063d8d662d9/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | @driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build()
@After ->
@driver.close()
@driver.quit() | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | a747d38a287f3e7824998793d9a84063d8d662d9 | 523 | https://github.com/mojotech/pioneer/blob/a747d38a287f3e7824998793d9a84063d8d662d9/src/support/index.coffee | 51 | 55 | ||
mojotech/pioneer:src/support/index.coffee:2:completion | completion | @driver = new Driver.Builder().withCapabilities(Driver.Capabilities.chrome()).build() | @After ->
@driver.close()
@driver.quit() | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | a747d38a287f3e7824998793d9a84063d8d662d9 | 523 | https://github.com/mojotech/pioneer/blob/a747d38a287f3e7824998793d9a84063d8d662d9/src/support/index.coffee | 51 | 55 |
mojotech/pioneer:src/support/index.coffee:1:raw_corpus | raw_corpus | module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null), callback
@Before = (code) ->
_Bef... | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 1 | 50 | ||
mojotech/pioneer:src/support/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(... | var splice = [].splice;
module.exports = function() {
var _After, _Before;
this.logger = require('./logger');
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.After;
this._inFlow = function(code, callback) {
return $.createFlow((flow)... | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var splice = [].splice;
module.exports = function() {
var _After, _Before;
this.logger = require('./logger');
this.visit = (path) => {
return this.driver.get(`${this.host}${path}`);
};
_Before = this.Before;
_After = this.After;
this._inFlow = fu... | module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null), callback
@Before = (code) ->
_Bef... | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:1:completion | completion | module.exports = ->
@logger = require './logger'
@visit = (path) =>
@driver.get "#{@host}#{path}"
_Before = @Before
_After = @After
@_inFlow = (code, callback) ->
$.createFlow (flow) =>
flow.execute => code.call(@)
.then _.partial(callback, null), callback
@Before = (code) ->
_Bef... | @Before code
@AfterAll = (code) ->
unless @_ranAfterAll
@_ranAfterAll = true
@After code
@Given = @When = @Then = @And = (pattern, code) =>
@defineStep pattern, (args..., callback) =>
start = new Date
callforth = =>
$
.createFlow (flow) =>
flow.execute =>... | CoffeeScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 1 | 50 |
mojotech/pioneer:src/support/index.coffee:2:raw_corpus | raw_corpus | @After ->
@driver.close()
@driver.quit() | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 51 | 54 | ||
mojotech/pioneer:src/support/index.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
@After ->
@driver.close()
@driver.quit()
``` | this.After(function() {
this.driver.close();
return this.driver.quit();
}); | CoffeeScript | JavaScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 51 | 54 |
mojotech/pioneer:src/support/index.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
this.After(function() {
this.driver.close();
return this.driver.quit();
});
``` | @After ->
@driver.close()
@driver.quit() | JavaScript | CoffeeScript | mojotech/pioneer | src/support/index.coffee | MIT | e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9 | 523 | https://github.com/mojotech/pioneer/blob/e9fdc7a7ba2009bbc9b1ac7e53b8659124d901f9/src/support/index.coffee | 51 | 54 |
linemanjs/lineman:config/plugins/handlebars.coffee:1:raw_corpus | raw_corpus | module.exports = (lineman) ->
config:
handlebars:
compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>" | CoffeeScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/handlebars.coffee | 1 | 6 | ||
linemanjs/lineman:config/plugins/handlebars.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (lineman) ->
config:
handlebars:
compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>"
``` | module.exports = function(lineman) {
return {
config: {
handlebars: {
compile: {
files: {
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>"
}
}
}
}
};
}; | CoffeeScript | JavaScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/handlebars.coffee | 1 | 6 |
linemanjs/lineman:config/plugins/handlebars.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(lineman) {
return {
config: {
handlebars: {
compile: {
files: {
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>"
}
}
}
}
};
};
``` | module.exports = (lineman) ->
config:
handlebars:
compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>" | JavaScript | CoffeeScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/handlebars.coffee | 1 | 6 |
linemanjs/lineman:config/plugins/handlebars.coffee:1:completion | completion | module.exports = (lineman) ->
config:
handlebars: | compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>" | CoffeeScript | CoffeeScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/handlebars.coffee | 1 | 6 |
linemanjs/lineman:config/plugins/handlebars.coffee:1:raw_corpus | raw_corpus | module.exports = (lineman) ->
config:
compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>" | CoffeeScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/handlebars.coffee | 1 | 5 | ||
linemanjs/lineman:config/plugins/handlebars.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (lineman) ->
config:
compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>"
``` | module.exports = function(lineman) {
return {
config: {
compile: {
files: {
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>"
}
}
}
};
}; | CoffeeScript | JavaScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/handlebars.coffee | 1 | 5 |
linemanjs/lineman:config/plugins/handlebars.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(lineman) {
return {
config: {
compile: {
files: {
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>"
}
}
}
};
};
``` | module.exports = (lineman) ->
config:
compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>" | JavaScript | CoffeeScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/handlebars.coffee | 1 | 5 |
linemanjs/lineman:config/plugins/handlebars.coffee:1:completion | completion | module.exports = (lineman) ->
config: | compile:
files:
"<%= files.template.generatedHandlebars %>": "<%= files.template.handlebars %>" | CoffeeScript | CoffeeScript | linemanjs/lineman | config/plugins/handlebars.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/handlebars.coffee | 1 | 5 |
buttercoin/buttercoin:lib/ews/protocol.coffee:1:raw_corpus | raw_corpus | helpers = require('enkihelpers')
Q = require('q')
stump = require('stump')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@,... | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | a825a9ea31d695f8abb600f3f27ff635a839c0c2 | 663 | https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/protocol.coffee | 1 | 43 | ||
buttercoin/buttercoin:lib/ews/protocol.coffee:1:completion | completion | helpers = require('enkihelpers')
Q = require('q')
stump = require('stump')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@,... | @connection = connection
@info 'STARTING PROTOCOL'
@connection.on('parsed_data', @handle_parsed_data)
@connection.once('close', @handle_close)
@connection.once('open', @handle_open)
return @protocol_ready.promise
handle_close: =>
# Protocol closed - tell the server to clean up.
@info 'PRO... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | a825a9ea31d695f8abb600f3f27ff635a839c0c2 | 663 | https://github.com/buttercoin/buttercoin/blob/a825a9ea31d695f8abb600f3f27ff635a839c0c2/lib/ews/protocol.coffee | 1 | 43 |
buttercoin/buttercoin:lib/ews/protocol.coffee:1:raw_corpus | raw_corpus | helpers = require('enkihelpers')
Q = require('q')
stump = require('stump')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@,... | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | a3d546dc9e3d772b25933baa2a61c94d54604724 | 663 | https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/protocol.coffee | 1 | 42 | ||
buttercoin/buttercoin:lib/ews/protocol.coffee:1:completion | completion | helpers = require('enkihelpers')
Q = require('q')
stump = require('stump')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@,... | @connection = connection
@info 'STARTING PROTOCOL'
@connection.on('parsed_data', @handle_parsed_data)
@connection.once('close', @handle_close)
@connection.once('open', @handle_open)
return @protocol_ready.promise
handle_close: =>
# Protocol closed - tell the server to clean up.
@info 'PRO... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | a3d546dc9e3d772b25933baa2a61c94d54604724 | 663 | https://github.com/buttercoin/buttercoin/blob/a3d546dc9e3d772b25933baa2a61c94d54604724/lib/ews/protocol.coffee | 1 | 42 |
buttercoin/buttercoin:lib/ews/protocol.coffee:1:raw_corpus | raw_corpus | helpers = require('enkihelpers')
Q = require('q')
stump = require('stump')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@,... | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | 46d1f5270f26492ff7928771e4a55b06ed8c9aab | 663 | https://github.com/buttercoin/buttercoin/blob/46d1f5270f26492ff7928771e4a55b06ed8c9aab/lib/ews/protocol.coffee | 1 | 36 | ||
buttercoin/buttercoin:lib/ews/protocol.coffee:1:completion | completion | helpers = require('enkihelpers')
Q = require('q')
stump = require('stump')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@,... | return @constructor.name
start: (@connection) => # Connection has been initialized but not yet connected.
@connection = @connection
@info 'STARTING PROTOCOL'
@connection.on('parsed_data', @handle_parsed_data)
@connection.once('close', @handle_close)
@connection.once('open', @handle_open)
retu... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | 46d1f5270f26492ff7928771e4a55b06ed8c9aab | 663 | https://github.com/buttercoin/buttercoin/blob/46d1f5270f26492ff7928771e4a55b06ed8c9aab/lib/ews/protocol.coffee | 1 | 36 |
buttercoin/buttercoin:lib/ews/protocol.coffee:1:raw_corpus | raw_corpus | helpers = require('enkihelpers')
Q = require('q')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@, @constructor.name)
e... | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | c87785c085716042476fba3dee430b2baaacc139 | 663 | https://github.com/buttercoin/buttercoin/blob/c87785c085716042476fba3dee430b2baaacc139/lib/ews/protocol.coffee | 1 | 35 | ||
buttercoin/buttercoin:lib/ews/protocol.coffee:1:completion | completion | helpers = require('enkihelpers')
Q = require('q')
# EventEmitter = require('eemitterport').EventEmitter
EventEmitter = require('chained-emitter').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@, @constructor.name)
e... | return @constructor.name
start: (@connection) => # Connection has been initialized but not yet connected.
@connection = @connection
@info 'STARTING PROTOCOL'
@connection.on('parsed_data', @handle_parsed_data)
@connection.once('close', @handle_close)
@connection.once('open', @handle_open)
retu... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | c87785c085716042476fba3dee430b2baaacc139 | 663 | https://github.com/buttercoin/buttercoin/blob/c87785c085716042476fba3dee430b2baaacc139/lib/ews/protocol.coffee | 1 | 35 |
buttercoin/buttercoin:lib/ews/protocol.coffee:1:raw_corpus | raw_corpus | helpers = require('enkihelpers')
Q = require('q')
EventEmitter = require('eemitterport').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@, @constructor.name)
else
@parent.stumpify(@, @constructor.name)
@pr... | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | a029c1a623369cb4df0af6e982a2420b6c0d1a62 | 663 | https://github.com/buttercoin/buttercoin/blob/a029c1a623369cb4df0af6e982a2420b6c0d1a62/lib/ews/protocol.coffee | 1 | 34 | ||
buttercoin/buttercoin:lib/ews/protocol.coffee:1:completion | completion | helpers = require('enkihelpers')
Q = require('q')
EventEmitter = require('eemitterport').EventEmitter
module.exports = class Protocol extends EventEmitter
constructor: (@options, @parent) ->
if not @parent
stump.stumpify(@, @constructor.name)
else
@parent.stumpify(@, @constructor.name)
@pr... | start: (@connection) => # Connection has been initialized but not yet connected.
@connection = @connection
@info 'STARTING PROTOCOL'
@connection.on('parsed_data', @handle_parsed_data)
@connection.once('close', @handle_close)
@connection.once('open', @handle_open)
return @protocol_ready.promise
... | CoffeeScript | CoffeeScript | buttercoin/buttercoin | lib/ews/protocol.coffee | MIT | a029c1a623369cb4df0af6e982a2420b6c0d1a62 | 663 | https://github.com/buttercoin/buttercoin/blob/a029c1a623369cb4df0af6e982a2420b6c0d1a62/lib/ews/protocol.coffee | 1 | 34 |
Pagedraw/pagedraw:bin/parse-google-fonts.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
fs = require 'fs'
path = require 'path'
_l = require 'lodash'
src_gfonts_list_file_path = "#{__dirname}/../src/google-web-fonts-list.json"
fresh_gfont_data = JSON.parse fs.readFileSync("/dev/stdin", "utf-8")
for font_name, {variants} of fresh_gfont_data
fresh_gfont_data[font_name].variants =... | CoffeeScript | Pagedraw/pagedraw | bin/parse-google-fonts.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/parse-google-fonts.coffee | 1 | 34 | ||
Pagedraw/pagedraw:bin/parse-google-fonts.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#!/usr/bin/env coffee
fs = require 'fs'
path = require 'path'
_l = require 'lodash'
src_gfonts_list_file_path = "#{__dirname}/../src/google-web-fonts-list.json"
fresh_gfont_data = JSON.parse fs.readFileSync("/dev/stdin", "utf-8")
for font_name, {variants} of ... | //!/usr/bin/env coffee
var _l, font_name, fresh_gfont_data, fs, old_data, path, ref, src_gfonts_list_file_path, variants;
fs = require('fs');
path = require('path');
_l = require('lodash');
src_gfonts_list_file_path = `${__dirname}/../src/google-web-fonts-list.json`;
fresh_gfont_data = JSON.parse(fs.readFileSync("... | CoffeeScript | JavaScript | Pagedraw/pagedraw | bin/parse-google-fonts.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/parse-google-fonts.coffee | 1 | 34 |
Pagedraw/pagedraw:bin/parse-google-fonts.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var _l, font_name, fresh_gfont_data, fs, old_data, path, ref, src_gfonts_list_file_path, variants;
fs = require('fs');
path = require('path');
_l = require('lodash');
src_gfonts_list_file_path = `${__dirname}/../src/google-web-fonts-list.... | #!/usr/bin/env coffee
fs = require 'fs'
path = require 'path'
_l = require 'lodash'
src_gfonts_list_file_path = "#{__dirname}/../src/google-web-fonts-list.json"
fresh_gfont_data = JSON.parse fs.readFileSync("/dev/stdin", "utf-8")
for font_name, {variants} of fresh_gfont_data
fresh_gfont_data[font_name].variants =... | JavaScript | CoffeeScript | Pagedraw/pagedraw | bin/parse-google-fonts.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/parse-google-fonts.coffee | 1 | 34 |
Pagedraw/pagedraw:bin/parse-google-fonts.coffee:1:completion | completion | #!/usr/bin/env coffee
fs = require 'fs'
path = require 'path'
_l = require 'lodash'
src_gfonts_list_file_path = "#{__dirname}/../src/google-web-fonts-list.json"
fresh_gfont_data = JSON.parse fs.readFileSync("/dev/stdin", "utf-8")
for font_name, {variants} of fresh_gfont_data
fresh_gfont_data[font_name].variants =... | # if things were deleted, use their old version. We can't handle deleting things on our side
# for now, even if Google deletes them. Hopefully they're backsupporting things they've
# officially deleted. I'm seeing this with "Droid Sans Mono"/"Droid Sans"/"Droid Serif" today.
# Note we want to preserve the ordering f... | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | bin/parse-google-fonts.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/bin/parse-google-fonts.coffee | 1 | 34 |
oozcitak/xmlbuilder-js:test/basic/cdata.coffee:1:raw_corpus | raw_corpus | suite 'CDATA', ->
test 'Nested CDATA', ->
eq(
xml('test', {}, {}, { headless: true })
.cdata('foo and <![CDATA[<foo>bar</foo>]]> bar')
.end()
'<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test>'
) | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/cdata.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/cdata.coffee | 1 | 8 | ||
oozcitak/xmlbuilder-js:test/basic/cdata.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'CDATA', ->
test 'Nested CDATA', ->
eq(
xml('test', {}, {}, { headless: true })
.cdata('foo and <![CDATA[<foo>bar</foo>]]> bar')
.end()
'<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test>'
)
``` | suite('CDATA', function() {
return test('Nested CDATA', function() {
return eq(xml('test', {}, {}, {
headless: true
}).cdata('foo and <![CDATA[<foo>bar</foo>]]> bar').end(), '<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test>');
});
}); | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/basic/cdata.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/cdata.coffee | 1 | 8 |
oozcitak/xmlbuilder-js:test/basic/cdata.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
suite('CDATA', function() {
return test('Nested CDATA', function() {
return eq(xml('test', {}, {}, {
headless: true
}).cdata('foo and <![CDATA[<foo>bar</foo>]]> bar').end(), '<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test... | suite 'CDATA', ->
test 'Nested CDATA', ->
eq(
xml('test', {}, {}, { headless: true })
.cdata('foo and <![CDATA[<foo>bar</foo>]]> bar')
.end()
'<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test>'
) | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/cdata.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/cdata.coffee | 1 | 8 |
oozcitak/xmlbuilder-js:test/basic/cdata.coffee:1:completion | completion | suite 'CDATA', ->
test 'Nested CDATA', ->
eq(
xml('test', {}, {}, { headless: true }) | .cdata('foo and <![CDATA[<foo>bar</foo>]]> bar')
.end()
'<test><![CDATA[foo and <![CDATA[<foo>bar</foo>]]]]><![CDATA[> bar]]></test>'
) | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/basic/cdata.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/basic/cdata.coffee | 1 | 8 |
soyjavi/QuoJS:src/quo2.events.coffee:1:raw_corpus | raw_corpus | (($$) ->
READY_EXPRESSION = /complete|loaded|interactive/
SHORTCUTS = [ "touch", "tap" ]
SHORTCUTS_EVENTS =
touch: "touchstart"
tap: "tap"
SHORTCUTS.forEach (event) ->
$$.fn[event] = (callback) ->
$$(document.body).delegate @selector, SHORTCUTS_EVENTS[event], callba... | CoffeeScript | soyjavi/QuoJS | src/quo2.events.coffee | MIT | 614f5925ddf2055d34da9c812e1a59c75f9266fd | 2,055 | https://github.com/soyjavi/QuoJS/blob/614f5925ddf2055d34da9c812e1a59c75f9266fd/src/quo2.events.coffee | 1 | 26 | ||
soyjavi/QuoJS:src/quo2.events.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
(($$) ->
READY_EXPRESSION = /complete|loaded|interactive/
SHORTCUTS = [ "touch", "tap" ]
SHORTCUTS_EVENTS =
touch: "touchstart"
tap: "tap"
SHORTCUTS.forEach (event) ->
$$.fn[event] = (callback) ->
$$(document.... | (function($$) {
var READY_EXPRESSION, SHORTCUTS, SHORTCUTS_EVENTS;
READY_EXPRESSION = /complete|loaded|interactive/;
SHORTCUTS = ["touch", "tap"];
SHORTCUTS_EVENTS = {
touch: "touchstart",
tap: "tap"
};
SHORTCUTS.forEach(function(event) {
$$.fn[event] = function(callback) {
return $$(docum... | CoffeeScript | JavaScript | soyjavi/QuoJS | src/quo2.events.coffee | MIT | 614f5925ddf2055d34da9c812e1a59c75f9266fd | 2,055 | https://github.com/soyjavi/QuoJS/blob/614f5925ddf2055d34da9c812e1a59c75f9266fd/src/quo2.events.coffee | 1 | 26 |
soyjavi/QuoJS:src/quo2.events.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
(function($$) {
var READY_EXPRESSION, SHORTCUTS, SHORTCUTS_EVENTS;
READY_EXPRESSION = /complete|loaded|interactive/;
SHORTCUTS = ["touch", "tap"];
SHORTCUTS_EVENTS = {
touch: "touchstart",
tap: "tap"
};
SHORTCUTS.forEach(function(event) {
$$... | (($$) ->
READY_EXPRESSION = /complete|loaded|interactive/
SHORTCUTS = [ "touch", "tap" ]
SHORTCUTS_EVENTS =
touch: "touchstart"
tap: "tap"
SHORTCUTS.forEach (event) ->
$$.fn[event] = (callback) ->
$$(document.body).delegate @selector, SHORTCUTS_EVENTS[event], callba... | JavaScript | CoffeeScript | soyjavi/QuoJS | src/quo2.events.coffee | MIT | 614f5925ddf2055d34da9c812e1a59c75f9266fd | 2,055 | https://github.com/soyjavi/QuoJS/blob/614f5925ddf2055d34da9c812e1a59c75f9266fd/src/quo2.events.coffee | 1 | 26 |
soyjavi/QuoJS:src/quo2.events.coffee:1:completion | completion | (($$) ->
READY_EXPRESSION = /complete|loaded|interactive/
SHORTCUTS = [ "touch", "tap" ]
SHORTCUTS_EVENTS =
touch: "touchstart"
tap: "tap"
SHORTCUTS.forEach (event) ->
$$.fn[event] = (callback) ->
$$(document.body).delegate @selector, SHORTCUTS_EVENTS[event], callba... | $$.fn.on = (event, selector, callback) ->
(if (selector is `undefined` or $$.toType(selector) is "function") then @bind(event, selector) else @delegate(selector, event, callback))
$$.fn.off = (event, selector, callback) ->
(if (selector is `undefined` or $$.toType(selector) is "function") then @unb... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | src/quo2.events.coffee | MIT | 614f5925ddf2055d34da9c812e1a59c75f9266fd | 2,055 | https://github.com/soyjavi/QuoJS/blob/614f5925ddf2055d34da9c812e1a59c75f9266fd/src/quo2.events.coffee | 1 | 26 |
abe33/atom-pigments:lib/variable-parser.coffee:1:raw_corpus | raw_corpus | module.exports =
class VariableParser
constructor: (@registry) ->
parse: (expression) ->
for e in @registry.getExpressions()
return e.parse(expression) if e.match(expression)
return | CoffeeScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/variable-parser.coffee | 1 | 8 | ||
abe33/atom-pigments:lib/variable-parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
class VariableParser
constructor: (@registry) ->
parse: (expression) ->
for e in @registry.getExpressions()
return e.parse(expression) if e.match(expression)
return
``` | var VariableParser;
module.exports = VariableParser = class VariableParser {
constructor(registry) {
this.registry = registry;
}
parse(expression) {
var e, i, len, ref;
ref = this.registry.getExpressions();
for (i = 0, len = ref.length; i < len; i++) {
e = ref[i];
if (e.match(express... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/variable-parser.coffee | 1 | 8 |
abe33/atom-pigments:lib/variable-parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var VariableParser;
module.exports = VariableParser = class VariableParser {
constructor(registry) {
this.registry = registry;
}
parse(expression) {
var e, i, len, ref;
ref = this.registry.getExpressions();
for (i = 0, len = ref.length; i < ... | module.exports =
class VariableParser
constructor: (@registry) ->
parse: (expression) ->
for e in @registry.getExpressions()
return e.parse(expression) if e.match(expression)
return | JavaScript | CoffeeScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/variable-parser.coffee | 1 | 8 |
abe33/atom-pigments:lib/variable-parser.coffee:1:completion | completion | module.exports =
class VariableParser
constructor: (@registry) ->
parse: (expression) -> | for e in @registry.getExpressions()
return e.parse(expression) if e.match(expression)
return | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/lib/variable-parser.coffee | 1 | 8 |
abe33/atom-pigments:lib/variable-parser.coffee:1:raw_corpus | raw_corpus | registry = require './variable-expressions'
module.exports =
class VariableParser
parse: (expression) ->
for e in registry.getExpressions()
return e.parse(expression) if e.match(expression)
return | CoffeeScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/variable-parser.coffee | 1 | 9 | ||
abe33/atom-pigments:lib/variable-parser.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
registry = require './variable-expressions'
module.exports =
class VariableParser
parse: (expression) ->
for e in registry.getExpressions()
return e.parse(expression) if e.match(expression)
return
``` | var VariableParser, registry;
registry = require('./variable-expressions');
module.exports = VariableParser = class VariableParser {
parse(expression) {
var e, i, len, ref;
ref = registry.getExpressions();
for (i = 0, len = ref.length; i < len; i++) {
e = ref[i];
if (e.match(expression)) {
... | CoffeeScript | JavaScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/variable-parser.coffee | 1 | 9 |
abe33/atom-pigments:lib/variable-parser.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var VariableParser, registry;
registry = require('./variable-expressions');
module.exports = VariableParser = class VariableParser {
parse(expression) {
var e, i, len, ref;
ref = registry.getExpressions();
for (i = 0, len = ref.length; i < len; i++)... | registry = require './variable-expressions'
module.exports =
class VariableParser
parse: (expression) ->
for e in registry.getExpressions()
return e.parse(expression) if e.match(expression)
return | JavaScript | CoffeeScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/variable-parser.coffee | 1 | 9 |
abe33/atom-pigments:lib/variable-parser.coffee:1:completion | completion | registry = require './variable-expressions'
module.exports =
class VariableParser | parse: (expression) ->
for e in registry.getExpressions()
return e.parse(expression) if e.match(expression)
return | CoffeeScript | CoffeeScript | abe33/atom-pigments | lib/variable-parser.coffee | MIT | 6b9b5368e8a617bbb73ccdb1da96350aba9fd444 | 518 | https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/lib/variable-parser.coffee | 1 | 9 |
flosse/sloc:src/cli.coffee:3:raw_corpus | raw_corpus | object = (val) ->
result = {}
for split in list(val).map(keyvalue)
[custom, original] = split
result[custom] = original
result
exts = ("*.#{k}" for k in sloc.extensions) | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 18 | 24 | ||
flosse/sloc:src/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
object = (val) ->
result = {}
for split in list(val).map(keyvalue)
[custom, original] = split
result[custom] = original
result
exts = ("*.#{k}" for k in sloc.extensions)
``` | var exts, k, object;
object = function(val) {
var custom, i, len, original, ref, result, split;
result = {};
ref = list(val).map(keyvalue);
for (i = 0, len = ref.length; i < len; i++) {
split = ref[i];
[custom, original] = split;
result[custom] = original;
}
return result;
};
exts = (function(... | CoffeeScript | JavaScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 18 | 24 |
flosse/sloc:src/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var exts, k, object;
object = function(val) {
var custom, i, len, original, ref, result, split;
result = {};
ref = list(val).map(keyvalue);
for (i = 0, len = ref.length; i < len; i++) {
split = ref[i];
[custom, original] = split;
result[custom]... | object = (val) ->
result = {}
for split in list(val).map(keyvalue)
[custom, original] = split
result[custom] = original
result
exts = ("*.#{k}" for k in sloc.extensions) | JavaScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 18 | 24 |
flosse/sloc:src/cli.coffee:3:completion | completion | object = (val) ->
result = {}
for split in list(val).map(keyvalue) | [custom, original] = split
result[custom] = original
result
exts = ("*.#{k}" for k in sloc.extensions) | CoffeeScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 18 | 24 |
flosse/sloc:src/cli.coffee:4:raw_corpus | raw_corpus | collect = (val, memo) ->
memo.push val
memo
colorRegex = /\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 26 | 30 | ||
flosse/sloc:src/cli.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
collect = (val, memo) ->
memo.push val
memo
colorRegex = /\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g
``` | var collect, colorRegex;
collect = function(val, memo) {
memo.push(val);
return memo;
};
colorRegex = /\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g; | CoffeeScript | JavaScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 26 | 30 |
flosse/sloc:src/cli.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var collect, colorRegex;
collect = function(val, memo) {
memo.push(val);
return memo;
};
colorRegex = /\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g;
``` | collect = (val, memo) ->
memo.push val
memo
colorRegex = /\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g | JavaScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 26 | 30 |
flosse/sloc:src/cli.coffee:4:completion | completion | collect = (val, memo) ->
memo.push val | memo
colorRegex = /\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g | CoffeeScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 26 | 30 |
flosse/sloc:src/cli.coffee:5:raw_corpus | raw_corpus | parseFile = (f, cb=->) ->
res = { path: f, stats: {}, badFile: no }
fs.readFile f, "utf8", (err, code) ->
if err
res.badFile = yes
return cb err, res
ext = path.extname(f)[1...]
res.stats = sloc code, options.alias[ext] or ext
cb null, res | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 32 | 40 | ||
flosse/sloc:src/cli.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
parseFile = (f, cb=->) ->
res = { path: f, stats: {}, badFile: no }
fs.readFile f, "utf8", (err, code) ->
if err
res.badFile = yes
return cb err, res
ext = path.extname(f)[1...]
res.stats = sloc code, options.alias[ext] or ext
cb n... | var parseFile;
parseFile = function(f, cb = function() {}) {
var res;
res = {
path: f,
stats: {},
badFile: false
};
return fs.readFile(f, "utf8", function(err, code) {
var ext;
if (err) {
res.badFile = true;
return cb(err, res);
}
ext = path.extname(f).slice(1);
res.... | CoffeeScript | JavaScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 32 | 40 |
flosse/sloc:src/cli.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var parseFile;
parseFile = function(f, cb = function() {}) {
var res;
res = {
path: f,
stats: {},
badFile: false
};
return fs.readFile(f, "utf8", function(err, code) {
var ext;
if (err) {
res.badFile = true;
return cb(err, r... | parseFile = (f, cb=->) ->
res = { path: f, stats: {}, badFile: no }
fs.readFile f, "utf8", (err, code) ->
if err
res.badFile = yes
return cb err, res
ext = path.extname(f)[1...]
res.stats = sloc code, options.alias[ext] or ext
cb null, res | JavaScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 32 | 40 |
flosse/sloc:src/cli.coffee:5:completion | completion | parseFile = (f, cb=->) ->
res = { path: f, stats: {}, badFile: no }
fs.readFile f, "utf8", (err, code) ->
if err | res.badFile = yes
return cb err, res
ext = path.extname(f)[1...]
res.stats = sloc code, options.alias[ext] or ext
cb null, res | CoffeeScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 32 | 40 |
flosse/sloc:src/cli.coffee:6:raw_corpus | raw_corpus | print = (result, opts, fmtOpts) ->
f = programOptions.format or 'simple'
unless (fmt = fmts[f])?
return console.error "Error: format #{f} is not supported"
out = fmt result, opts, fmtOpts
out = out.replace colorRegex, '' if programOptions.stripColors
console.log out if typeof out is "string" | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 42 | 48 | ||
flosse/sloc:src/cli.coffee:6:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
print = (result, opts, fmtOpts) ->
f = programOptions.format or 'simple'
unless (fmt = fmts[f])?
return console.error "Error: format #{f} is not supported"
out = fmt result, opts, fmtOpts
out = out.replace colorRegex, '' if programOptions.stripColors
... | var print;
print = function(result, opts, fmtOpts) {
var f, fmt, out;
f = programOptions.format || 'simple';
if ((fmt = fmts[f]) == null) {
return console.error(`Error: format ${f} is not supported`);
}
out = fmt(result, opts, fmtOpts);
if (programOptions.stripColors) {
out = out.replace(colorRegex... | CoffeeScript | JavaScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 42 | 48 |
flosse/sloc:src/cli.coffee:6:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var print;
print = function(result, opts, fmtOpts) {
var f, fmt, out;
f = programOptions.format || 'simple';
if ((fmt = fmts[f]) == null) {
return console.error(`Error: format ${f} is not supported`);
}
out = fmt(result, opts, fmtOpts);
if (program... | print = (result, opts, fmtOpts) ->
f = programOptions.format or 'simple'
unless (fmt = fmts[f])?
return console.error "Error: format #{f} is not supported"
out = fmt result, opts, fmtOpts
out = out.replace colorRegex, '' if programOptions.stripColors
console.log out if typeof out is "string" | JavaScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 42 | 48 |
flosse/sloc:src/cli.coffee:6:completion | completion | print = (result, opts, fmtOpts) ->
f = programOptions.format or 'simple'
unless (fmt = fmts[f])? | return console.error "Error: format #{f} is not supported"
out = fmt result, opts, fmtOpts
out = out.replace colorRegex, '' if programOptions.stripColors
console.log out if typeof out is "string" | CoffeeScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 42 | 48 |
flosse/sloc:src/cli.coffee:7:raw_corpus | raw_corpus | filterFiles = (files) ->
res =
if programOptions.exclude
exclude = new RegExp programOptions.exclude
files.filter (x) -> not exclude.test x.path
else
files
res2 =
if programOptions.include
include = new RegExp programOptions.include
res.filter (x) -> include.test x.path
... | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 50 | 99 | ||
flosse/sloc:src/cli.coffee:7:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
filterFiles = (files) ->
res =
if programOptions.exclude
exclude = new RegExp programOptions.exclude
files.filter (x) -> not exclude.test x.path
else
files
res2 =
if programOptions.include
include = new RegExp programOptio... | var filterFiles, fmtOpts, k, options;
filterFiles = function(files) {
var exclude, i, include, len, r, res, res2, results;
res = programOptions.exclude ? (exclude = new RegExp(programOptions.exclude), files.filter(function(x) {
return !exclude.test(x.path);
})) : files;
res2 = programOptions.include ? (inc... | CoffeeScript | JavaScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 50 | 99 |
flosse/sloc:src/cli.coffee:7:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var filterFiles, fmtOpts, k, options;
filterFiles = function(files) {
var exclude, i, include, len, r, res, res2, results;
res = programOptions.exclude ? (exclude = new RegExp(programOptions.exclude), files.filter(function(x) {
return !exclude.test(x.path)... | filterFiles = (files) ->
res =
if programOptions.exclude
exclude = new RegExp programOptions.exclude
files.filter (x) -> not exclude.test x.path
else
files
res2 =
if programOptions.include
include = new RegExp programOptions.include
res.filter (x) -> include.test x.path
... | JavaScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 50 | 99 |
flosse/sloc:src/cli.coffee:7:completion | completion | filterFiles = (files) ->
res =
if programOptions.exclude
exclude = new RegExp programOptions.exclude
files.filter (x) -> not exclude.test x.path
else
files
res2 =
if programOptions.include
include = new RegExp programOptions.include
res.filter (x) -> include.test x.path
... | .option '-e, --exclude <regex>',
'regular expression to exclude files and folders'
.option '-i, --include <regex>',
'regular expression to include files and folders'
.option '-f, --format <format>',
'format output:' + (" #{k}" for k of fmts).join ','
.option '--format-option [value]',
'add format... | CoffeeScript | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 50 | 99 |
flosse/sloc:src/cli.coffee:8:raw_corpus | raw_corpus | programOptions = programm.opts()
options.keys = programOptions.keys
options.details = programOptions.details
options.alias = programm.alias
for k of options.alias
exts.push "*.#{k}"
return programm.help() if programm.args.length < 1 | CoffeeScript | flosse/sloc | src/cli.coffee | MIT | e26044011821c4e170859362f2de657d64118711 | 969 | https://github.com/flosse/sloc/blob/e26044011821c4e170859362f2de657d64118711/src/cli.coffee | 100 | 108 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.