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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dodo/node-slug:test/slug.test.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should replace turkish chars', function() {
var char, char_map, replacement, results;
char_map = {
'ş': 's',
'Ş': 'S',
'ı': 'i',
'İ': 'I',
'ç': 'c',
'Ç': 'C',
'ü': 'u',
'Ü': 'U',
'ö': 'o',
'Ö': 'O',
'ğ': 'g',
... | it 'should replace turkish chars', ->
char_map = {
'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U',
'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G'
}
for char, replacement of char_map
slug("foo #{char} bar baz").should.eql "foo-#{replacement}-bar-baz... | JavaScript | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 401bb4845e38f6d3588e12494247207182f07cf1 | 1,072 | https://github.com/dodo/node-slug/blob/401bb4845e38f6d3588e12494247207182f07cf1/test/slug.test.coffee | 53 | 95 |
dodo/node-slug:test/slug.test.coffee:3:completion | completion | it 'should replace turkish chars', ->
char_map = {
'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U',
'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G'
}
for char, replacement of char_map
slug("foo #{char} bar baz").should.eql "foo-#{replacement}-bar-baz... | for char, replacement of char_map
expected = "foo-#{replacement}-bar-baz"
expected = "foo-bar-baz" if not replacement
slug("foo #{char} bar baz").should.eql expected
it 'should replace czech chars', ->
char_map = {
'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r'... | CoffeeScript | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 401bb4845e38f6d3588e12494247207182f07cf1 | 1,072 | https://github.com/dodo/node-slug/blob/401bb4845e38f6d3588e12494247207182f07cf1/test/slug.test.coffee | 53 | 95 |
dodo/node-slug:test/slug.test.coffee:4:raw_corpus | raw_corpus | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, ... | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 401bb4845e38f6d3588e12494247207182f07cf1 | 1,072 | https://github.com/dodo/node-slug/blob/401bb4845e38f6d3588e12494247207182f07cf1/test/slug.test.coffee | 97 | 133 | ||
dodo/node-slug:test/slug.test.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N... | it('should replace latvian chars', function() {
var char, char_map, replacement, results;
char_map = {
'ā': 'a',
'č': 'c',
'ē': 'e',
'ģ': 'g',
'ī': 'i',
'ķ': 'k',
'ļ': 'l',
'ņ': 'n',
'š': 's',
'ū': 'u',
'ž': 'z',
'Ā': 'A',
'Č': 'C',
'Ē': 'E',
'Ģ': 'G',
... | CoffeeScript | JavaScript | dodo/node-slug | test/slug.test.coffee | MIT | 401bb4845e38f6d3588e12494247207182f07cf1 | 1,072 | https://github.com/dodo/node-slug/blob/401bb4845e38f6d3588e12494247207182f07cf1/test/slug.test.coffee | 97 | 133 |
dodo/node-slug:test/slug.test.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should replace latvian chars', function() {
var char, char_map, replacement, results;
char_map = {
'ā': 'a',
'č': 'c',
'ē': 'e',
'ģ': 'g',
'ī': 'i',
'ķ': 'k',
'ļ': 'l',
'ņ': 'n',
'š': 's',
'ū': 'u',
'ž': 'z',
... | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, ... | JavaScript | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 401bb4845e38f6d3588e12494247207182f07cf1 | 1,072 | https://github.com/dodo/node-slug/blob/401bb4845e38f6d3588e12494247207182f07cf1/test/slug.test.coffee | 97 | 133 |
dodo/node-slug:test/slug.test.coffee:4:completion | completion | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, ... | }
for char, replacement of char_map
replacement = replacement.replace ' ', '-'
slug("foo #{char} bar baz").should.eql "foo-#{replacement}-bar-baz"
it 'should replace symbols', ->
char_map = {
'©':'(c)', 'œ': 'oe', 'Œ': 'OE', '∑': 'sum', '®': '(r)', '†': '+',
... | CoffeeScript | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 401bb4845e38f6d3588e12494247207182f07cf1 | 1,072 | https://github.com/dodo/node-slug/blob/401bb4845e38f6d3588e12494247207182f07cf1/test/slug.test.coffee | 97 | 133 |
dodo/node-slug:test/slug.test.coffee:4:raw_corpus | raw_corpus | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, replacement of char_map
slug("foo... | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | e63a2c1846c4fef95075f60d4d4d0a0753f4d4f3 | 1,072 | https://github.com/dodo/node-slug/blob/e63a2c1846c4fef95075f60d4d4d0a0753f4d4f3/test/slug.test.coffee | 97 | 133 | ||
dodo/node-slug:test/slug.test.coffee:4:completion | completion | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, replacement of char_map
slug("foo... | }
for char, replacement of char_map
replacement = replacement.replace ' ', '-'
slug("foo #{char} bar baz").should.eql "foo-#{replacement}-bar-baz"
it 'should replace symbols', ->
char_map = {
'©':'(c)', 'œ': 'oe', 'Œ': 'OE', '∑': 'sum', '®': '(r)', '†': '+',
'“': '"', '”': '"', '‘': "'", '’': "'... | CoffeeScript | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | e63a2c1846c4fef95075f60d4d4d0a0753f4d4f3 | 1,072 | https://github.com/dodo/node-slug/blob/e63a2c1846c4fef95075f60d4d4d0a0753f4d4f3/test/slug.test.coffee | 97 | 133 |
dodo/node-slug:test/slug.test.coffee:4:raw_corpus | raw_corpus | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, replacement of char_map
slug("foo... | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 52b55074f63bdab57945974f913ca288aa50064a | 1,072 | https://github.com/dodo/node-slug/blob/52b55074f63bdab57945974f913ca288aa50064a/test/slug.test.coffee | 97 | 129 | ||
dodo/node-slug:test/slug.test.coffee:4:completion | completion | it 'should replace latvian chars', ->
char_map = {
'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
}
for char, replacement of char_map
slug("foo... | '円': 'yen', '﷼': 'rial', '₠': 'ecu', '¤': 'currency', '฿': 'baht',
"$": 'dollar'
}
for char, replacement of char_map
replacement = replacement.replace ' ', '-'
slug("foo #{char} bar baz").should.eql "foo-#{replacement}-bar-baz"
it 'should replace symbols', ->
char_map = {
'©':'(c)', 'œ': 'oe',... | CoffeeScript | CoffeeScript | dodo/node-slug | test/slug.test.coffee | MIT | 52b55074f63bdab57945974f913ca288aa50064a | 1,072 | https://github.com/dodo/node-slug/blob/52b55074f63bdab57945974f913ca288aa50064a/test/slug.test.coffee | 97 | 129 |
jianliaoim/talk-os:talk-api2x/test/servers/teambition.coffee:1:raw_corpus | raw_corpus | express = require 'express'
_ = require 'lodash'
module.exports = app = express()
tbOrgs =
'55f7d19c85efe377996a113f':
_id: "55f7d19c85efe377996a113f"
name: "orgz1"
'55f7d19c85efe377996a114f':
_id: "55f7d19c85efe377996a114f"
name: "orgz2"
tbMembers =
"55f7d19c85efe377996a113f": [
_id: '55f7... | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/servers/teambition.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/teambition.coffee | 1 | 47 | ||
jianliaoim/talk-os:talk-api2x/test/servers/teambition.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
express = require 'express'
_ = require 'lodash'
module.exports = app = express()
tbOrgs =
'55f7d19c85efe377996a113f':
_id: "55f7d19c85efe377996a113f"
name: "orgz1"
'55f7d19c85efe377996a114f':
_id: "55f7d19c85efe377996a114f"
name: "orgz2"
t... | var _, app, express, tbMembers, tbOrgs;
express = require('express');
_ = require('lodash');
module.exports = app = express();
tbOrgs = {
'55f7d19c85efe377996a113f': {
_id: "55f7d19c85efe377996a113f",
name: "orgz1"
},
'55f7d19c85efe377996a114f': {
_id: "55f7d19c85efe377996a114f",
name: "orgz2"... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/test/servers/teambition.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/teambition.coffee | 1 | 47 |
jianliaoim/talk-os:talk-api2x/test/servers/teambition.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, app, express, tbMembers, tbOrgs;
express = require('express');
_ = require('lodash');
module.exports = app = express();
tbOrgs = {
'55f7d19c85efe377996a113f': {
_id: "55f7d19c85efe377996a113f",
name: "orgz1"
},
'55f7d19c85efe377996a114f': {... | express = require 'express'
_ = require 'lodash'
module.exports = app = express()
tbOrgs =
'55f7d19c85efe377996a113f':
_id: "55f7d19c85efe377996a113f"
name: "orgz1"
'55f7d19c85efe377996a114f':
_id: "55f7d19c85efe377996a114f"
name: "orgz2"
tbMembers =
"55f7d19c85efe377996a113f": [
_id: '55f7... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/servers/teambition.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/teambition.coffee | 1 | 47 |
jianliaoim/talk-os:talk-api2x/test/servers/teambition.coffee:1:completion | completion | express = require 'express'
_ = require 'lodash'
module.exports = app = express()
tbOrgs =
'55f7d19c85efe377996a113f':
_id: "55f7d19c85efe377996a113f"
name: "orgz1"
'55f7d19c85efe377996a114f':
_id: "55f7d19c85efe377996a114f"
name: "orgz2"
tbMembers =
"55f7d19c85efe377996a113f": [
_id: '55f7... | phone: '13011111112'
email: '13011111112@teambition.com'
name: '13011111111'
],
"55f7d19c85efe377996a114f": [
_id: '55f7d19c85efe377996a1231'
_roleId: 0
phone: '13011111112'
email: '13011111112@teambition.com'
name: '13011111111'
]
app.get '/tbapi/organizations', (req, res) ->
res.s... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/test/servers/teambition.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/servers/teambition.coffee | 1 | 47 |
oozcitak/xmlbuilder-js:test/issues/97.coffee:1:raw_corpus | raw_corpus | obj =
root:
'@att': 'attribute value with & and &'
'#text': 'XML entities for ampersand are & and &.'
suite 'Tests specific to issues:', ->
test 'Issue #97 (No double encoding)', ->
eq(
xml(obj, { noDoubleEncoding: true }).end()
'<?xml version="1.0"?>' +
'<root att="at... | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/97.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/97.coffee | 1 | 23 | ||
oozcitak/xmlbuilder-js:test/issues/97.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
obj =
root:
'@att': 'attribute value with & and &'
'#text': 'XML entities for ampersand are & and &.'
suite 'Tests specific to issues:', ->
test 'Issue #97 (No double encoding)', ->
eq(
xml(obj, { noDoubleEncoding: true }).e... | var obj;
obj = {
root: {
'@att': 'attribute value with & and &',
'#text': 'XML entities for ampersand are & and &.'
}
};
suite('Tests specific to issues:', function() {
test('Issue #97 (No double encoding)', function() {
return eq(xml(obj, {
noDoubleEncoding: true
}).end(),... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/issues/97.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/97.coffee | 1 | 23 |
oozcitak/xmlbuilder-js:test/issues/97.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var obj;
obj = {
root: {
'@att': 'attribute value with & and &',
'#text': 'XML entities for ampersand are & and &.'
}
};
suite('Tests specific to issues:', function() {
test('Issue #97 (No double encoding)', function() {
return e... | obj =
root:
'@att': 'attribute value with & and &'
'#text': 'XML entities for ampersand are & and &.'
suite 'Tests specific to issues:', ->
test 'Issue #97 (No double encoding)', ->
eq(
xml(obj, { noDoubleEncoding: true }).end()
'<?xml version="1.0"?>' +
'<root att="at... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/97.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/97.coffee | 1 | 23 |
oozcitak/xmlbuilder-js:test/issues/97.coffee:1:completion | completion | obj =
root:
'@att': 'attribute value with & and &'
'#text': 'XML entities for ampersand are & and &.'
suite 'Tests specific to issues:', ->
test 'Issue #97 (No double encoding)', ->
eq(
xml(obj, { noDoubleEncoding: true }).end()
'<?xml version="1.0"?>' +
'<root att="at... | 'XML entities for ampersand are & and &#38;.' +
'</root>'
)
test 'Issue #97 (Double encoding - default behavior)', ->
eq(
xml(obj).end()
'<?xml version="1.0"?>' +
'<root att="attribute value with &amp; and &#38;">' +
'XML entities for ampersand are &amp; an... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/issues/97.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/97.coffee | 1 | 23 |
jianliaoim/talk-os:talk-web/test/spec/util/loading-sentences.spec.coffee:1:raw_corpus | raw_corpus | describe 'util: loading-sentences', ->
beforeEach ->
@util = require 'util/loading-sentences'
describe 'function: get', ->
it 'should return a sentence for any other date', ->
date = new Date(2016, 1, 12)
sentences = @util.list
expect(sentences).toContain @util.get(date) | CoffeeScript | jianliaoim/talk-os | talk-web/test/spec/util/loading-sentences.spec.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/loading-sentences.spec.coffee | 1 | 10 | ||
jianliaoim/talk-os:talk-web/test/spec/util/loading-sentences.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'util: loading-sentences', ->
beforeEach ->
@util = require 'util/loading-sentences'
describe 'function: get', ->
it 'should return a sentence for any other date', ->
date = new Date(2016, 1, 12)
sentences = @util.list
exp... | describe('util: loading-sentences', function() {
beforeEach(function() {
return this.util = require('util/loading-sentences');
});
return describe('function: get', function() {
return it('should return a sentence for any other date', function() {
var date, sentences;
date = new Date(2016, 1, 1... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/test/spec/util/loading-sentences.spec.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/loading-sentences.spec.coffee | 1 | 10 |
jianliaoim/talk-os:talk-web/test/spec/util/loading-sentences.spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('util: loading-sentences', function() {
beforeEach(function() {
return this.util = require('util/loading-sentences');
});
return describe('function: get', function() {
return it('should return a sentence for any other date', function() {
... | describe 'util: loading-sentences', ->
beforeEach ->
@util = require 'util/loading-sentences'
describe 'function: get', ->
it 'should return a sentence for any other date', ->
date = new Date(2016, 1, 12)
sentences = @util.list
expect(sentences).toContain @util.get(date) | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/test/spec/util/loading-sentences.spec.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/loading-sentences.spec.coffee | 1 | 10 |
jianliaoim/talk-os:talk-web/test/spec/util/loading-sentences.spec.coffee:1:completion | completion | describe 'util: loading-sentences', ->
beforeEach ->
@util = require 'util/loading-sentences' | describe 'function: get', ->
it 'should return a sentence for any other date', ->
date = new Date(2016, 1, 12)
sentences = @util.list
expect(sentences).toContain @util.get(date) | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/test/spec/util/loading-sentences.spec.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/spec/util/loading-sentences.spec.coffee | 1 | 10 |
soyjavi/QuoJS:src/quo2.vendor.coffee:1:raw_corpus | raw_corpus | (($) ->
VENDORS = [ "webkit", "moz", "ms", "o", "" ]
CSS_PROPERTIES =
userSelect: "none"
touchCallout: "none"
userDrag: "none"
tapHighlightColor: "rgba(0,0,0,0)"
_vendor = ->
properties = ""
i = 0
while i < VENDORS.length
for property of... | CoffeeScript | soyjavi/QuoJS | src/quo2.vendor.coffee | MIT | 64fce0651ddcb2b02acf5f53f9611109591e9d46 | 2,055 | https://github.com/soyjavi/QuoJS/blob/64fce0651ddcb2b02acf5f53f9611109591e9d46/src/quo2.vendor.coffee | 1 | 24 | ||
soyjavi/QuoJS:src/quo2.vendor.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
(($) ->
VENDORS = [ "webkit", "moz", "ms", "o", "" ]
CSS_PROPERTIES =
userSelect: "none"
touchCallout: "none"
userDrag: "none"
tapHighlightColor: "rgba(0,0,0,0)"
_vendor = ->
properties = ""
i = 0
... | (function($) {
var CSS_PROPERTIES, VENDORS, _vendor;
VENDORS = ["webkit", "moz", "ms", "o", ""];
CSS_PROPERTIES = {
userSelect: "none",
touchCallout: "none",
userDrag: "none",
tapHighlightColor: "rgba(0,0,0,0)"
};
_vendor = function() {
var i, properties, property, results;
properties ... | CoffeeScript | JavaScript | soyjavi/QuoJS | src/quo2.vendor.coffee | MIT | 64fce0651ddcb2b02acf5f53f9611109591e9d46 | 2,055 | https://github.com/soyjavi/QuoJS/blob/64fce0651ddcb2b02acf5f53f9611109591e9d46/src/quo2.vendor.coffee | 1 | 24 |
soyjavi/QuoJS:src/quo2.vendor.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
(function($) {
var CSS_PROPERTIES, VENDORS, _vendor;
VENDORS = ["webkit", "moz", "ms", "o", ""];
CSS_PROPERTIES = {
userSelect: "none",
touchCallout: "none",
userDrag: "none",
tapHighlightColor: "rgba(0,0,0,0)"
};
_vendor = function() {
... | (($) ->
VENDORS = [ "webkit", "moz", "ms", "o", "" ]
CSS_PROPERTIES =
userSelect: "none"
touchCallout: "none"
userDrag: "none"
tapHighlightColor: "rgba(0,0,0,0)"
_vendor = ->
properties = ""
i = 0
while i < VENDORS.length
for property of... | JavaScript | CoffeeScript | soyjavi/QuoJS | src/quo2.vendor.coffee | MIT | 64fce0651ddcb2b02acf5f53f9611109591e9d46 | 2,055 | https://github.com/soyjavi/QuoJS/blob/64fce0651ddcb2b02acf5f53f9611109591e9d46/src/quo2.vendor.coffee | 1 | 24 |
soyjavi/QuoJS:src/quo2.vendor.coffee:1:completion | completion | (($) ->
VENDORS = [ "webkit", "moz", "ms", "o", "" ]
CSS_PROPERTIES =
userSelect: "none"
touchCallout: "none"
userDrag: "none"
tapHighlightColor: "rgba(0,0,0,0)"
_vendor = ->
properties = ""
i = 0 | while i < VENDORS.length
for property of CSS_PROPERTIES
properties = property
properties = VENDORS[i] + properties.substring(0, 1).toUpperCase() + properties.substring(1) if VENDORS[i]
#@style(properties) = CSS_PROPERTIES[property]
i++
$.fn.v... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | src/quo2.vendor.coffee | MIT | 64fce0651ddcb2b02acf5f53f9611109591e9d46 | 2,055 | https://github.com/soyjavi/QuoJS/blob/64fce0651ddcb2b02acf5f53f9611109591e9d46/src/quo2.vendor.coffee | 1 | 24 |
jianliaoim/talk-os:talk-account/client/updater/index.coffee:1:raw_corpus | raw_corpus | route = require './route'
client = require './client'
account = require './account'
identity = (x) -> x
module.exports = (store, actionType, actionData) ->
handler = switch actionType
when 'route/signin' then route.signin
when 'route/signup' then route.signup
when 'route/forgot-password' then route.for... | CoffeeScript | jianliaoim/talk-os | talk-account/client/updater/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/index.coffee | 1 | 30 | ||
jianliaoim/talk-os:talk-account/client/updater/index.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
route = require './route'
client = require './client'
account = require './account'
identity = (x) -> x
module.exports = (store, actionType, actionData) ->
handler = switch actionType
when 'route/signin' then route.signin
when 'route/signup' then rou... | var account, client, identity, route;
route = require('./route');
client = require('./client');
account = require('./account');
identity = function(x) {
return x;
};
module.exports = function(store, actionType, actionData) {
var handler;
handler = (function() {
switch (actionType) {
case 'route/sig... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-account/client/updater/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/index.coffee | 1 | 30 |
jianliaoim/talk-os:talk-account/client/updater/index.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var account, client, identity, route;
route = require('./route');
client = require('./client');
account = require('./account');
identity = function(x) {
return x;
};
module.exports = function(store, actionType, actionData) {
var handler;
handler = (funct... | route = require './route'
client = require './client'
account = require './account'
identity = (x) -> x
module.exports = (store, actionType, actionData) ->
handler = switch actionType
when 'route/signin' then route.signin
when 'route/signup' then route.signup
when 'route/forgot-password' then route.for... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/updater/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/index.coffee | 1 | 30 |
jianliaoim/talk-os:talk-account/client/updater/index.coffee:1:completion | completion | route = require './route'
client = require './client'
account = require './account'
identity = (x) -> x
module.exports = (store, actionType, actionData) ->
handler = switch actionType
when 'route/signin' then route.signin
when 'route/signup' then route.signup
when 'route/forgot-password' then route.for... | when 'route/reset-password' then route.resetPassword
when 'route/go' then route.go
when 'client/account' then client.account
when 'client/password' then client.password
when 'client/loading' then client.loading
when 'client/reset-password' then client.resetPassword
when 'account/unbind-email' ... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-account/client/updater/index.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-account/client/updater/index.coffee | 1 | 30 |
mojs/mojs:src/easing/mix.coffee:1:raw_corpus | raw_corpus | easing = null
# Method to check if need to parse easing expression.
#
# @param {Object} Mix array item
# @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = (item)->
if typeof item.value is 'number' then item.value
else easing.parseEasing item.value
# ---
# Method to sort an array f... | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 1 | 50 | ||
mojs/mojs:src/easing/mix.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
easing = null
# Method to check if need to parse easing expression.
#
# @param {Object} Mix array item
# @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = (item)->
if typeof item.value is 'number' then item.value
else easing.... | var easing, getNearest, mix, parseIfEasing, sort;
easing = null;
// Method to check if need to parse easing expression.
// @param {Object} Mix array item
// @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = function(item) {
if (typeof item.value === 'number') {
return item.valu... | CoffeeScript | JavaScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 1 | 50 |
mojs/mojs:src/easing/mix.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var easing, getNearest, mix, parseIfEasing, sort;
easing = null;
// Method to check if need to parse easing expression.
// @param {Object} Mix array item
// @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = function(item) {
if ... | easing = null
# Method to check if need to parse easing expression.
#
# @param {Object} Mix array item
# @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = (item)->
if typeof item.value is 'number' then item.value
else easing.parseEasing item.value
# ---
# Method to sort an array f... | JavaScript | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 1 | 50 |
mojs/mojs:src/easing/mix.coffee:1:completion | completion | easing = null
# Method to check if need to parse easing expression.
#
# @param {Object} Mix array item
# @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = (item)->
if typeof item.value is 'number' then item.value
else easing.parseEasing item.value
# ---
# Method to sort an array f... | returnValue
# ---
# Method to get the nearest to item to the progress.
#
# @param {Array} Array to search in.
# @param {Number} Progress to search for.
# @return {Number} Nearest item index.
getNearest = (array, progress)->
for value, i in array
if value.to > progress
return i
# ---
# Method to get the... | CoffeeScript | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 1 | 50 |
mojs/mojs:src/easing/mix.coffee:2:raw_corpus | raw_corpus | (progress)->
index = getNearest(args, progress)
# return 1 if not defined
return 1 if typeof index is 'undefined'
if index isnt -1
value = args[index].value
# return 1 if not defined
return 1 if index is args.length-1 and progress > args[index].to
# evaluate the function if it ... | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 51 | 75 | ||
mojs/mojs:src/easing/mix.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
(progress)->
index = getNearest(args, progress)
# return 1 if not defined
return 1 if typeof index is 'undefined'
if index isnt -1
value = args[index].value
# return 1 if not defined
return 1 if index is args.length-1 and progr... | var create;
(function(progress) {
var index, value;
index = getNearest(args, progress);
if (typeof index === 'undefined') {
// return 1 if not defined
return 1;
}
if (index !== -1) {
value = args[index].value;
if (index === args.length - 1 && progress > args[index].to) {
// return 1 if ... | CoffeeScript | JavaScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 51 | 75 |
mojs/mojs:src/easing/mix.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var create;
(function(progress) {
var index, value;
index = getNearest(args, progress);
if (typeof index === 'undefined') {
// return 1 if not defined
return 1;
}
if (index !== -1) {
value = args[index].value;
if (index === args.length - ... | (progress)->
index = getNearest(args, progress)
# return 1 if not defined
return 1 if typeof index is 'undefined'
if index isnt -1
value = args[index].value
# return 1 if not defined
return 1 if index is args.length-1 and progress > args[index].to
# evaluate the function if it ... | JavaScript | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 0a9cf9a87dd5637e6fa770755e79048489bcf817 | 18,698 | https://github.com/mojs/mojs/blob/0a9cf9a87dd5637e6fa770755e79048489bcf817/src/easing/mix.coffee | 51 | 75 |
mojs/mojs:src/easing/mix.coffee:2:raw_corpus | raw_corpus | (progress)->
index = getNearest(args, progress)
if index isnt -1
value = args[index].value
# return 1 if not defined
return 1 if index is args.length-1 and progress > args[index].to
# evaluate the function if it was passed or return the value itself
return if typeof value is 'funct... | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | c2cb5e7638503a571506b39c2a51fba34ab3b12e | 18,698 | https://github.com/mojs/mojs/blob/c2cb5e7638503a571506b39c2a51fba34ab3b12e/src/easing/mix.coffee | 51 | 71 | ||
mojs/mojs:src/easing/mix.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
(progress)->
index = getNearest(args, progress)
if index isnt -1
value = args[index].value
# return 1 if not defined
return 1 if index is args.length-1 and progress > args[index].to
# evaluate the function if it was passed or retur... | var create;
(function(progress) {
var index, value;
index = getNearest(args, progress);
if (index !== -1) {
value = args[index].value;
if (index === args.length - 1 && progress > args[index].to) {
// return 1 if not defined
return 1;
}
// evaluate the function if it was passed or retu... | CoffeeScript | JavaScript | mojs/mojs | src/easing/mix.coffee | MIT | c2cb5e7638503a571506b39c2a51fba34ab3b12e | 18,698 | https://github.com/mojs/mojs/blob/c2cb5e7638503a571506b39c2a51fba34ab3b12e/src/easing/mix.coffee | 51 | 71 |
mojs/mojs:src/easing/mix.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var create;
(function(progress) {
var index, value;
index = getNearest(args, progress);
if (index !== -1) {
value = args[index].value;
if (index === args.length - 1 && progress > args[index].to) {
// return 1 if not defined
return 1;
... | (progress)->
index = getNearest(args, progress)
if index isnt -1
value = args[index].value
# return 1 if not defined
return 1 if index is args.length-1 and progress > args[index].to
# evaluate the function if it was passed or return the value itself
return if typeof value is 'funct... | JavaScript | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | c2cb5e7638503a571506b39c2a51fba34ab3b12e | 18,698 | https://github.com/mojs/mojs/blob/c2cb5e7638503a571506b39c2a51fba34ab3b12e/src/easing/mix.coffee | 51 | 71 |
mojs/mojs:src/easing/mix.coffee:1:raw_corpus | raw_corpus | easing = null
# Method to check if need to parse easing expression.
#
# @param {Object} Mix array item
# @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = (item)->
if typeof item.value is 'number' then item.value
else easing.parseEasing item.value
# ---
# Method to sort an array f... | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 768850a20165488e3098a3003b153e905266dac8 | 18,698 | https://github.com/mojs/mojs/blob/768850a20165488e3098a3003b153e905266dac8/src/easing/mix.coffee | 1 | 50 | ||
mojs/mojs:src/easing/mix.coffee:1:completion | completion | easing = null
# Method to check if need to parse easing expression.
#
# @param {Object} Mix array item
# @return {Function, Number} Parsed easing or static easing number.
parseIfEasing = (item)->
if typeof item.value is 'number' then item.value
else easing.parseEasing item.value
# ---
# Method to sort an array f... | returnValue
# ---
# Method to get the nearest to item to the progress.
#
# @param {Array} Array to search in.
# @param {Number} Progress to search for.
# @return {Number} Nearest item index.
getNearest = (array, progress)->
index = 0
(index = i; break if value.to > progress) for value, i in array
index
# ---
... | CoffeeScript | CoffeeScript | mojs/mojs | src/easing/mix.coffee | MIT | 768850a20165488e3098a3003b153e905266dac8 | 18,698 | https://github.com/mojs/mojs/blob/768850a20165488e3098a3003b153e905266dac8/src/easing/mix.coffee | 1 | 50 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffeelint:
options:
configFile: 'coffeelint.json'
source: ['coffee/angular-daterangepicker.coffee']
coffee:
compileJoined:
... | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d4386763cdd879e73027a0fdef26bd327f1d6aff | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d4386763cdd879e73027a0fdef26bd327f1d6aff/Gruntfile.coffee | 1 | 49 | ||
fragaria/angular-daterangepicker:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffeelint:
options:
configFile: 'coffeelint.json'
source: ['coffee/angular-dater... | module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffeelint: {
options: {
configFile: 'coffeelint.json'
},
source: ['coffee/angular-daterangepicker.coffee']
},
cof... | CoffeeScript | JavaScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d4386763cdd879e73027a0fdef26bd327f1d6aff | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d4386763cdd879e73027a0fdef26bd327f1d6aff/Gruntfile.coffee | 1 | 49 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffeelint: {
options: {
configFile: 'coffeelint.json'
},
source: [... | module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffeelint:
options:
configFile: 'coffeelint.json'
source: ['coffee/angular-daterangepicker.coffee']
coffee:
compileJoined:
... | JavaScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d4386763cdd879e73027a0fdef26bd327f1d6aff | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d4386763cdd879e73027a0fdef26bd327f1d6aff/Gruntfile.coffee | 1 | 49 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffeelint:
options:
configFile: 'coffeelint.json'
source: ['coffee/angular-daterangepicker.coffee']
coffee:
compileJoined:
... | options:
sourceMap: true
target:
files:
'js/angular-daterangepicker.min.js': ['js/angular-daterangepicker.js']
wiredep:
target:
src: [
'./example.html'
]
ngAnnotate:
options:
singleQuotes: true
daterangepicker:
files:... | CoffeeScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d4386763cdd879e73027a0fdef26bd327f1d6aff | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d4386763cdd879e73027a0fdef26bd327f1d6aff/Gruntfile.coffee | 1 | 49 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular-daterangepicker.... | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | f6c4f3ef542b1679de58902fc36e269a2a4b7c89 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/f6c4f3ef542b1679de58902fc36e269a2a4b7c89/Gruntfile.coffee | 1 | 44 | ||
fragaria/angular-daterangepicker:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angul... | module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/angular-daterangepicker.js': ['co... | CoffeeScript | JavaScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | f6c4f3ef542b1679de58902fc36e269a2a4b7c89 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/f6c4f3ef542b1679de58902fc36e269a2a4b7c89/Gruntfile.coffee | 1 | 44 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
f... | module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular-daterangepicker.... | JavaScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | f6c4f3ef542b1679de58902fc36e269a2a4b7c89 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/f6c4f3ef542b1679de58902fc36e269a2a4b7c89/Gruntfile.coffee | 1 | 44 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular-daterangepicker.... | files:
'js/angular-daterangepicker.min.js': ['js/angular-daterangepicker.js']
wiredep:
target:
src: [
'./example.html'
]
ngAnnotate:
options:
singleQuotes: true
daterangepicker:
files:
'js/angular-daterangepicker.js': ['js/angula... | CoffeeScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | f6c4f3ef542b1679de58902fc36e269a2a4b7c89 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/f6c4f3ef542b1679de58902fc36e269a2a4b7c89/Gruntfile.coffee | 1 | 44 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular... | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | b63a37b8dd38fc7af0c130dda96e425f1126db45 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/b63a37b8dd38fc7af0c130dda96e425f1126db45/Gruntfile.coffee | 1 | 39 | ||
fragaria/angular-daterangepicker:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/angular-daterangepicker.js': ['coffee/angular-daterangepicker.coffee']
... | CoffeeScript | JavaScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | b63a37b8dd38fc7af0c130dda96e425f1126db45 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/b63a37b8dd38fc7af0c130dda96e425f1126db45/Gruntfile.coffee | 1 | 39 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/angular-daterang... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular... | JavaScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | b63a37b8dd38fc7af0c130dda96e425f1126db45 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/b63a37b8dd38fc7af0c130dda96e425f1126db45/Gruntfile.coffee | 1 | 39 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular... | sourceMap: true
target:
files:
'js/angular-daterangepicker.min.js': ['js/angular-daterangepicker.js']
wiredep:
target:
src: [
'./example.html'
]
grunt.loadNpmTasks("grunt-contrib-coffee")
gr... | CoffeeScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | b63a37b8dd38fc7af0c130dda96e425f1126db45 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/b63a37b8dd38fc7af0c130dda96e425f1126db45/Gruntfile.coffee | 1 | 39 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular... | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d5199ff72a23b419c52d65a691d1013393f6fff3 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d5199ff72a23b419c52d65a691d1013393f6fff3/Gruntfile.coffee | 1 | 33 | ||
fragaria/angular-daterangepicker:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/angular-daterangepicker.js': ['coffee/angular-daterangepicker.coffee']
... | CoffeeScript | JavaScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d5199ff72a23b419c52d65a691d1013393f6fff3 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d5199ff72a23b419c52d65a691d1013393f6fff3/Gruntfile.coffee | 1 | 33 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/angular-daterang... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular... | JavaScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d5199ff72a23b419c52d65a691d1013393f6fff3 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d5199ff72a23b419c52d65a691d1013393f6fff3/Gruntfile.coffee | 1 | 33 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/angular-daterangepicker.js': ['coffee/angular... | uglify:
options:
sourceMap: true
target:
files:
'js/angular-daterangepicker.min.js': ['js/angular-daterangepicker.js']
grunt.loadNpmTasks("grunt-contrib-coffee")
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.loadNpmTasks('grunt-... | CoffeeScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | d5199ff72a23b419c52d65a691d1013393f6fff3 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/d5199ff72a23b419c52d65a691d1013393f6fff3/Gruntfile.coffee | 1 | 33 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:raw_corpus | raw_corpus | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/daterangepicker.js': ['coffee/daterangepicker... | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | 472acd748ea6b41e592ee291ea39cd409b0f9ae6 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/472acd748ea6b41e592ee291ea39cd409b0f9ae6/Gruntfile.coffee | 1 | 33 | ||
fragaria/angular-daterangepicker:Gruntfile.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/daterangepicker.js': ['coffee/daterangepicker.coffee']
}
... | CoffeeScript | JavaScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | 472acd748ea6b41e592ee291ea39cd409b0f9ae6 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/472acd748ea6b41e592ee291ea39cd409b0f9ae6/Gruntfile.coffee | 1 | 33 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
compileJoined: {
options: {
join: true
},
files: {
'js/daterangepicker.... | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/daterangepicker.js': ['coffee/daterangepicker... | JavaScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | 472acd748ea6b41e592ee291ea39cd409b0f9ae6 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/472acd748ea6b41e592ee291ea39cd409b0f9ae6/Gruntfile.coffee | 1 | 33 |
fragaria/angular-daterangepicker:Gruntfile.coffee:1:completion | completion | module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compileJoined:
options:
join: true
files:
'js/daterangepicker.js': ['coffee/daterangepicker... | uglify:
options:
sourceMap: true
target:
files:
'js/daterangepicker.min.js': ['js/daterangepicker.js']
grunt.loadNpmTasks("grunt-contrib-coffee")
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.loadNpmTasks('grunt-contrib-uglify')... | CoffeeScript | CoffeeScript | fragaria/angular-daterangepicker | Gruntfile.coffee | MIT | 472acd748ea6b41e592ee291ea39cd409b0f9ae6 | 517 | https://github.com/fragaria/angular-daterangepicker/blob/472acd748ea6b41e592ee291ea39cd409b0f9ae6/Gruntfile.coffee | 1 | 33 |
jeremyramin/terminal-plus:lib/shell.coffee:1:raw_corpus | raw_corpus | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 1 | 50 | ||
jeremyramin/terminal-plus:lib/shell.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = a... | var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
disableInput = () => {
this.fork = null;
t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
dis... | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:completion | completion | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | ###
Section: External Methods
###
input: (data) ->
return unless @isStillAlive()
@fork.send event: 'input', text: data
resize: (cols, rows) ->
return unless @isStillAlive()
@fork.send {event: 'resize', rows, cols}
isStillAlive: ->
return false unless @fork and @fork.childProcess
r... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:2:raw_corpus | raw_corpus | off: (event, handler) ->
if handler
@fork.off event, handler
else
@fork.off event | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 51 | 56 | ||
jeremyramin/terminal-plus:lib/shell.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
off: (event, handler) ->
if handler
@fork.off event, handler
else
@fork.off event
``` | ({
off: function(event, handler) {
if (handler) {
return this.fork.off(event, handler);
} else {
return this.fork.off(event);
}
}
}); | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 51 | 56 |
jeremyramin/terminal-plus:lib/shell.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
off: function(event, handler) {
if (handler) {
return this.fork.off(event, handler);
} else {
return this.fork.off(event);
}
}
});
``` | off: (event, handler) ->
if handler
@fork.off event, handler
else
@fork.off event | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 51 | 56 |
jeremyramin/terminal-plus:lib/shell.coffee:2:completion | completion | off: (event, handler) ->
if handler | @fork.off event, handler
else
@fork.off event | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 1e555ee3a49902b203134072ff079ae580fdff10 | 478 | https://github.com/jeremyramin/terminal-plus/blob/1e555ee3a49902b203134072ff079ae580fdff10/lib/shell.coffee | 51 | 56 |
jeremyramin/terminal-plus:lib/shell.coffee:1:raw_corpus | raw_corpus | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/shell.coffee | 1 | 50 | ||
jeremyramin/terminal-plus:lib/shell.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = a... | var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
disableInput = () => {
this.fork = null;
t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
dis... | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:completion | completion | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | ###
Section: External Methods
###
input: (data) ->
return unless @isStillAlive()
@fork.send event: 'input', text: data
resize: (cols, rows) ->
return unless @isStillAlive()
@fork.send {event: 'resize', rows, cols}
isStillAlive: ->
return false if not @fork
return @fork.childProces... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | aa374df03168977ec5fce2ef3476d6f8b26b6ade | 478 | https://github.com/jeremyramin/terminal-plus/blob/aa374df03168977ec5fce2ef3476d6f8b26b6ade/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:raw_corpus | raw_corpus | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 9846136d407b3f20ce78ac8bf12470ed999a0056 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9846136d407b3f20ce78ac8bf12470ed999a0056/lib/shell.coffee | 1 | 50 | ||
jeremyramin/terminal-plus:lib/shell.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = a... | var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
disableInput = () => {
this.fork = null;
t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 9846136d407b3f20ce78ac8bf12470ed999a0056 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9846136d407b3f20ce78ac8bf12470ed999a0056/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
dis... | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 9846136d407b3f20ce78ac8bf12470ed999a0056 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9846136d407b3f20ce78ac8bf12470ed999a0056/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:completion | completion | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | @fork.send event: 'input', text: data
resize: (cols, rows) ->
return unless @isStillAlive()
@fork.send {event: 'resize', rows, cols}
isStillAlive: ->
return false if not @fork
return @fork.childProcess.connected and !@fork.childProcess.killed
terminate: ->
@fork.terminate()
on: (event, ... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 9846136d407b3f20ce78ac8bf12470ed999a0056 | 478 | https://github.com/jeremyramin/terminal-plus/blob/9846136d407b3f20ce78ac8bf12470ed999a0056/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:raw_corpus | raw_corpus | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/shell.coffee | 1 | 50 | ||
jeremyramin/terminal-plus:lib/shell.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = a... | var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
disableInput = () => {
this.fork = null;
t... | CoffeeScript | JavaScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Path, Shell, Task, fork;
({Task} = require('atom'));
Path = require('path');
fork = require.resolve('./fork');
module.exports = Shell = (function() {
class Shell {
constructor({pwd, shellPath}) {
var args, disableInput, shellArguments;
dis... | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | JavaScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/shell.coffee | 1 | 50 |
jeremyramin/terminal-plus:lib/shell.coffee:1:completion | completion | {Task} = require 'atom'
Path = require 'path'
fork = require.resolve './fork'
module.exports =
class Shell
child: null
constructor: ({pwd, shellPath}) ->
disableInput = =>
@fork = null
@input = ->
@resize = ->
shellArguments = atom.config.get 'terminal-plus.core.shellArguments'
ar... | input: (data) ->
return unless @isStillAlive()
@fork.send event: 'input', text: data
resize: (cols, rows) ->
return unless @isStillAlive()
@fork.send {event: 'resize', rows, cols}
isStillAlive: ->
return false if not @fork
return @fork.childProcess.connected and !@fork.childProcess.kille... | CoffeeScript | CoffeeScript | jeremyramin/terminal-plus | lib/shell.coffee | MIT | 2252b401b7c65d5b7af491721752f21632e999f8 | 478 | https://github.com/jeremyramin/terminal-plus/blob/2252b401b7c65d5b7af491721752f21632e999f8/lib/shell.coffee | 1 | 50 |
jnordberg/wintersmith:src/core/utils.coffee:1:raw_corpus | raw_corpus | extend = (obj, mixin) ->
for name, method of mixin
obj[name] = method
return | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 11 | 14 | ||
jnordberg/wintersmith:src/core/utils.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
extend = (obj, mixin) ->
for name, method of mixin
obj[name] = method
return
``` | var extend;
extend = function(obj, mixin) {
var method, name;
for (name in mixin) {
method = mixin[name];
obj[name] = method;
}
}; | CoffeeScript | JavaScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 11 | 14 |
jnordberg/wintersmith:src/core/utils.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var extend;
extend = function(obj, mixin) {
var method, name;
for (name in mixin) {
method = mixin[name];
obj[name] = method;
}
};
``` | extend = (obj, mixin) ->
for name, method of mixin
obj[name] = method
return | JavaScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 11 | 14 |
jnordberg/wintersmith:src/core/utils.coffee:1:completion | completion | extend = (obj, mixin) ->
for name, method of mixin | obj[name] = method
return | CoffeeScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 11 | 14 |
jnordberg/wintersmith:src/core/utils.coffee:2:raw_corpus | raw_corpus | stripExtension = (filename) ->
### Remove the file-extension from *filename* ###
filename.replace /(.+)\.[^.]+$/, '$1' | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 16 | 18 | ||
jnordberg/wintersmith:src/core/utils.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
stripExtension = (filename) ->
### Remove the file-extension from *filename* ###
filename.replace /(.+)\.[^.]+$/, '$1'
``` | var stripExtension;
stripExtension = function(filename) {
/* Remove the file-extension from *filename* */
return filename.replace(/(.+)\.[^.]+$/, '$1');
}; | CoffeeScript | JavaScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 16 | 18 |
jnordberg/wintersmith:src/core/utils.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var stripExtension;
stripExtension = function(filename) {
/* Remove the file-extension from *filename* */
return filename.replace(/(.+)\.[^.]+$/, '$1');
};
``` | stripExtension = (filename) ->
### Remove the file-extension from *filename* ###
filename.replace /(.+)\.[^.]+$/, '$1' | JavaScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 16 | 18 |
jnordberg/wintersmith:src/core/utils.coffee:3:raw_corpus | raw_corpus | readJSON = (filename, callback) ->
### Read and try to parse *filename* as JSON, *callback* with parsed object or error on fault. ###
async.waterfall [
(callback) ->
fs.readFile filename, callback
(buffer, callback) ->
try
rv = JSON.parse buffer.toString()
callback null, rv
... | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 20 | 33 | ||
jnordberg/wintersmith:src/core/utils.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
readJSON = (filename, callback) ->
### Read and try to parse *filename* as JSON, *callback* with parsed object or error on fault. ###
async.waterfall [
(callback) ->
fs.readFile filename, callback
(buffer, callback) ->
try
rv = JSO... | var readJSON;
readJSON = function(filename, callback) {
/* Read and try to parse *filename* as JSON, *callback* with parsed object or error on fault. */
return async.waterfall([
function(callback) {
return fs.readFile(filename,
callback);
},
function(buffer,
callback) {
var error,
... | CoffeeScript | JavaScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 20 | 33 |
jnordberg/wintersmith:src/core/utils.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var readJSON;
readJSON = function(filename, callback) {
/* Read and try to parse *filename* as JSON, *callback* with parsed object or error on fault. */
return async.waterfall([
function(callback) {
return fs.readFile(filename,
callback);
},
... | readJSON = (filename, callback) ->
### Read and try to parse *filename* as JSON, *callback* with parsed object or error on fault. ###
async.waterfall [
(callback) ->
fs.readFile filename, callback
(buffer, callback) ->
try
rv = JSON.parse buffer.toString()
callback null, rv
... | JavaScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 20 | 33 |
jnordberg/wintersmith:src/core/utils.coffee:3:completion | completion | readJSON = (filename, callback) ->
### Read and try to parse *filename* as JSON, *callback* with parsed object or error on fault. ###
async.waterfall [
(callback) ->
fs.readFile filename, callback
(buffer, callback) ->
try | rv = JSON.parse buffer.toString()
callback null, rv
catch error
error.filename = filename
error.message = "parsing #{ path.basename(filename) }: #{ error.message }"
callback error
], callback | CoffeeScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 20 | 33 |
jnordberg/wintersmith:src/core/utils.coffee:4:raw_corpus | raw_corpus | readJSONSync = (filename) ->
### Synchronously read and try to parse *filename* as json. ###
buffer = fs.readFileSync filename
return JSON.parse buffer.toString() | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 35 | 38 | ||
jnordberg/wintersmith:src/core/utils.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
readJSONSync = (filename) ->
### Synchronously read and try to parse *filename* as json. ###
buffer = fs.readFileSync filename
return JSON.parse buffer.toString()
``` | var readJSONSync;
readJSONSync = function(filename) {
/* Synchronously read and try to parse *filename* as json. */
var buffer;
buffer = fs.readFileSync(filename);
return JSON.parse(buffer.toString());
}; | CoffeeScript | JavaScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 35 | 38 |
jnordberg/wintersmith:src/core/utils.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var readJSONSync;
readJSONSync = function(filename) {
/* Synchronously read and try to parse *filename* as json. */
var buffer;
buffer = fs.readFileSync(filename);
return JSON.parse(buffer.toString());
};
``` | readJSONSync = (filename) ->
### Synchronously read and try to parse *filename* as json. ###
buffer = fs.readFileSync filename
return JSON.parse buffer.toString() | JavaScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 35 | 38 |
jnordberg/wintersmith:src/core/utils.coffee:4:completion | completion | readJSONSync = (filename) ->
### Synchronously read and try to parse *filename* as json. ### | buffer = fs.readFileSync filename
return JSON.parse buffer.toString() | CoffeeScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 35 | 38 |
jnordberg/wintersmith:src/core/utils.coffee:5:raw_corpus | raw_corpus | readdirRecursive = (directory, callback) ->
### Returns an array representing *directory*, including subdirectories. ###
result = []
walk = (dir, callback) ->
async.waterfall [
async.apply fs.readdir, path.join(directory, dir)
(filenames, callback) ->
async.forEach filenames, (filename, ca... | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 40 | 60 | ||
jnordberg/wintersmith:src/core/utils.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
readdirRecursive = (directory, callback) ->
### Returns an array representing *directory*, including subdirectories. ###
result = []
walk = (dir, callback) ->
async.waterfall [
async.apply fs.readdir, path.join(directory, dir)
(filenames, ca... | var readdirRecursive;
readdirRecursive = function(directory, callback) {
/* Returns an array representing *directory*, including subdirectories. */
var result, walk;
result = [];
walk = function(dir, callback) {
return async.waterfall([
async.apply(fs.readdir,
path.join(directory,
dir)),
... | CoffeeScript | JavaScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 40 | 60 |
jnordberg/wintersmith:src/core/utils.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var readdirRecursive;
readdirRecursive = function(directory, callback) {
/* Returns an array representing *directory*, including subdirectories. */
var result, walk;
result = [];
walk = function(dir, callback) {
return async.waterfall([
async.app... | readdirRecursive = (directory, callback) ->
### Returns an array representing *directory*, including subdirectories. ###
result = []
walk = (dir, callback) ->
async.waterfall [
async.apply fs.readdir, path.join(directory, dir)
(filenames, callback) ->
async.forEach filenames, (filename, ca... | JavaScript | CoffeeScript | jnordberg/wintersmith | src/core/utils.coffee | MIT | be757f5f7d72ddce462f67913c9cd7c578162018 | 3,484 | https://github.com/jnordberg/wintersmith/blob/be757f5f7d72ddce462f67913c9cd7c578162018/src/core/utils.coffee | 40 | 60 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.