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
jianliaoim/talk-os:talk-web/client/updater/story.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.leave = (store, storyData) -> _teamId = storyData.get '_teamId' _storyId = storyData.get '_id' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> stories.map (story) -> if story.get('_id') is _st...
exports.leave = function(store, storyData) { var _storyId, _teamId; _teamId = storyData.get('_teamId'); _storyId = storyData.get('_id'); if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stories', _teamId], function(stories) { return stories.map(function(story) { if (story.get('...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
22
32
jianliaoim/talk-os:talk-web/client/updater/story.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.leave = function(store, storyData) { var _storyId, _teamId; _teamId = storyData.get('_teamId'); _storyId = storyData.get('_id'); if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stories', _teamId], function(stories) { retur...
exports.leave = (store, storyData) -> _teamId = storyData.get '_teamId' _storyId = storyData.get '_id' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> stories.map (story) -> if story.get('_id') is _storyId story.merge storyData else story ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
22
32
jianliaoim/talk-os:talk-web/client/updater/story.coffee:2:completion
completion
exports.leave = (store, storyData) -> _teamId = storyData.get '_teamId' _storyId = storyData.get '_id' if store.hasIn ['stories', _teamId]
store.updateIn ['stories', _teamId], (stories) -> stories.map (story) -> if story.get('_id') is _storyId story.merge storyData else story else store
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
22
32
jianliaoim/talk-os:talk-web/client/updater/story.coffee:4:raw_corpus
raw_corpus
exports.read = (store, storyData) -> _teamId = storyData.get '_teamId' newStories = storyData.get 'data' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (existStories) -> newStories.forEach (newStory) -> storyIndex = existStories.findIndex (existStory) -> exis...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
37
53
jianliaoim/talk-os:talk-web/client/updater/story.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.read = (store, storyData) -> _teamId = storyData.get '_teamId' newStories = storyData.get 'data' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (existStories) -> newStories.forEach (newStory) -> storyInde...
exports.read = function(store, storyData) { var _teamId, newStories; _teamId = storyData.get('_teamId'); newStories = storyData.get('data'); if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stories', _teamId], function(existStories) { newStories.forEach(function(newStory) { var...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
37
53
jianliaoim/talk-os:talk-web/client/updater/story.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.read = function(store, storyData) { var _teamId, newStories; _teamId = storyData.get('_teamId'); newStories = storyData.get('data'); if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stories', _teamId], function(existStories) { ...
exports.read = (store, storyData) -> _teamId = storyData.get '_teamId' newStories = storyData.get 'data' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (existStories) -> newStories.forEach (newStory) -> storyIndex = existStories.findIndex (existStory) -> exis...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
37
53
jianliaoim/talk-os:talk-web/client/updater/story.coffee:4:completion
completion
exports.read = (store, storyData) -> _teamId = storyData.get '_teamId' newStories = storyData.get 'data' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (existStories) -> newStories.forEach (newStory) -> storyIndex = existStories.findIndex (existStory) ->
existStory.get('_id') is newStory.get('_id') if storyIndex >= 0 existStories = existStories.set storyIndex, newStory else existStories = existStories.push newStory existStories else store.setIn ['stories', _teamId], newStories
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
37
53
jianliaoim/talk-os:talk-web/client/updater/story.coffee:5:raw_corpus
raw_corpus
exports.readone = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _targetId = storyDatum.get '_id' inCollection = (item) -> item.get('_id') is _targetId if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> if stories.some inCollection stories.map (s...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
55
71
jianliaoim/talk-os:talk-web/client/updater/story.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.readone = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _targetId = storyDatum.get '_id' inCollection = (item) -> item.get('_id') is _targetId if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> ...
exports.readone = function(store, storyDatum) { var _targetId, _teamId, inCollection; _teamId = storyDatum.get('_teamId'); _targetId = storyDatum.get('_id'); inCollection = function(item) { return item.get('_id') === _targetId; }; if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stor...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
55
71
jianliaoim/talk-os:talk-web/client/updater/story.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.readone = function(store, storyDatum) { var _targetId, _teamId, inCollection; _teamId = storyDatum.get('_teamId'); _targetId = storyDatum.get('_id'); inCollection = function(item) { return item.get('_id') === _targetId; }; if (store.hasIn(['...
exports.readone = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _targetId = storyDatum.get '_id' inCollection = (item) -> item.get('_id') is _targetId if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> if stories.some inCollection stories.map (s...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
55
71
jianliaoim/talk-os:talk-web/client/updater/story.coffee:5:completion
completion
exports.readone = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _targetId = storyDatum.get '_id' inCollection = (item) -> item.get('_id') is _targetId if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) ->
if stories.some inCollection stories.map (story) -> if story.get('_id') is _targetId story.merge storyDatum else story else stories.push storyDatum else store.setIn ['stories', _teamId], Immutable.List([ storyDatum ])
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
55
71
jianliaoim/talk-os:talk-web/client/updater/story.coffee:6:raw_corpus
raw_corpus
exports.remove = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' store .update 'stories', (cursor) -> if cursor.has _teamId cursor.update _teamId, (stories) -> stories.filterNot (story) -> story.get('_id') is _storyId else cursor
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
73
82
jianliaoim/talk-os:talk-web/client/updater/story.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.remove = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' store .update 'stories', (cursor) -> if cursor.has _teamId cursor.update _teamId, (stories) -> stories.filterNot (story) -> story...
exports.remove = function(store, storyDatum) { var _storyId, _teamId; _teamId = storyDatum.get('_teamId'); _storyId = storyDatum.get('_id'); return store.update('stories', function(cursor) { if (cursor.has(_teamId)) { return cursor.update(_teamId, function(stories) { return stories.filterNot(f...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
73
82
jianliaoim/talk-os:talk-web/client/updater/story.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.remove = function(store, storyDatum) { var _storyId, _teamId; _teamId = storyDatum.get('_teamId'); _storyId = storyDatum.get('_id'); return store.update('stories', function(cursor) { if (cursor.has(_teamId)) { return cursor.update(_teamId,...
exports.remove = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' store .update 'stories', (cursor) -> if cursor.has _teamId cursor.update _teamId, (stories) -> stories.filterNot (story) -> story.get('_id') is _storyId else cursor
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
73
82
jianliaoim/talk-os:talk-web/client/updater/story.coffee:6:completion
completion
exports.remove = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' store
.update 'stories', (cursor) -> if cursor.has _teamId cursor.update _teamId, (stories) -> stories.filterNot (story) -> story.get('_id') is _storyId else cursor
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
73
82
jianliaoim/talk-os:talk-web/client/updater/story.coffee:7:raw_corpus
raw_corpus
exports.update = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> stories.map (story) -> if story.get('_id') is _storyId story.merge storyDatum else s...
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
84
102
jianliaoim/talk-os:talk-web/client/updater/story.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.update = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> stories.map (story) -> if story.get('_id') is...
exports.update = function(store, storyDatum) { var _storyId, _teamId; _teamId = storyDatum.get('_teamId'); _storyId = storyDatum.get('_id'); if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stories', _teamId], function(stories) { return stories.map(function(story) { if (story.g...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
84
102
jianliaoim/talk-os:talk-web/client/updater/story.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.update = function(store, storyDatum) { var _storyId, _teamId; _teamId = storyDatum.get('_teamId'); _storyId = storyDatum.get('_id'); if (store.hasIn(['stories', _teamId])) { return store.updateIn(['stories', _teamId], function(stories) { r...
exports.update = (store, storyDatum) -> _teamId = storyDatum.get '_teamId' _storyId = storyDatum.get '_id' if store.hasIn ['stories', _teamId] store.updateIn ['stories', _teamId], (stories) -> stories.map (story) -> if story.get('_id') is _storyId story.merge storyDatum else s...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
84
102
jianliaoim/talk-os:talk-web/client/updater/story.coffee:8:raw_corpus
raw_corpus
exports.createDraft = (store, draftStoryData) -> _id = draftStoryData.get '_id' _teamId = draftStoryData.get '_teamId' category = draftStoryData.get 'category' store.setIn [ 'drafts', 'stories', _id ], assemble.draftStory _teamId, _id, category
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
104
109
jianliaoim/talk-os:talk-web/client/updater/story.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.createDraft = (store, draftStoryData) -> _id = draftStoryData.get '_id' _teamId = draftStoryData.get '_teamId' category = draftStoryData.get 'category' store.setIn [ 'drafts', 'stories', _id ], assemble.draftStory _teamId, _id, category ```
exports.createDraft = function(store, draftStoryData) { var _id, _teamId, category; _id = draftStoryData.get('_id'); _teamId = draftStoryData.get('_teamId'); category = draftStoryData.get('category'); return store.setIn(['drafts', 'stories', _id], assemble.draftStory(_teamId, _id, category)); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
104
109
jianliaoim/talk-os:talk-web/client/updater/story.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.createDraft = function(store, draftStoryData) { var _id, _teamId, category; _id = draftStoryData.get('_id'); _teamId = draftStoryData.get('_teamId'); category = draftStoryData.get('category'); return store.setIn(['drafts', 'stories', _id], assembl...
exports.createDraft = (store, draftStoryData) -> _id = draftStoryData.get '_id' _teamId = draftStoryData.get '_teamId' category = draftStoryData.get 'category' store.setIn [ 'drafts', 'stories', _id ], assemble.draftStory _teamId, _id, category
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
104
109
jianliaoim/talk-os:talk-web/client/updater/story.coffee:8:completion
completion
exports.createDraft = (store, draftStoryData) -> _id = draftStoryData.get '_id' _teamId = draftStoryData.get '_teamId'
category = draftStoryData.get 'category' store.setIn [ 'drafts', 'stories', _id ], assemble.draftStory _teamId, _id, category
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/story.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/story.coffee
104
109
orktes/atom-react:spec/grammar-spec.coffee:1:raw_corpus
raw_corpus
describe "JSX grammar", -> grammar = null beforeEach -> waitsForPromise -> atom.packages.activatePackage("react") runs -> grammar = atom.grammars.grammarForScopeName("source.js.jsx") it "parses the grammar", -> expect(grammar).toBeTruthy() expect(grammar.scopeName).toBe "source.js.j...
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
1
40
orktes/atom-react:spec/grammar-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe "JSX grammar", -> grammar = null beforeEach -> waitsForPromise -> atom.packages.activatePackage("react") runs -> grammar = atom.grammars.grammarForScopeName("source.js.jsx") it "parses the grammar", -> expect(grammar).toB...
describe("JSX grammar", function() { var grammar; grammar = null; beforeEach(function() { waitsForPromise(function() { return atom.packages.activatePackage("react"); }); return runs(function() { return grammar = atom.grammars.grammarForScopeName("source.js.jsx"); }); }); it("parses...
CoffeeScript
JavaScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
1
40
orktes/atom-react:spec/grammar-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe("JSX grammar", function() { var grammar; grammar = null; beforeEach(function() { waitsForPromise(function() { return atom.packages.activatePackage("react"); }); return runs(function() { return grammar = atom.grammars.grammarFo...
describe "JSX grammar", -> grammar = null beforeEach -> waitsForPromise -> atom.packages.activatePackage("react") runs -> grammar = atom.grammars.grammarForScopeName("source.js.jsx") it "parses the grammar", -> expect(grammar).toBeTruthy() expect(grammar.scopeName).toBe "source.js.j...
JavaScript
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
1
40
orktes/atom-react:spec/grammar-spec.coffee:1:completion
completion
describe "JSX grammar", -> grammar = null beforeEach -> waitsForPromise -> atom.packages.activatePackage("react") runs -> grammar = atom.grammars.grammarForScopeName("source.js.jsx") it "parses the grammar", -> expect(grammar).toBeTruthy() expect(grammar.scopeName).toBe "source.js.j...
for scope, delim of delimsByScope {tokens} = grammar.tokenizeLine(delim + "x" + delim) expect(tokens[0].value).toEqual delim expect(tokens[0].scopes).toEqual ["source.js.jsx", scope, "punctuation.definition.string.begin.js"] expect(tokens[1].value).toEqual "x" expect(tokens[1].sc...
CoffeeScript
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
1
40
orktes/atom-react:spec/grammar-spec.coffee:2:raw_corpus
raw_corpus
{tokens} = grammar.tokenizeLine('foo + /test/') expect(tokens[0]).toEqual value: 'foo ', scopes: ['source.js.jsx'] expect(tokens[1]).toEqual value: '+', scopes: ['source.js.jsx', 'keyword.operator.js'] expect(tokens[2]).toEqual value: ' ', scopes: ['source.js.jsx', 'string.regexp.js'] expect(tok...
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
42
81
orktes/atom-react:spec/grammar-spec.coffee:2:completion
completion
{tokens} = grammar.tokenizeLine('foo + /test/') expect(tokens[0]).toEqual value: 'foo ', scopes: ['source.js.jsx'] expect(tokens[1]).toEqual value: '+', scopes: ['source.js.jsx', 'keyword.operator.js'] expect(tokens[2]).toEqual value: ' ', scopes: ['source.js.jsx', 'string.regexp.js'] expect(tok...
expect(tokens[3]).toEqual value: ' ', scopes: ['source.js.jsx', 'string.regexp.js'] expect(tokens[4]).toEqual value: '/', scopes: ['source.js.jsx', 'string.regexp.js', 'punctuation.definition.string.begin.js'] expect(tokens[5]).toEqual value: 'test', scopes: ['source.js.jsx', 'string.regexp.js'] expec...
CoffeeScript
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
42
81
orktes/atom-react:spec/grammar-spec.coffee:3:raw_corpus
raw_corpus
{tokens} = grammar.tokenizeLine('0O1411') expect(tokens[0]).toEqual value: '0O1411', scopes: ['source.js.jsx', 'constant.numeric.js'] describe "operators", -> it "tokenizes void correctly", -> {tokens} = grammar.tokenizeLine('void') expect(tokens[0]).toEqual value: 'void', scopes: ['source.js.j...
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
83
123
orktes/atom-react:spec/grammar-spec.coffee:3:completion
completion
{tokens} = grammar.tokenizeLine('0O1411') expect(tokens[0]).toEqual value: '0O1411', scopes: ['source.js.jsx', 'constant.numeric.js'] describe "operators", -> it "tokenizes void correctly", -> {tokens} = grammar.tokenizeLine('void') expect(tokens[0]).toEqual value: 'void', scopes: ['source.js.j...
{tokens} = grammar.tokenizeLine('`hey ${name}`') expect(tokens[0]).toEqual value: '`', scopes: ['source.js.jsx', 'string.quoted.template.js', 'punctuation.definition.string.begin.js'] expect(tokens[1]).toEqual value: 'hey ', scopes: ['source.js.jsx', 'string.quoted.template.js'] expect(tokens[2]).toEq...
CoffeeScript
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
83
123
orktes/atom-react:spec/grammar-spec.coffee:4:raw_corpus
raw_corpus
it "tokenizes /* */ comments", -> {tokens} = grammar.tokenizeLine('/**/') expect(tokens[0]).toEqual value: '/*', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.comment.js'] expect(tokens[1]).toEqual value: '*/', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.co...
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
125
147
orktes/atom-react:spec/grammar-spec.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it "tokenizes /* */ comments", -> {tokens} = grammar.tokenizeLine('/**/') expect(tokens[0]).toEqual value: '/*', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.comment.js'] expect(tokens[1]).toEqual value: '*/', scopes: ['sourc...
it("tokenizes /* */ comments", function() { var tokens; ({tokens} = grammar.tokenizeLine('/**/')); expect(tokens[0]).toEqual({ value: '/*', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.comment.js'] }); expect(tokens[1]).toEqual({ value: '*/', scopes: ['source.js.jsx', ...
CoffeeScript
JavaScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
125
147
orktes/atom-react:spec/grammar-spec.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it("tokenizes /* */ comments", function() { var tokens; ({tokens} = grammar.tokenizeLine('/**/')); expect(tokens[0]).toEqual({ value: '/*', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.comment.js'] }); expect(tokens[1]).to...
it "tokenizes /* */ comments", -> {tokens} = grammar.tokenizeLine('/**/') expect(tokens[0]).toEqual value: '/*', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.comment.js'] expect(tokens[1]).toEqual value: '*/', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.co...
JavaScript
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
125
147
orktes/atom-react:spec/grammar-spec.coffee:4:completion
completion
it "tokenizes /* */ comments", -> {tokens} = grammar.tokenizeLine('/**/') expect(tokens[0]).toEqual value: '/*', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.comment.js'] expect(tokens[1]).toEqual value: '*/', scopes: ['source.js.jsx', 'comment.block.js', 'punctuation.definition.co...
it "tokenizes /** */ comments", -> {tokens} = grammar.tokenizeLine('/***/') expect(tokens[0]).toEqual value: '/**', scopes: ['source.js.jsx', 'comment.block.documentation.js', 'punctuation.definition.comment.js'] expect(tokens[1]).toEqual value: '*/', scopes: ['source.js.jsx', 'comment.block.documentation....
CoffeeScript
CoffeeScript
orktes/atom-react
spec/grammar-spec.coffee
MIT
cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9
473
https://github.com/orktes/atom-react/blob/cbdc69554e7cb49c1a1a9f4c6fa414fc1f40c2b9/spec/grammar-spec.coffee
125
147
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'favorites-page' mixins: [ mixinSubscribe, mixinFinder ] propTypes: _teamId: T.string.isRequired router: T.instanceOf(Immutable.Map).isRequired getInitialState: -> urlQuery = @props.router.get('query') query: '' results: Immutable.List() ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
36
85
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'favorites-page' mixins: [ mixinSubscribe, mixinFinder ] propTypes: _teamId: T.string.isRequired router: T.instanceOf(Immutable.Map).isRequired getInitialState: -> urlQuery = @props.router.get(...
module.exports = React.createClass({ displayName: 'favorites-page', mixins: [mixinSubscribe, mixinFinder], propTypes: { _teamId: T.string.isRequired, router: T.instanceOf(Immutable.Map).isRequired }, getInitialState: function() { var urlQuery; urlQuery = this.props.router.get('query'); ret...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
36
85
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'favorites-page', mixins: [mixinSubscribe, mixinFinder], propTypes: { _teamId: T.string.isRequired, router: T.instanceOf(Immutable.Map).isRequired }, getInitialState: function() { var urlQuery;...
module.exports = React.createClass displayName: 'favorites-page' mixins: [ mixinSubscribe, mixinFinder ] propTypes: _teamId: T.string.isRequired router: T.instanceOf(Immutable.Map).isRequired getInitialState: -> urlQuery = @props.router.get('query') query: '' results: Immutable.List() ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
36
85
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:1:completion
completion
module.exports = React.createClass displayName: 'favorites-page' mixins: [ mixinSubscribe, mixinFinder ] propTypes: _teamId: T.string.isRequired router: T.instanceOf(Immutable.Map).isRequired getInitialState: -> urlQuery = @props.router.get('query') query: '' results: Immutable.List() ...
getResults: -> query.favResults(recorder.getState()) getRoomId: -> @props.router.getIn(['query', '_roomId']) getToId: -> @props.router.getIn(['query', '_toId']) clearResults: -> favoriteActions.clearResults() sendSearchRequest: -> if @state.resultsEnd or @state.isLoading return ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
36
85
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:2:raw_corpus
raw_corpus
makeQuery: -> data = _teamId: @props._teamId page: @state.page # API does not accept empty string as the query if @state._creatorId data._creatorId = @state._creatorId else if @state._roomId data._roomId = @state._roomId if @state.query data.q = @state.query unless ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
86
135
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript makeQuery: -> data = _teamId: @props._teamId page: @state.page # API does not accept empty string as the query if @state._creatorId data._creatorId = @state._creatorId else if @state._roomId data._roomId = @state._roomId ...
({ makeQuery: function() { var data; data = { _teamId: this.props._teamId, page: this.state.page }; // API does not accept empty string as the query if (this.state._creatorId) { data._creatorId = this.state._creatorId; } else if (this.state._roomId) { data._roomId = thi...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
86
135
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ makeQuery: function() { var data; data = { _teamId: this.props._teamId, page: this.state.page }; // API does not accept empty string as the query if (this.state._creatorId) { data._creatorId = this.state._creatorId; } ...
makeQuery: -> data = _teamId: @props._teamId page: @state.page # API does not accept empty string as the query if @state._creatorId data._creatorId = @state._creatorId else if @state._roomId data._roomId = @state._roomId if @state.query data.q = @state.query unless ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
86
135
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:2:completion
completion
makeQuery: -> data = _teamId: @props._teamId page: @state.page # API does not accept empty string as the query if @state._creatorId data._creatorId = @state._creatorId else if @state._roomId data._roomId = @state._roomId if @state.query data.q = @state.query unless ...
@setState newState, @sendSearchRequest renderFileQueue: -> LightModal name: 'file-queue' show: @state.showFileQueue onCloseClick: @onFileQueueHide FileQueueFavorite onClose: @onFileQueueHide messages: @state.results attachment: @state.cursorAttachment query...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
86
135
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:3:raw_corpus
raw_corpus
div className: 'timeline', if @state.results.size is 0 unless @state.isLoading @renderNoResult() else @state.results.map (message) => onClick = => @onMessageClick message div className: 'wrap', key: message.get('_id'), MessageRich messa...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
136
173
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript div className: 'timeline', if @state.results.size is 0 unless @state.isLoading @renderNoResult() else @state.results.map (message) => onClick = => @onMessageClick message div className: 'wrap', key: messag...
div({ className: 'timeline' }, this.state.results.size === 0 ? !this.state.isLoading ? this.renderNoResult() : void 0 : this.state.results.map((message) => { var onClick; onClick = () => { return this.onMessageClick(message); }; return div({ className: 'wrap', key: message.get('_id') }, MessageR...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
136
173
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript div({ className: 'timeline' }, this.state.results.size === 0 ? !this.state.isLoading ? this.renderNoResult() : void 0 : this.state.results.map((message) => { var onClick; onClick = () => { return this.onMessageClick(message); }; return div({ class...
div className: 'timeline', if @state.results.size is 0 unless @state.isLoading @renderNoResult() else @state.results.map (message) => onClick = => @onMessageClick message div className: 'wrap', key: message.get('_id'), MessageRich messa...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
136
173
jianliaoim/talk-os:talk-web/client/app/favorites-page.coffee:3:completion
completion
div className: 'timeline', if @state.results.size is 0 unless @state.isLoading @renderNoResult() else @state.results.map (message) => onClick = => @onMessageClick message div className: 'wrap', key: message.get('_id'), MessageRich messa...
endLocale: lang.getText('no-more-search-results') renderFinder: -> div className: 'container', div className: 'finder favorites-finder', LiteWheeling onScroll: @onScroll, @renderTimeline() @renderFileQueue() renderHeader: -> div className: 'header', FavoritesHeader ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/favorites-page.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/favorites-page.coffee
136
173
gandm/language-babel:lib/transpiler-task.coffee:1:raw_corpus
raw_corpus
requireBabelCore = (dir) -> if dir != path.dirname(dir) if babelCore = resolveBabelCore(dir) then return babelCore else return requireBabelCore(path.dirname(dir)) return resolveBabelCore('..') # return language-babel's copy of babel-core # resolve a babel core in the dir
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
6
12
gandm/language-babel:lib/transpiler-task.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript requireBabelCore = (dir) -> if dir != path.dirname(dir) if babelCore = resolveBabelCore(dir) then return babelCore else return requireBabelCore(path.dirname(dir)) return resolveBabelCore('..') # return language-babel's copy of babel-core # resolve a ...
var requireBabelCore; requireBabelCore = function(dir) { var babelCore; if (dir !== path.dirname(dir)) { if (babelCore = resolveBabelCore(dir)) { return babelCore; } else { return requireBabelCore(path.dirname(dir)); } } return resolveBabelCore('..'); // return language-babel's copy of ...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
6
12
gandm/language-babel:lib/transpiler-task.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var requireBabelCore; requireBabelCore = function(dir) { var babelCore; if (dir !== path.dirname(dir)) { if (babelCore = resolveBabelCore(dir)) { return babelCore; } else { return requireBabelCore(path.dirname(dir)); } } return reso...
requireBabelCore = (dir) -> if dir != path.dirname(dir) if babelCore = resolveBabelCore(dir) then return babelCore else return requireBabelCore(path.dirname(dir)) return resolveBabelCore('..') # return language-babel's copy of babel-core # resolve a babel core in the dir
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
6
12
gandm/language-babel:lib/transpiler-task.coffee:1:completion
completion
requireBabelCore = (dir) -> if dir != path.dirname(dir) if babelCore = resolveBabelCore(dir) then return babelCore
else return requireBabelCore(path.dirname(dir)) return resolveBabelCore('..') # return language-babel's copy of babel-core # resolve a babel core in the dir
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
6
12
gandm/language-babel:lib/transpiler-task.coffee:2:raw_corpus
raw_corpus
resolveBabelCore = (dir) -> try projectBabelCore = path.normalize( path.join( dir, '/node_modules/@babel/core')) babel = require projectBabelCore catch try projectBabelCore = path.normalize( path.join( dir, '/node_modules/babel-core')) babel = require projectBabelCore catch return ...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
13
27
gandm/language-babel:lib/transpiler-task.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript resolveBabelCore = (dir) -> try projectBabelCore = path.normalize( path.join( dir, '/node_modules/@babel/core')) babel = require projectBabelCore catch try projectBabelCore = path.normalize( path.join( dir, '/node_modules/babel-core')) ...
var resolveBabelCore; resolveBabelCore = function(dir) { var babel, projectBabelCore; try { projectBabelCore = path.normalize(path.join(dir, '/node_modules/@babel/core')); babel = require(projectBabelCore); } catch (error) { try { projectBabelCore = path.normalize(path.join(dir, '/node_modules/...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
13
27
gandm/language-babel:lib/transpiler-task.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var resolveBabelCore; resolveBabelCore = function(dir) { var babel, projectBabelCore; try { projectBabelCore = path.normalize(path.join(dir, '/node_modules/@babel/core')); babel = require(projectBabelCore); } catch (error) { try { projectBa...
resolveBabelCore = (dir) -> try projectBabelCore = path.normalize( path.join( dir, '/node_modules/@babel/core')) babel = require projectBabelCore catch try projectBabelCore = path.normalize( path.join( dir, '/node_modules/babel-core')) babel = require projectBabelCore catch return ...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
13
27
gandm/language-babel:lib/transpiler-task.coffee:2:completion
completion
resolveBabelCore = (dir) -> try projectBabelCore = path.normalize( path.join( dir, '/node_modules/@babel/core')) babel = require projectBabelCore catch try projectBabelCore = path.normalize( path.join( dir, '/node_modules/babel-core'))
babel = require projectBabelCore catch return false 'babel': babel 'projectBabelCore': projectBabelCore # language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment.
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
13
27
gandm/language-babel:lib/transpiler-task.coffee:3:raw_corpus
raw_corpus
module.exports = (projectPath) -> callback = @async() #async task process.chdir(projectPath) { babel, projectBabelCore } = requireBabelCore(projectPath) babelCoreUsed = "Using babel-core at\n#{require.resolve projectBabelCore}" process.on 'message', (mObj) -> if mObj.command is 'transpile' try ...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
28
77
gandm/language-babel:lib/transpiler-task.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = (projectPath) -> callback = @async() #async task process.chdir(projectPath) { babel, projectBabelCore } = requireBabelCore(projectPath) babelCoreUsed = "Using babel-core at\n#{require.resolve projectBabelCore}" process.on 'message', (...
module.exports = function(projectPath) { var babel, babelCoreUsed, callback, projectBabelCore; callback = this.async(); //async task process.chdir(projectPath); ({babel, projectBabelCore} = requireBabelCore(projectPath)); babelCoreUsed = `Using babel-core at\n${require.resolve(projectBabelCore)}`; return pr...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
28
77
gandm/language-babel:lib/transpiler-task.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = function(projectPath) { var babel, babelCoreUsed, callback, projectBabelCore; callback = this.async(); //async task process.chdir(projectPath); ({babel, projectBabelCore} = requireBabelCore(projectPath)); babelCoreUsed = `Using babel-core...
module.exports = (projectPath) -> callback = @async() #async task process.chdir(projectPath) { babel, projectBabelCore } = requireBabelCore(projectPath) babelCoreUsed = "Using babel-core at\n#{require.resolve projectBabelCore}" process.on 'message', (mObj) -> if mObj.command is 'transpile' try ...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
28
77
gandm/language-babel:lib/transpiler-task.coffee:3:completion
completion
module.exports = (projectPath) -> callback = @async() #async task process.chdir(projectPath) { babel, projectBabelCore } = requireBabelCore(projectPath) babelCoreUsed = "Using babel-core at\n#{require.resolve projectBabelCore}" process.on 'message', (mObj) -> if mObj.command is 'transpile' try ...
msgRet.babelCoreUsed = babelCoreUsed emit "transpile:#{mObj.reqId}", msgRet # if this file transpilation isn't in a Atom project folder then term this task # as this is normally an Ad-hoc file transpile. if not mObj.pathTo.sourceFileInProject callback() catch er...
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
28
77
gandm/language-babel:lib/transpiler-task.coffee:4:raw_corpus
raw_corpus
# as this is normally an Ad-hoc file transpile. if not mObj.pathTo.sourceFileInProject callback() catch err msgRet = {} msgRet.reqId = mObj.reqId # send back to reqId msgRet.err = {} msgRet.err.message = err.message msgRet.err.stack = err.stack msg...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
78
94
gandm/language-babel:lib/transpiler-task.coffee:4:completion
completion
# as this is normally an Ad-hoc file transpile. if not mObj.pathTo.sourceFileInProject callback() catch err msgRet = {} msgRet.reqId = mObj.reqId # send back to reqId msgRet.err = {} msgRet.err.message = err.message
msgRet.err.stack = err.stack msgRet.babelVersion = babel.version msgRet.babelCoreUsed = babelCoreUsed emit "transpile:#{mObj.reqId}", msgRet callback() #stop issued stop process if mObj.command is 'stop' callback()
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
d7d260522eb0f6528ea8558beb1bda54c5d25eba
474
https://github.com/gandm/language-babel/blob/d7d260522eb0f6528ea8558beb1bda54c5d25eba/lib/transpiler-task.coffee
78
94
gandm/language-babel:lib/transpiler-task.coffee:1:raw_corpus
raw_corpus
isYarnWorkspace = (projectPath) -> try parentDir = path.normalize( path.join( projectPath, '..')) parentDirPackageJSON = path.normalize( path.join(parentDir, '/package.json')) parentDirYarnLock = path.normalize( path.join(parentDir, '/yarn.lock')) if fs.existsSync(parentDirYarnLock) and fs.existsSync...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
6
19
gandm/language-babel:lib/transpiler-task.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript isYarnWorkspace = (projectPath) -> try parentDir = path.normalize( path.join( projectPath, '..')) parentDirPackageJSON = path.normalize( path.join(parentDir, '/package.json')) parentDirYarnLock = path.normalize( path.join(parentDir, '/yarn.lock')) ...
var isYarnWorkspace; isYarnWorkspace = function(projectPath) { var fileContent, parentDir, parentDirPackageJSON, parentDirYarnLock, workspaces; try { parentDir = path.normalize(path.join(projectPath, '..')); parentDirPackageJSON = path.normalize(path.join(parentDir, '/package.json')); parentDirYarnLock...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
6
19
gandm/language-babel:lib/transpiler-task.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var isYarnWorkspace; isYarnWorkspace = function(projectPath) { var fileContent, parentDir, parentDirPackageJSON, parentDirYarnLock, workspaces; try { parentDir = path.normalize(path.join(projectPath, '..')); parentDirPackageJSON = path.normalize(path.j...
isYarnWorkspace = (projectPath) -> try parentDir = path.normalize( path.join( projectPath, '..')) parentDirPackageJSON = path.normalize( path.join(parentDir, '/package.json')) parentDirYarnLock = path.normalize( path.join(parentDir, '/yarn.lock')) if fs.existsSync(parentDirYarnLock) and fs.existsSync...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
6
19
gandm/language-babel:lib/transpiler-task.coffee:1:completion
completion
isYarnWorkspace = (projectPath) -> try parentDir = path.normalize( path.join( projectPath, '..')) parentDirPackageJSON = path.normalize( path.join(parentDir, '/package.json')) parentDirYarnLock = path.normalize( path.join(parentDir, '/yarn.lock')) if fs.existsSync(parentDirYarnLock) and fs.existsSync...
fileContent = stripJsonComments(fs.readFileSync(parentDirPackageJSON, 'utf8')) workspaces = (YAML.safeLoad fileContent).workspaces catch return false return !!workspaces # try and find a babel core
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
6
19
gandm/language-babel:lib/transpiler-task.coffee:2:raw_corpus
raw_corpus
tryBabelCore = (projectPath, nodeModulePath) -> try projectBabelCore = path.normalize( path.join( projectPath, nodeModulePath)) babel = require projectBabelCore catch return false 'babel': babel 'projectBabelCore': projectBabelCore # return the location of babel-core or @babel/core and also test fo...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
20
29
gandm/language-babel:lib/transpiler-task.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript tryBabelCore = (projectPath, nodeModulePath) -> try projectBabelCore = path.normalize( path.join( projectPath, nodeModulePath)) babel = require projectBabelCore catch return false 'babel': babel 'projectBabelCore': projectBabelCore # return t...
var tryBabelCore; tryBabelCore = function(projectPath, nodeModulePath) { var babel, projectBabelCore; try { projectBabelCore = path.normalize(path.join(projectPath, nodeModulePath)); babel = require(projectBabelCore); } catch (error) { return false; } return { 'babel': babel, 'projectBabe...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
20
29
gandm/language-babel:lib/transpiler-task.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var tryBabelCore; tryBabelCore = function(projectPath, nodeModulePath) { var babel, projectBabelCore; try { projectBabelCore = path.normalize(path.join(projectPath, nodeModulePath)); babel = require(projectBabelCore); } catch (error) { return fal...
tryBabelCore = (projectPath, nodeModulePath) -> try projectBabelCore = path.normalize( path.join( projectPath, nodeModulePath)) babel = require projectBabelCore catch return false 'babel': babel 'projectBabelCore': projectBabelCore # return the location of babel-core or @babel/core and also test fo...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
20
29
gandm/language-babel:lib/transpiler-task.coffee:2:completion
completion
tryBabelCore = (projectPath, nodeModulePath) -> try projectBabelCore = path.normalize( path.join( projectPath, nodeModulePath)) babel = require projectBabelCore catch
return false 'babel': babel 'projectBabelCore': projectBabelCore # return the location of babel-core or @babel/core and also test for project part of workspace
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
20
29
gandm/language-babel:lib/transpiler-task.coffee:3:raw_corpus
raw_corpus
requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if isYarnWorkspace(projectPath) if !!( babelCore = tryBabelCore( pr...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if isYarnWorks...
var requireBabelCore; requireBabelCore = function(projectPath) { var babelCore; if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/@babel/core'))) { return babelCore; } else if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/babel-core'))) { return babelCore; } else if (isYarnWorkspac...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var requireBabelCore; requireBabelCore = function(projectPath) { var babelCore; if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/@babel/core'))) { return babelCore; } else if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/babel-core'...
requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if isYarnWorkspace(projectPath) if !!( babelCore = tryBabelCore( pr...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:completion
completion
requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if isYarnWorkspace(projectPath) if !!( babelCore = tryBabelCore( pr...
else if !!( babelCore = tryBabelCore( projectPath, '../node_modules/babel-core') ) then return babelCore return tryBabelCore( '', '../node_modules/babel-core') # language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment.
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
04f8131fa8156653b17816e96f72ce4e8212a09f
474
https://github.com/gandm/language-babel/blob/04f8131fa8156653b17816e96f72ce4e8212a09f/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:raw_corpus
raw_corpus
requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if isYarnWorkspace(projectPath) if !!( babelCore = tryBabelCore( pr...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
7e3a3268cc5f193b895ffd52fd850a0162694b20
474
https://github.com/gandm/language-babel/blob/7e3a3268cc5f193b895ffd52fd850a0162694b20/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if isYarnWorks...
var requireBabelCore; requireBabelCore = function(projectPath) { var babelCore; if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/babel-core'))) { return babelCore; } else if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/@babel/core'))) { return babelCore; } else if (isYarnWorkspac...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
7e3a3268cc5f193b895ffd52fd850a0162694b20
474
https://github.com/gandm/language-babel/blob/7e3a3268cc5f193b895ffd52fd850a0162694b20/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var requireBabelCore; requireBabelCore = function(projectPath) { var babelCore; if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/babel-core'))) { return babelCore; } else if (!!(babelCore = tryBabelCore(projectPath, '/node_modules/@babel/core'...
requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if isYarnWorkspace(projectPath) if !!( babelCore = tryBabelCore( pr...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
7e3a3268cc5f193b895ffd52fd850a0162694b20
474
https://github.com/gandm/language-babel/blob/7e3a3268cc5f193b895ffd52fd850a0162694b20/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:3:completion
completion
requireBabelCore = (projectPath) -> if !!( babelCore = tryBabelCore( projectPath, '/node_modules/babel-core') ) then return babelCore else if !!( babelCore = tryBabelCore( projectPath, '/node_modules/@babel/core') ) then return babelCore else if isYarnWorkspace(projectPath) if !!( babelCore = tryBabelCore( pr...
else if !!( babelCore = tryBabelCore( projectPath, '../node_modules/@babel/core') ) then return babelCore return tryBabelCore( '', '../node_modules/babel-core') # language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment.
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
7e3a3268cc5f193b895ffd52fd850a0162694b20
474
https://github.com/gandm/language-babel/blob/7e3a3268cc5f193b895ffd52fd850a0162694b20/lib/transpiler-task.coffee
30
40
gandm/language-babel:lib/transpiler-task.coffee:1:raw_corpus
raw_corpus
# language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment. module.exports = (projectPath) -> path = require 'path' callback = @async() #async task process.chdir(projectPath) # require babel-core package for this project projectBabelCore = path.norma...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
1
50
gandm/language-babel:lib/transpiler-task.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment. module.exports = (projectPath) -> path = require 'path' callback = @async() #async task process.chdir(projectPath) # require babel-core...
// language-babel transpiles run here. // This runs as a separate task so that transpiles can have their own environment. module.exports = function(projectPath) { var babel, babelCoreUsed, callback, path, projectBabelCore; path = require('path'); callback = this.async(); //async task process.chdir(projectPath);...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
1
50
gandm/language-babel:lib/transpiler-task.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // language-babel transpiles run here. // This runs as a separate task so that transpiles can have their own environment. module.exports = function(projectPath) { var babel, babelCoreUsed, callback, path, projectBabelCore; path = require('path'); callback = t...
# language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment. module.exports = (projectPath) -> path = require 'path' callback = @async() #async task process.chdir(projectPath) # require babel-core package for this project projectBabelCore = path.norma...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
1
50
gandm/language-babel:lib/transpiler-task.coffee:1:completion
completion
# language-babel transpiles run here. # This runs as a separate task so that transpiles can have their own environment. module.exports = (projectPath) -> path = require 'path' callback = @async() #async task process.chdir(projectPath) # require babel-core package for this project projectBabelCore = path.norma...
msgRet.err = {} if err.loc then msgRet.err.loc = err.loc if err.codeFrame msgRet.err.codeFrame = err.codeFrame else msgRet.err.codeFrame = "" msgRet.err.message = err.message if result msgRet.result = result msgRet.result.as...
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
1
50
gandm/language-babel:lib/transpiler-task.coffee:2:raw_corpus
raw_corpus
# used for preview if mObj.command is 'transpileCode' try msgRet = babel.transform mObj.code, mObj.babelOptions # fiddly formating a return msgRet.babelVersion = babel.version msgRet.babelCoreUsed = babelCoreUsed emit "transpile:#{mObj.reqId}", msgRet # if this ...
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
51
77
gandm/language-babel:lib/transpiler-task.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # used for preview if mObj.command is 'transpileCode' try msgRet = babel.transform mObj.code, mObj.babelOptions # fiddly formating a return msgRet.babelVersion = babel.version msgRet.babelCoreUsed = babelCoreUsed ...
// used for preview var err, msgRet; if (mObj.command === 'transpileCode') { try { msgRet = babel.transform(mObj.code, mObj.babelOptions); // fiddly formating a return msgRet.babelVersion = babel.version; msgRet.babelCoreUsed = babelCoreUsed; emit(`transpile:${mObj.reqId}`, msgRet); // if thi...
CoffeeScript
JavaScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
51
77
gandm/language-babel:lib/transpiler-task.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // used for preview var err, msgRet; if (mObj.command === 'transpileCode') { try { msgRet = babel.transform(mObj.code, mObj.babelOptions); // fiddly formating a return msgRet.babelVersion = babel.version; msgRet.babelCoreUsed = babelCoreUsed; ...
# used for preview if mObj.command is 'transpileCode' try msgRet = babel.transform mObj.code, mObj.babelOptions # fiddly formating a return msgRet.babelVersion = babel.version msgRet.babelCoreUsed = babelCoreUsed emit "transpile:#{mObj.reqId}", msgRet # if this ...
JavaScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
51
77
gandm/language-babel:lib/transpiler-task.coffee:2:completion
completion
# used for preview if mObj.command is 'transpileCode' try msgRet = babel.transform mObj.code, mObj.babelOptions # fiddly formating a return msgRet.babelVersion = babel.version msgRet.babelCoreUsed = babelCoreUsed emit "transpile:#{mObj.reqId}", msgRet # if this ...
msgRet = {} msgRet.reqId = mObj.reqId # send back to reqId msgRet.err = {} msgRet.err.message = err.message msgRet.err.stack = err.stack msgRet.babelVersion = babel.version msgRet.babelCoreUsed = babelCoreUsed emit "transpile:#{mObj.reqId}", msgRet callbac...
CoffeeScript
CoffeeScript
gandm/language-babel
lib/transpiler-task.coffee
MIT
2a687553b7f81e5b904b3b0c778236076428634b
474
https://github.com/gandm/language-babel/blob/2a687553b7f81e5b904b3b0c778236076428634b/lib/transpiler-task.coffee
51
77
buttercoin/buttercoin:lib/api_client.coffee:1:raw_corpus
raw_corpus
module.exports = class API constructor: -> # websocket client to the trading engine @engineClient = null # stores incoming front-end sockets @frontEndSockets = {} # front-end server socket id @fid = 0 send_message: ( message ) -> # # TODO: Send an API request to the trading engi...
CoffeeScript
buttercoin/buttercoin
lib/api_client.coffee
MIT
b3883959fae51deb41f351a8787c727a7e750ec9
663
https://github.com/buttercoin/buttercoin/blob/b3883959fae51deb41f351a8787c727a7e750ec9/lib/api_client.coffee
7
56
buttercoin/buttercoin:lib/api_client.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class API constructor: -> # websocket client to the trading engine @engineClient = null # stores incoming front-end sockets @frontEndSockets = {} # front-end server socket id @fid = 0 send_message: ( message ) -> ...
var API; module.exports = API = class API { constructor() { // websocket client to the trading engine this.engineClient = null; // stores incoming front-end sockets this.frontEndSockets = {}; // front-end server socket id this.fid = 0; } send_message(message) { // TODO: Send an API ...
CoffeeScript
JavaScript
buttercoin/buttercoin
lib/api_client.coffee
MIT
b3883959fae51deb41f351a8787c727a7e750ec9
663
https://github.com/buttercoin/buttercoin/blob/b3883959fae51deb41f351a8787c727a7e750ec9/lib/api_client.coffee
7
56
buttercoin/buttercoin:lib/api_client.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var API; module.exports = API = class API { constructor() { // websocket client to the trading engine this.engineClient = null; // stores incoming front-end sockets this.frontEndSockets = {}; // front-end server socket id this.fid = 0; ...
module.exports = class API constructor: -> # websocket client to the trading engine @engineClient = null # stores incoming front-end sockets @frontEndSockets = {} # front-end server socket id @fid = 0 send_message: ( message ) -> # # TODO: Send an API request to the trading engi...
JavaScript
CoffeeScript
buttercoin/buttercoin
lib/api_client.coffee
MIT
b3883959fae51deb41f351a8787c727a7e750ec9
663
https://github.com/buttercoin/buttercoin/blob/b3883959fae51deb41f351a8787c727a7e750ec9/lib/api_client.coffee
7
56
buttercoin/buttercoin:lib/api_client.coffee:1:completion
completion
module.exports = class API constructor: -> # websocket client to the trading engine @engineClient = null # stores incoming front-end sockets @frontEndSockets = {} # front-end server socket id @fid = 0 send_message: ( message ) -> # # TODO: Send an API request to the trading engi...
# Echo back websocket message ( for now ) # this.frontEndSockets[message.front.fid].send(JSON.stringify(message)) # add_deposit: ( args ) -> # api = this # deferred = Q.defer() # args.callback = deferred.resolve # message = [operations.ADD_DEPOSIT, args ] # api.send_message(message) # ...
CoffeeScript
CoffeeScript
buttercoin/buttercoin
lib/api_client.coffee
MIT
b3883959fae51deb41f351a8787c727a7e750ec9
663
https://github.com/buttercoin/buttercoin/blob/b3883959fae51deb41f351a8787c727a7e750ec9/lib/api_client.coffee
7
56
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:1:raw_corpus
raw_corpus
cx = require 'classnames' React = require 'react' Immutable = require 'immutable' lang = require '../locales/lang' analytics = require '../util/analytics' routerHandlers = require '../handlers/router' mixinRouter = require '../mixin/router' Icon = React.createFactory require '../module/icon' Tooltip = React.createF...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript cx = require 'classnames' React = require 'react' Immutable = require 'immutable' lang = require '../locales/lang' analytics = require '../util/analytics' routerHandlers = require '../handlers/router' mixinRouter = require '../mixin/router' Icon = React.creat...
var Icon, Immutable, PureRenderMixin, React, T, Tooltip, a, analytics, cx, div, lang, mixinRouter, routerHandlers; cx = require('classnames'); React = require('react'); Immutable = require('immutable'); lang = require('../locales/lang'); analytics = require('../util/analytics'); routerHandlers = require('../handl...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Icon, Immutable, PureRenderMixin, React, T, Tooltip, a, analytics, cx, div, lang, mixinRouter, routerHandlers; cx = require('classnames'); React = require('react'); Immutable = require('immutable'); lang = require('../locales/lang'); analytics = require('....
cx = require 'classnames' React = require 'react' Immutable = require 'immutable' lang = require '../locales/lang' analytics = require '../util/analytics' routerHandlers = require '../handlers/router' mixinRouter = require '../mixin/router' Icon = React.createFactory require '../module/icon' Tooltip = React.createF...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:1:completion
completion
cx = require 'classnames' React = require 'react' Immutable = require 'immutable' lang = require '../locales/lang' analytics = require '../util/analytics' routerHandlers = require '../handlers/router' mixinRouter = require '../mixin/router' Icon = React.createFactory require '../module/icon' Tooltip = React.createF...
onRouteCollection: -> if @isActiveRoute 'collection' routerHandlers.return() return routerHandlers.collection @props._teamId analytics.openSearch() onRouteOverview: -> if @isActiveRoute 'overview' routerHandlers.return() return routerHandlers.teamOverview @props._teamId ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:2:raw_corpus
raw_corpus
params = _teamId: @props._teamId routerHandlers.mentions params onRouteTags: -> if @isActiveRoute 'tags' routerHandlers.return() return routerHandlers.tags @props._teamId render: -> div className: 'team-tools', Tooltip template: lang.getText('activities'), a classNa...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
51
78
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript params = _teamId: @props._teamId routerHandlers.mentions params onRouteTags: -> if @isActiveRoute 'tags' routerHandlers.return() return routerHandlers.tags @props._teamId render: -> div className: 'team-tools', Toolti...
var params; params = { _teamId: this.props._teamId }; routerHandlers.mentions(params); ({ onRouteTags: function() { if (this.isActiveRoute('tags')) { routerHandlers.return(); return; } return routerHandlers.tags(this.props._teamId); }, render: function() { return div({ class...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
51
78
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var params; params = { _teamId: this.props._teamId }; routerHandlers.mentions(params); ({ onRouteTags: function() { if (this.isActiveRoute('tags')) { routerHandlers.return(); return; } return routerHandlers.tags(this.props._teamId); ...
params = _teamId: @props._teamId routerHandlers.mentions params onRouteTags: -> if @isActiveRoute 'tags' routerHandlers.return() return routerHandlers.tags @props._teamId render: -> div className: 'team-tools', Tooltip template: lang.getText('activities'), a classNa...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
51
78
jianliaoim/talk-os:talk-web/client/app/team-tools.coffee:2:completion
completion
params = _teamId: @props._teamId routerHandlers.mentions params onRouteTags: -> if @isActiveRoute 'tags' routerHandlers.return() return routerHandlers.tags @props._teamId render: -> div className: 'team-tools', Tooltip template: lang.getText('activities'),
a className: cx('btn-tool', 'active': @isActiveRoute 'overview'), onClick: @onRouteOverview, Icon name: 'activity', size: 18 Tooltip template: lang.getText('mentioned-me'), a className: cx('btn-tool', 'active': @isActiveRoute 'mentions'), onClick: @onRouteMentions, Icon name: 'at', siz...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/team-tools.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/team-tools.coffee
51
78
gss/engine:src/types/Matrix.coffee:1:raw_corpus
raw_corpus
class Matrix extends Command type: 'Matrix' Library: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix = @_mat3.create(), method, a, b, c) -> if matrix.length == 9 return @_mat3[method](matrix, matrix, a, b, c) else return @_mat4[method](matrix, matrix, a, b, c) ...
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
721fc2d49467fa2839e3411dd2b8bde1664bcb25
2,854
https://github.com/gss/engine/blob/721fc2d49467fa2839e3411dd2b8bde1664bcb25/src/types/Matrix.coffee
3
24
gss/engine:src/types/Matrix.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Matrix extends Command type: 'Matrix' Library: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix = @_mat3.create(), method, a, b, c) -> if matrix.length == 9 return @_mat3[method](matrix, matrix, a, b, c) el...
var Matrix; Matrix = (function() { var method, property, ref; class Matrix extends Command { matrix() {} matrix3d() {} mat3(matrix = this._mat3.create(), method, a, b, c) { if (matrix.length === 9) { return this._mat3[method](matrix, matrix, a, b, c); } else { return this...
CoffeeScript
JavaScript
gss/engine
src/types/Matrix.coffee
MIT
721fc2d49467fa2839e3411dd2b8bde1664bcb25
2,854
https://github.com/gss/engine/blob/721fc2d49467fa2839e3411dd2b8bde1664bcb25/src/types/Matrix.coffee
3
24
gss/engine:src/types/Matrix.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Matrix; Matrix = (function() { var method, property, ref; class Matrix extends Command { matrix() {} matrix3d() {} mat3(matrix = this._mat3.create(), method, a, b, c) { if (matrix.length === 9) { return this._mat3[method](matri...
class Matrix extends Command type: 'Matrix' Library: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix = @_mat3.create(), method, a, b, c) -> if matrix.length == 9 return @_mat3[method](matrix, matrix, a, b, c) else return @_mat4[method](matrix, matrix, a, b, c) ...
JavaScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
721fc2d49467fa2839e3411dd2b8bde1664bcb25
2,854
https://github.com/gss/engine/blob/721fc2d49467fa2839e3411dd2b8bde1664bcb25/src/types/Matrix.coffee
3
24
gss/engine:src/types/Matrix.coffee:1:completion
completion
class Matrix extends Command type: 'Matrix' Library: require('../../vendor/gl-matrix') matrix: -> matrix3d: -> mat3: (matrix = @_mat3.create(), method, a, b, c) -> if matrix.length == 9
return @_mat3[method](matrix, matrix, a, b, c) else return @_mat4[method](matrix, matrix, a, b, c) mat4: (matrix = @_mat4.create(), method, a, b, c) -> if matrix.length == 9 matrix = @_mat4.fromMat3(matrix) return @_mat4[method](matrix, matrix, a, b, c) for property, method of Matrix::Libr...
CoffeeScript
CoffeeScript
gss/engine
src/types/Matrix.coffee
MIT
721fc2d49467fa2839e3411dd2b8bde1664bcb25
2,854
https://github.com/gss/engine/blob/721fc2d49467fa2839e3411dd2b8bde1664bcb25/src/types/Matrix.coffee
3
24