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
jsdf/coffee-react-transform:src/helpers.coffee:11:raw_corpus
raw_corpus
exports.some = Array::some ? (fn) -> return true for e in this when fn e false # Throws a SyntaxError from a given location. # The error's `toString` will return an error message following the "standard" # format <filename>:<line>:<col>: <message> plus the line with the error and a # marker showing where the error...
CoffeeScript
jsdf/coffee-react-transform
src/helpers.coffee
MIT
657f243f334864e9277716e9521f53243a3bb36d
431
https://github.com/jsdf/coffee-react-transform/blob/657f243f334864e9277716e9521f53243a3bb36d/src/helpers.coffee
69
76
jsdf/coffee-react-transform:src/helpers.coffee:11:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.some = Array::some ? (fn) -> return true for e in this when fn e false # Throws a SyntaxError from a given location. # The error's `toString` will return an error message following the "standard" # format <filename>:<line>:<col>: <message> plus the l...
var ref; exports.some = (ref = Array.prototype.some) != null ? ref : function(fn) { var e, i, len, ref1; ref1 = this; for (i = 0, len = ref1.length; i < len; i++) { e = ref1[i]; if (fn(e)) { return true; } } return false; }; // Throws a SyntaxError from a given location. // The error's `to...
CoffeeScript
JavaScript
jsdf/coffee-react-transform
src/helpers.coffee
MIT
657f243f334864e9277716e9521f53243a3bb36d
431
https://github.com/jsdf/coffee-react-transform/blob/657f243f334864e9277716e9521f53243a3bb36d/src/helpers.coffee
69
76
jsdf/coffee-react-transform:src/helpers.coffee:11:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ref; exports.some = (ref = Array.prototype.some) != null ? ref : function(fn) { var e, i, len, ref1; ref1 = this; for (i = 0, len = ref1.length; i < len; i++) { e = ref1[i]; if (fn(e)) { return true; } } return false; }; // Throws ...
exports.some = Array::some ? (fn) -> return true for e in this when fn e false # Throws a SyntaxError from a given location. # The error's `toString` will return an error message following the "standard" # format <filename>:<line>:<col>: <message> plus the line with the error and a # marker showing where the error...
JavaScript
CoffeeScript
jsdf/coffee-react-transform
src/helpers.coffee
MIT
657f243f334864e9277716e9521f53243a3bb36d
431
https://github.com/jsdf/coffee-react-transform/blob/657f243f334864e9277716e9521f53243a3bb36d/src/helpers.coffee
69
76
jianliaoim/talk-os:talk-web/client/util/time.coffee:1:raw_corpus
raw_corpus
exports.formatEasy = (someTime) -> unless someTime? console.error 'time is undefined' someTime = moment someTime if someTime.isSame startTime, 'day' someTime.format 'hh:mm a' else if someTime.isSame startTime, 'year' someTime.format 'MM-DD HH:mm' else someTime.format 'YYYY MM-DD'
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
6
15
jianliaoim/talk-os:talk-web/client/util/time.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.formatEasy = (someTime) -> unless someTime? console.error 'time is undefined' someTime = moment someTime if someTime.isSame startTime, 'day' someTime.format 'hh:mm a' else if someTime.isSame startTime, 'year' someTime.format 'MM-DD HH:...
exports.formatEasy = function(someTime) { if (someTime == null) { console.error('time is undefined'); } someTime = moment(someTime); if (someTime.isSame(startTime, 'day')) { return someTime.format('hh:mm a'); } else if (someTime.isSame(startTime, 'year')) { return someTime.format('MM-DD HH:mm'); ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
6
15
jianliaoim/talk-os:talk-web/client/util/time.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.formatEasy = function(someTime) { if (someTime == null) { console.error('time is undefined'); } someTime = moment(someTime); if (someTime.isSame(startTime, 'day')) { return someTime.format('hh:mm a'); } else if (someTime.isSame(startTime, ...
exports.formatEasy = (someTime) -> unless someTime? console.error 'time is undefined' someTime = moment someTime if someTime.isSame startTime, 'day' someTime.format 'hh:mm a' else if someTime.isSame startTime, 'year' someTime.format 'MM-DD HH:mm' else someTime.format 'YYYY MM-DD'
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
6
15
jianliaoim/talk-os:talk-web/client/util/time.coffee:1:completion
completion
exports.formatEasy = (someTime) -> unless someTime? console.error 'time is undefined' someTime = moment someTime if someTime.isSame startTime, 'day'
someTime.format 'hh:mm a' else if someTime.isSame startTime, 'year' someTime.format 'MM-DD HH:mm' else someTime.format 'YYYY MM-DD'
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
6
15
jianliaoim/talk-os:talk-web/client/util/time.coffee:4:raw_corpus
raw_corpus
exports.isHistoryMessage = (messageModel, cacheTime) -> messageTime = moment messageModel.get 'createdAt' timeFirst = (moment cacheTime.first).add(1, 'second') timeLast = (moment cacheTime.last).subtract(1, 'second') if messageTime.isBefore timeFirst return true else if messageTime.isAfter timeLast r...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
23
34
jianliaoim/talk-os:talk-web/client/util/time.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.isHistoryMessage = (messageModel, cacheTime) -> messageTime = moment messageModel.get 'createdAt' timeFirst = (moment cacheTime.first).add(1, 'second') timeLast = (moment cacheTime.last).subtract(1, 'second') if messageTime.isBefore timeFirst ...
exports.isHistoryMessage = function(messageModel, cacheTime) { var messageTime, timeFirst, timeLast; messageTime = moment(messageModel.get('createdAt')); timeFirst = (moment(cacheTime.first)).add(1, 'second'); timeLast = (moment(cacheTime.last)).subtract(1, 'second'); if (messageTime.isBefore(timeFirst)) { ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
23
34
jianliaoim/talk-os:talk-web/client/util/time.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.isHistoryMessage = function(messageModel, cacheTime) { var messageTime, timeFirst, timeLast; messageTime = moment(messageModel.get('createdAt')); timeFirst = (moment(cacheTime.first)).add(1, 'second'); timeLast = (moment(cacheTime.last)).subtract(1,...
exports.isHistoryMessage = (messageModel, cacheTime) -> messageTime = moment messageModel.get 'createdAt' timeFirst = (moment cacheTime.first).add(1, 'second') timeLast = (moment cacheTime.last).subtract(1, 'second') if messageTime.isBefore timeFirst return true else if messageTime.isAfter timeLast r...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
23
34
jianliaoim/talk-os:talk-web/client/util/time.coffee:4:completion
completion
exports.isHistoryMessage = (messageModel, cacheTime) -> messageTime = moment messageModel.get 'createdAt' timeFirst = (moment cacheTime.first).add(1, 'second') timeLast = (moment cacheTime.last).subtract(1, 'second') if messageTime.isBefore timeFirst
return true else if messageTime.isAfter timeLast return false else console.warn 'Message time not decided' return false
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
23
34
jianliaoim/talk-os:talk-web/client/util/time.coffee:5:raw_corpus
raw_corpus
exports.isBefore = (a, b) -> timeA = moment a timeB = moment b timeA.isBefore timeB
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
36
39
jianliaoim/talk-os:talk-web/client/util/time.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.isBefore = (a, b) -> timeA = moment a timeB = moment b timeA.isBefore timeB ```
exports.isBefore = function(a, b) { var timeA, timeB; timeA = moment(a); timeB = moment(b); return timeA.isBefore(timeB); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
36
39
jianliaoim/talk-os:talk-web/client/util/time.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.isBefore = function(a, b) { var timeA, timeB; timeA = moment(a); timeB = moment(b); return timeA.isBefore(timeB); }; ```
exports.isBefore = (a, b) -> timeA = moment a timeB = moment b timeA.isBefore timeB
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
36
39
jianliaoim/talk-os:talk-web/client/util/time.coffee:5:completion
completion
exports.isBefore = (a, b) -> timeA = moment a
timeB = moment b timeA.isBefore timeB
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
36
39
jianliaoim/talk-os:talk-web/client/util/time.coffee:6:raw_corpus
raw_corpus
exports.notSameDay = (a, b) -> dateA = new Date a dateB = new Date b return true if dateA.getDate() isnt dateB.getDate() return true if dateA.getMonth() isnt dateB.getMonth() return true if dateA.getYear() isnt dateB.getYear() return false
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
41
47
jianliaoim/talk-os:talk-web/client/util/time.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.notSameDay = (a, b) -> dateA = new Date a dateB = new Date b return true if dateA.getDate() isnt dateB.getDate() return true if dateA.getMonth() isnt dateB.getMonth() return true if dateA.getYear() isnt dateB.getYear() return false ```
exports.notSameDay = function(a, b) { var dateA, dateB; dateA = new Date(a); dateB = new Date(b); if (dateA.getDate() !== dateB.getDate()) { return true; } if (dateA.getMonth() !== dateB.getMonth()) { return true; } if (dateA.getYear() !== dateB.getYear()) { return true; } return false; ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
41
47
jianliaoim/talk-os:talk-web/client/util/time.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.notSameDay = function(a, b) { var dateA, dateB; dateA = new Date(a); dateB = new Date(b); if (dateA.getDate() !== dateB.getDate()) { return true; } if (dateA.getMonth() !== dateB.getMonth()) { return true; } if (dateA.getYear() !== d...
exports.notSameDay = (a, b) -> dateA = new Date a dateB = new Date b return true if dateA.getDate() isnt dateB.getDate() return true if dateA.getMonth() isnt dateB.getMonth() return true if dateA.getYear() isnt dateB.getYear() return false
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
41
47
jianliaoim/talk-os:talk-web/client/util/time.coffee:6:completion
completion
exports.notSameDay = (a, b) -> dateA = new Date a dateB = new Date b
return true if dateA.getDate() isnt dateB.getDate() return true if dateA.getMonth() isnt dateB.getMonth() return true if dateA.getYear() isnt dateB.getYear() return false
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
41
47
jianliaoim/talk-os:talk-web/client/util/time.coffee:7:raw_corpus
raw_corpus
exports.within1Minute = (a, b) -> timeA = new Date a timeB = new Date b Math.abs(timeA.valueOf() - timeB.valueOf()) <= 60000
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
49
52
jianliaoim/talk-os:talk-web/client/util/time.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.within1Minute = (a, b) -> timeA = new Date a timeB = new Date b Math.abs(timeA.valueOf() - timeB.valueOf()) <= 60000 ```
exports.within1Minute = function(a, b) { var timeA, timeB; timeA = new Date(a); timeB = new Date(b); return Math.abs(timeA.valueOf() - timeB.valueOf()) <= 60000; };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
49
52
jianliaoim/talk-os:talk-web/client/util/time.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.within1Minute = function(a, b) { var timeA, timeB; timeA = new Date(a); timeB = new Date(b); return Math.abs(timeA.valueOf() - timeB.valueOf()) <= 60000; }; ```
exports.within1Minute = (a, b) -> timeA = new Date a timeB = new Date b Math.abs(timeA.valueOf() - timeB.valueOf()) <= 60000
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
49
52
jianliaoim/talk-os:talk-web/client/util/time.coffee:7:completion
completion
exports.within1Minute = (a, b) -> timeA = new Date a
timeB = new Date b Math.abs(timeA.valueOf() - timeB.valueOf()) <= 60000
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
49
52
jianliaoim/talk-os:talk-web/client/util/time.coffee:8:raw_corpus
raw_corpus
exports.formatDayGap = (messageTime) -> someMoment = moment messageTime format = if someMoment.year() is moment().year() if moment.locale() is 'en' 'Do MMMM' else 'MMMM Do' else if moment.locale() is 'en' 'Do MMMM YYYY' else 'YYYY MMMM Do' return so...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
54
68
jianliaoim/talk-os:talk-web/client/util/time.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.formatDayGap = (messageTime) -> someMoment = moment messageTime format = if someMoment.year() is moment().year() if moment.locale() is 'en' 'Do MMMM' else 'MMMM Do' else if moment.locale() is 'en' 'Do ...
exports.formatDayGap = function(messageTime) { var format, someMoment; someMoment = moment(messageTime); format = someMoment.year() === moment().year() ? moment.locale() === 'en' ? 'Do MMMM' : 'MMMM Do' : moment.locale() === 'en' ? 'Do MMMM YYYY' : 'YYYY MMMM Do'; return someMoment.format(format); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
54
68
jianliaoim/talk-os:talk-web/client/util/time.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.formatDayGap = function(messageTime) { var format, someMoment; someMoment = moment(messageTime); format = someMoment.year() === moment().year() ? moment.locale() === 'en' ? 'Do MMMM' : 'MMMM Do' : moment.locale() === 'en' ? 'Do MMMM YYYY' : 'YYYY MMMM...
exports.formatDayGap = (messageTime) -> someMoment = moment messageTime format = if someMoment.year() is moment().year() if moment.locale() is 'en' 'Do MMMM' else 'MMMM Do' else if moment.locale() is 'en' 'Do MMMM YYYY' else 'YYYY MMMM Do' return so...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
54
68
jianliaoim/talk-os:talk-web/client/util/time.coffee:8:completion
completion
exports.formatDayGap = (messageTime) -> someMoment = moment messageTime format = if someMoment.year() is moment().year() if moment.locale() is 'en' 'Do MMMM' else
'MMMM Do' else if moment.locale() is 'en' 'Do MMMM YYYY' else 'YYYY MMMM Do' return someMoment.format(format)
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
54
68
jianliaoim/talk-os:talk-web/client/util/time.coffee:9:raw_corpus
raw_corpus
exports.calendar = (someTime) -> someMoment = moment someTime nowMoment = moment() if someMoment.year() isnt nowMoment.year() if(moment.locale() is 'en') date = someMoment.format('D/M/YYYY') else date = someMoment.format('YYYY/M/D') return "#{date} #{someMoment.format('LT')}" minuteDiff...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
70
92
jianliaoim/talk-os:talk-web/client/util/time.coffee:9:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.calendar = (someTime) -> someMoment = moment someTime nowMoment = moment() if someMoment.year() isnt nowMoment.year() if(moment.locale() is 'en') date = someMoment.format('D/M/YYYY') else date = someMoment.format('YYYY/M/D') ...
exports.calendar = function(someTime) { var date, minuteDiff, nowMoment, someMoment, timeText; someMoment = moment(someTime); nowMoment = moment(); if (someMoment.year() !== nowMoment.year()) { if (moment.locale() === 'en') { date = someMoment.format('D/M/YYYY'); } else { date = someMoment.f...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
70
92
jianliaoim/talk-os:talk-web/client/util/time.coffee:9:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.calendar = function(someTime) { var date, minuteDiff, nowMoment, someMoment, timeText; someMoment = moment(someTime); nowMoment = moment(); if (someMoment.year() !== nowMoment.year()) { if (moment.locale() === 'en') { date = someMoment.for...
exports.calendar = (someTime) -> someMoment = moment someTime nowMoment = moment() if someMoment.year() isnt nowMoment.year() if(moment.locale() is 'en') date = someMoment.format('D/M/YYYY') else date = someMoment.format('YYYY/M/D') return "#{date} #{someMoment.format('LT')}" minuteDiff...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
70
92
jianliaoim/talk-os:talk-web/client/util/time.coffee:9:completion
completion
exports.calendar = (someTime) -> someMoment = moment someTime nowMoment = moment() if someMoment.year() isnt nowMoment.year() if(moment.locale() is 'en') date = someMoment.format('D/M/YYYY') else date = someMoment.format('YYYY/M/D') return "#{date} #{someMoment.format('LT')}" minuteDiff...
if minuteDiff < 1 return lang.getText 'just-now' timeText = someMoment.format('LT') if someMoment.isSame(nowMoment, 'day') return "#{timeText}" if(moment.locale() is 'en') date = someMoment.format('D/M') else date = someMoment.format('M/D') return "#{date} #{timeText}"
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
70
92
jianliaoim/talk-os:talk-web/client/util/time.coffee:11:raw_corpus
raw_corpus
exports.formatDate = (someTime) -> someMoment = moment someTime someMoment.format('LL')
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
97
99
jianliaoim/talk-os:talk-web/client/util/time.coffee:11:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.formatDate = (someTime) -> someMoment = moment someTime someMoment.format('LL') ```
exports.formatDate = function(someTime) { var someMoment; someMoment = moment(someTime); return someMoment.format('LL'); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
97
99
jianliaoim/talk-os:talk-web/client/util/time.coffee:11:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.formatDate = function(someTime) { var someMoment; someMoment = moment(someTime); return someMoment.format('LL'); }; ```
exports.formatDate = (someTime) -> someMoment = moment someTime someMoment.format('LL')
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
97
99
jianliaoim/talk-os:talk-web/client/util/time.coffee:17:raw_corpus
raw_corpus
exports.nextMoment = (a) -> timeA = moment a timeA.add 10, 'ms' timeA.toISOString()
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
116
119
jianliaoim/talk-os:talk-web/client/util/time.coffee:17:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.nextMoment = (a) -> timeA = moment a timeA.add 10, 'ms' timeA.toISOString() ```
exports.nextMoment = function(a) { var timeA; timeA = moment(a); timeA.add(10, 'ms'); return timeA.toISOString(); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
116
119
jianliaoim/talk-os:talk-web/client/util/time.coffee:17:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.nextMoment = function(a) { var timeA; timeA = moment(a); timeA.add(10, 'ms'); return timeA.toISOString(); }; ```
exports.nextMoment = (a) -> timeA = moment a timeA.add 10, 'ms' timeA.toISOString()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
116
119
jianliaoim/talk-os:talk-web/client/util/time.coffee:17:completion
completion
exports.nextMoment = (a) -> timeA = moment a
timeA.add 10, 'ms' timeA.toISOString()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
116
119
jianliaoim/talk-os:talk-web/client/util/time.coffee:18:raw_corpus
raw_corpus
exports.createTime = (createTime) -> lang .getText 'publish-at' .replace '{{time}}', exports.calendar createTime
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
121
124
jianliaoim/talk-os:talk-web/client/util/time.coffee:18:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.createTime = (createTime) -> lang .getText 'publish-at' .replace '{{time}}', exports.calendar createTime ```
exports.createTime = function(createTime) { return lang.getText('publish-at').replace('{{time}}', exports.calendar(createTime)); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
121
124
jianliaoim/talk-os:talk-web/client/util/time.coffee:18:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.createTime = function(createTime) { return lang.getText('publish-at').replace('{{time}}', exports.calendar(createTime)); }; ```
exports.createTime = (createTime) -> lang .getText 'publish-at' .replace '{{time}}', exports.calendar createTime
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
121
124
jianliaoim/talk-os:talk-web/client/util/time.coffee:18:completion
completion
exports.createTime = (createTime) -> lang
.getText 'publish-at' .replace '{{time}}', exports.calendar createTime
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
121
124
jianliaoim/talk-os:talk-web/client/util/time.coffee:19:raw_corpus
raw_corpus
exports.targetTime = (createTime, updateTime) -> createTime = new Date createTime updateTime = new Date updateTime if createTime.getTime() >= updateTime.getTime() lang .getText 'create-at' .replace '{{time}}', exports.calendar createTime else lang .getText 'update-at' .replace '{{time}}...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
126
137
jianliaoim/talk-os:talk-web/client/util/time.coffee:19:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.targetTime = (createTime, updateTime) -> createTime = new Date createTime updateTime = new Date updateTime if createTime.getTime() >= updateTime.getTime() lang .getText 'create-at' .replace '{{time}}', exports.calendar createTime else...
exports.targetTime = function(createTime, updateTime) { createTime = new Date(createTime); updateTime = new Date(updateTime); if (createTime.getTime() >= updateTime.getTime()) { return lang.getText('create-at').replace('{{time}}', exports.calendar(createTime)); } else { return lang.getText('update-at')....
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
126
137
jianliaoim/talk-os:talk-web/client/util/time.coffee:19:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.targetTime = function(createTime, updateTime) { createTime = new Date(createTime); updateTime = new Date(updateTime); if (createTime.getTime() >= updateTime.getTime()) { return lang.getText('create-at').replace('{{time}}', exports.calendar(createT...
exports.targetTime = (createTime, updateTime) -> createTime = new Date createTime updateTime = new Date updateTime if createTime.getTime() >= updateTime.getTime() lang .getText 'create-at' .replace '{{time}}', exports.calendar createTime else lang .getText 'update-at' .replace '{{time}}...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
126
137
jianliaoim/talk-os:talk-web/client/util/time.coffee:19:completion
completion
exports.targetTime = (createTime, updateTime) -> createTime = new Date createTime updateTime = new Date updateTime if createTime.getTime() >= updateTime.getTime() lang
.getText 'create-at' .replace '{{time}}', exports.calendar createTime else lang .getText 'update-at' .replace '{{time}}', exports.calendar updateTime
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/time.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/time.coffee
126
137
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'room-item' mixins: [ mixinSubscribe ] propTypes: _teamId: T.string room: T.instanceOf(Immutable.Map).isRequired isArchived: T.bool showAction: T.bool onChange: T.func getDefaultProps: -> isArchived: false showAction: true getInit...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
31
80
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'room-item' mixins: [ mixinSubscribe ] propTypes: _teamId: T.string room: T.instanceOf(Immutable.Map).isRequired isArchived: T.bool showAction: T.bool onChange: T.func getDefaultProps:...
module.exports = React.createClass({ displayName: 'room-item', mixins: [mixinSubscribe], propTypes: { _teamId: T.string, room: T.instanceOf(Immutable.Map).isRequired, isArchived: T.bool, showAction: T.bool, onChange: T.func }, getDefaultProps: function() { return { isArchived: fa...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
31
80
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'room-item', mixins: [mixinSubscribe], propTypes: { _teamId: T.string, room: T.instanceOf(Immutable.Map).isRequired, isArchived: T.bool, showAction: T.bool, onChange: T.func }, getDefau...
module.exports = React.createClass displayName: 'room-item' mixins: [ mixinSubscribe ] propTypes: _teamId: T.string room: T.instanceOf(Immutable.Map).isRequired isArchived: T.bool showAction: T.bool onChange: T.func getDefaultProps: -> isArchived: false showAction: true getInit...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
31
80
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:1:completion
completion
module.exports = React.createClass displayName: 'room-item' mixins: [ mixinSubscribe ] propTypes: _teamId: T.string room: T.instanceOf(Immutable.Map).isRequired isArchived: T.bool showAction: T.bool onChange: T.func getDefaultProps: -> isArchived: false showAction: true getInit...
getContacts: -> query.contactsBy(recorder.getState(), @props._teamId) getAlias: -> query.contactPrefsBy(recorder.getState(), @props._teamId, @props.room.get('_creatorId'))?.get('alias') onClick: -> @props.onClick?() renderAvatar: -> Avatar size: 'normal' shape: 'round' classNa...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
31
80
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:2:raw_corpus
raw_corpus
purpose = @props.room.get('purpose') createInfo = lang.getText('team-rooms-description') .replace '{{time}}', time.calendar(@props.room.get('createdAt')) .replace '{{name}}', name purpose or createInfo renderRoom: -> _roomId = @props.room.get('_id') cxItem = cx 'room-item', 'flex-horiz', 'fl...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
81
130
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:2:completion
completion
purpose = @props.room.get('purpose') createInfo = lang.getText('team-rooms-description') .replace '{{time}}', time.calendar(@props.room.get('createdAt')) .replace '{{name}}', name purpose or createInfo renderRoom: -> _roomId = @props.room.get('_id') cxItem = cx 'room-item', 'flex-horiz', 'fl...
render: -> @renderRoom() ArchivedRoomItemHandlersetClass = React.createClass displayName: 'archived-room-item-handlerset' propTypes: _teamId: T.string.isRequired room: T.instanceOf(Immutable.Map).isRequired getInitialState: -> showConfirm: false onRecover: -> roomActions.roomArchive @pro...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
81
130
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:3:raw_corpus
raw_corpus
renderConfirm: -> LightDialog flexible: true show: @state.showConfirm onCloseClick: @onCloseConfirm onConfirm: @onRemoveClick confirm: l('confirm') cancel: l('cancel') content: l('confirm-delete-topic') render: -> div className: 'archived-room-item-handlerset handler...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
131
148
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript renderConfirm: -> LightDialog flexible: true show: @state.showConfirm onCloseClick: @onCloseConfirm onConfirm: @onRemoveClick confirm: l('confirm') cancel: l('cancel') content: l('confirm-delete-topic') render: -> ...
var ArchivedRoomItemsHandlersetPermission; ({ renderConfirm: function() { return LightDialog({ flexible: true, show: this.state.showConfirm, onCloseClick: this.onCloseConfirm, onConfirm: this.onRemoveClick, confirm: l('confirm'), cancel: l('cancel'), content: l('confirm-...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
131
148
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ArchivedRoomItemsHandlersetPermission; ({ renderConfirm: function() { return LightDialog({ flexible: true, show: this.state.showConfirm, onCloseClick: this.onCloseConfirm, onConfirm: this.onRemoveClick, confirm: l('confirm')...
renderConfirm: -> LightDialog flexible: true show: @state.showConfirm onCloseClick: @onCloseConfirm onConfirm: @onRemoveClick confirm: l('confirm') cancel: l('cancel') content: l('confirm-delete-topic') render: -> div className: 'archived-room-item-handlerset handler...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
131
148
jianliaoim/talk-os:talk-web/client/app/room-item.coffee:3:completion
completion
renderConfirm: -> LightDialog flexible: true show: @state.showConfirm onCloseClick: @onCloseConfirm onConfirm: @onRemoveClick confirm: l('confirm') cancel: l('cancel')
content: l('confirm-delete-topic') render: -> div className: 'archived-room-item-handlerset handlerset flex-static line', button className: 'button is-primary is-small', onClick: @onRecover, '还原' # button className: 'button is-danger is-small', onClick: @onConfirmShow, '删除' @renderConfirm() Ar...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/room-item.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/room-item.coffee
131
148
js2coffee/js2coffee:lib/support/specs_iterator.coffee:1:raw_corpus
raw_corpus
coffee = require('coffee-script') glob = require('glob') path = require('path') fs = require('fs') exports.root = "#{__dirname}/../../specs" exports.toName = (dirname) -> s = path.basename(dirname).replace(/_/g, ' ').trim() s = s.replace(/\.txt$/, '') s.substr(0,1).toUpperCase() + s.substr(1) ### # eachGroup()...
CoffeeScript
js2coffee/js2coffee
lib/support/specs_iterator.coffee
MIT
47d3159aba94ffd4377138f7837717d8628eef9f
2,082
https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/specs_iterator.coffee
1
45
js2coffee/js2coffee:lib/support/specs_iterator.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript coffee = require('coffee-script') glob = require('glob') path = require('path') fs = require('fs') exports.root = "#{__dirname}/../../specs" exports.toName = (dirname) -> s = path.basename(dirname).replace(/_/g, ' ').trim() s = s.replace(/\.txt$/, '') s.s...
var coffee, fs, glob, path; coffee = require('coffee-script'); glob = require('glob'); path = require('path'); fs = require('fs'); exports.root = `${__dirname}/../../specs`; exports.toName = function(dirname) { var s; s = path.basename(dirname).replace(/_/g, ' ').trim(); s = s.replace(/\.txt$/, ''); retur...
CoffeeScript
JavaScript
js2coffee/js2coffee
lib/support/specs_iterator.coffee
MIT
47d3159aba94ffd4377138f7837717d8628eef9f
2,082
https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/specs_iterator.coffee
1
45
js2coffee/js2coffee:lib/support/specs_iterator.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var coffee, fs, glob, path; coffee = require('coffee-script'); glob = require('glob'); path = require('path'); fs = require('fs'); exports.root = `${__dirname}/../../specs`; exports.toName = function(dirname) { var s; s = path.basename(dirname).replace(/_...
coffee = require('coffee-script') glob = require('glob') path = require('path') fs = require('fs') exports.root = "#{__dirname}/../../specs" exports.toName = (dirname) -> s = path.basename(dirname).replace(/_/g, ' ').trim() s = s.replace(/\.txt$/, '') s.substr(0,1).toUpperCase() + s.substr(1) ### # eachGroup()...
JavaScript
CoffeeScript
js2coffee/js2coffee
lib/support/specs_iterator.coffee
MIT
47d3159aba94ffd4377138f7837717d8628eef9f
2,082
https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/specs_iterator.coffee
1
45
js2coffee/js2coffee:lib/support/specs_iterator.coffee:1:completion
completion
coffee = require('coffee-script') glob = require('glob') path = require('path') fs = require('fs') exports.root = "#{__dirname}/../../specs" exports.toName = (dirname) -> s = path.basename(dirname).replace(/_/g, ' ').trim() s = s.replace(/\.txt$/, '') s.substr(0,1).toUpperCase() + s.substr(1) ### # eachGroup()...
# spec.output # spec.meta # spec.pending ### exports.eachGroup = (fn) -> groups = glob.sync("#{exports.root}/*") for group in groups specDirs = glob.sync("#{group}/*") specs = specDirs.map (spec) -> data = fs.readFileSync(spec, 'utf-8') name = exports.toName(spec) ...
CoffeeScript
CoffeeScript
js2coffee/js2coffee
lib/support/specs_iterator.coffee
MIT
47d3159aba94ffd4377138f7837717d8628eef9f
2,082
https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/specs_iterator.coffee
1
45
jianliaoim/talk-os:talk-web/client/app/link-viewer.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' Icon = React.createFactory require '../module/icon' TopicName = React.createFactory require '../app/topic-name' StoryName = React.createFactory require '../app//story-...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/link-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/link-viewer.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/link-viewer.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' Icon = React.createFactory require '../module/icon' TopicName = React.createFactory require '../app/topic-name...
var ContactName, Icon, Immutable, MessageToolbar, PureRenderMixin, React, StoryName, T, TopicName, a, div, lang, span; React = require('react'); Immutable = require('immutable'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../locales/lang'); Icon = React.createFactory(require('../m...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/link-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/link-viewer.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/link-viewer.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ContactName, Icon, Immutable, MessageToolbar, PureRenderMixin, React, StoryName, T, TopicName, a, div, lang, span; React = require('react'); Immutable = require('immutable'); PureRenderMixin = require('react-addons-pure-render-mixin'); lang = require('../lo...
React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' Icon = React.createFactory require '../module/icon' TopicName = React.createFactory require '../app/topic-name' StoryName = React.createFactory require '../app//story-...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/link-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/link-viewer.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/link-viewer.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' PureRenderMixin = require 'react-addons-pure-render-mixin' lang = require '../locales/lang' Icon = React.createFactory require '../module/icon' TopicName = React.createFactory require '../app/topic-name' StoryName = React.createFactory require '../app//story-...
onClose: T.func.isRequired onClose: -> @props.onClose() render: -> return if not @props.message.get('attachments').size target = @props.message.get('attachments').filter (attachment) -> attachment.get('category') is 'quote' quote = target.get(0).get('data') creator = @props.message.get...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/link-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/link-viewer.coffee
1
50
jianliaoim/talk-os:talk-web/client/app/link-viewer.coffee:2:raw_corpus
raw_corpus
div className: 'title', quote.get('title') div className: 'text', quote.get('text') a className: 'link', href: quote.get('redirectUrl'), target: '_blank', quote.get('redirectUrl') if quote.get('thumbnailPicUrl')? div className: 'picture', style: pictureStyle div c...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/link-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/link-viewer.coffee
51
68
jianliaoim/talk-os:talk-web/client/app/link-viewer.coffee:2:completion
completion
div className: 'title', quote.get('title') div className: 'text', quote.get('text') a className: 'link', href: quote.get('redirectUrl'), target: '_blank', quote.get('redirectUrl') if quote.get('thumbnailPicUrl')? div className: 'picture', style: pictureStyle div c...
TopicName topic: @props.message.get('room') when 'dms' ContactName contact: @props.message.get('creator') _teamId: @props.message.get('_teamId') when 'story' story = @props.message.get('story') StoryName title: story.get('title'), categ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/link-viewer.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/link-viewer.coffee
51
68
gandm/language-babel:lib/insert-nl.coffee:1:raw_corpus
raw_corpus
module.exports = class InsertNl constructor: (@editor) -> @adviseBefore(@editor, 'insertText', @insertText) # patched TextEditor::insertText insertText: (text, options) => return true unless ( text is "\n" ) return true if @editor.hasMultipleCursors() # for time being if !@insertNewlineBetweenJS...
CoffeeScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
1
50
gandm/language-babel:lib/insert-nl.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class InsertNl constructor: (@editor) -> @adviseBefore(@editor, 'insertText', @insertText) # patched TextEditor::insertText insertText: (text, options) => return true unless ( text is "\n" ) return true if @editor.hasMultipleCu...
var InsertNl; module.exports = InsertNl = class InsertNl { constructor(editor) { // patched TextEditor::insertText this.insertText = this.insertText.bind(this); this.editor = editor; this.adviseBefore(this.editor, 'insertText', this.insertText); } insertText(text, options) { if (!(text === "...
CoffeeScript
JavaScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
1
50
gandm/language-babel:lib/insert-nl.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var InsertNl; module.exports = InsertNl = class InsertNl { constructor(editor) { // patched TextEditor::insertText this.insertText = this.insertText.bind(this); this.editor = editor; this.adviseBefore(this.editor, 'insertText', this.insertText); ...
module.exports = class InsertNl constructor: (@editor) -> @adviseBefore(@editor, 'insertText', @insertText) # patched TextEditor::insertText insertText: (text, options) => return true unless ( text is "\n" ) return true if @editor.hasMultipleCursors() # for time being if !@insertNewlineBetweenJS...
JavaScript
CoffeeScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
1
50
gandm/language-babel:lib/insert-nl.coffee:1:completion
completion
module.exports = class InsertNl constructor: (@editor) -> @adviseBefore(@editor, 'insertText', @insertText) # patched TextEditor::insertText insertText: (text, options) => return true unless ( text is "\n" ) return true if @editor.hasMultipleCursors() # for time being if !@insertNewlineBetweenJS...
@editor.setIndentationForBufferRow cursorBufferPosition.row+2, indentLength, { preserveLeadingWhitespace: false } @editor.moveUp() @editor.moveToEndOfLine() false # if a newline is entered after the opening styled component backtick # indent cursor and add a closing backtick insertNewlineAfterStyledC...
CoffeeScript
CoffeeScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
1
50
gandm/language-babel:lib/insert-nl.coffee:2:raw_corpus
raw_corpus
object[methodName] = (args...) -> unless advice.apply(this, args) == false original.apply(this, args)
CoffeeScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
51
53
gandm/language-babel:lib/insert-nl.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript object[methodName] = (args...) -> unless advice.apply(this, args) == false original.apply(this, args) ```
object[methodName] = function(...args) { if (advice.apply(this, args) !== false) { return original.apply(this, args); } };
CoffeeScript
JavaScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
51
53
gandm/language-babel:lib/insert-nl.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript object[methodName] = function(...args) { if (advice.apply(this, args) !== false) { return original.apply(this, args); } }; ```
object[methodName] = (args...) -> unless advice.apply(this, args) == false original.apply(this, args)
JavaScript
CoffeeScript
gandm/language-babel
lib/insert-nl.coffee
MIT
2d07d26a68f7d52cee34f10070c52bc7c8e940d5
474
https://github.com/gandm/language-babel/blob/2d07d26a68f7d52cee34f10070c52bc7c8e940d5/lib/insert-nl.coffee
51
53
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_returns.coffee:1:raw_corpus
raw_corpus
# Expression conversion under explicit returns. first: -> return 'do' for x in [1,2,3] second: -> return ['re' for x in [1,2,3]] third: -> return ('mi' for x in [1,2,3]) ok first().join(' ') is 'do do do' ok second()[0].join(' ') is 're re re' ok third().join(' ') is 'mi mi mi'
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_returns.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_returns.coffee
1
13
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_returns.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Expression conversion under explicit returns. first: -> return 'do' for x in [1,2,3] second: -> return ['re' for x in [1,2,3]] third: -> return ('mi' for x in [1,2,3]) ok first().join(' ') is 'do do do' ok second()[0].join(' ') is 're re re' ok thi...
// Expression conversion under explicit returns. ({ first: function() { var i, len, ref, x; ref = [1, 2, 3]; for (i = 0, len = ref.length; i < len; i++) { x = ref[i]; return 'do'; } }, second: function() { var x; return [ (function() { var i, len, ref,...
CoffeeScript
JavaScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_returns.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_returns.coffee
1
13
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_returns.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Expression conversion under explicit returns. ({ first: function() { var i, len, ref, x; ref = [1, 2, 3]; for (i = 0, len = ref.length; i < len; i++) { x = ref[i]; return 'do'; } }, second: function() { var x; return [ ...
# Expression conversion under explicit returns. first: -> return 'do' for x in [1,2,3] second: -> return ['re' for x in [1,2,3]] third: -> return ('mi' for x in [1,2,3]) ok first().join(' ') is 'do do do' ok second()[0].join(' ') is 're re re' ok third().join(' ') is 'mi mi mi'
JavaScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_returns.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_returns.coffee
1
13
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_returns.coffee:1:completion
completion
# Expression conversion under explicit returns. first: -> return 'do' for x in [1,2,3] second: -> return ['re' for x in [1,2,3]]
third: -> return ('mi' for x in [1,2,3]) ok first().join(' ') is 'do do do' ok second()[0].join(' ') is 're re re' ok third().join(' ') is 'mi mi mi'
CoffeeScript
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_returns.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_returns.coffee
1
13
twilson63/express-coffee:src/routes.coffee:1:raw_corpus
raw_corpus
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # simple session authorization checkAuth = (req, res, next) -> unless ...
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
baedde8ee076605eeaf56dd50eb72fe6d5621f8e
622
https://github.com/twilson63/express-coffee/blob/baedde8ee076605eeaf56dd50eb72fe6d5621f8e/src/routes.coffee
1
50
twilson63/express-coffee:src/routes.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript #### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # simple session au...
//### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { var checkAuth; // simple session authorization ch...
CoffeeScript
JavaScript
twilson63/express-coffee
src/routes.coffee
MIT
baedde8ee076605eeaf56dd50eb72fe6d5621f8e
622
https://github.com/twilson63/express-coffee/blob/baedde8ee076605eeaf56dd50eb72fe6d5621f8e/src/routes.coffee
1
50
twilson63/express-coffee:src/routes.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript //### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { ...
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # simple session authorization checkAuth = (req, res, next) -> unless ...
JavaScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
baedde8ee076605eeaf56dd50eb72fe6d5621f8e
622
https://github.com/twilson63/express-coffee/blob/baedde8ee076605eeaf56dd50eb72fe6d5621f8e/src/routes.coffee
1
50
twilson63/express-coffee:src/routes.coffee:1:completion
completion
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # simple session authorization checkAuth = (req, res, next) -> unless ...
app.all '/:controller', (req, res, next) -> routeMvc(req.params.controller, 'index', req, res, next) # - _/**:controller**/**:method**_ -> controllers/***:controller***/***:method*** method app.all '/:controller/:method', (req, res, next) -> routeMvc(req.params.controller, req.params.method, req, res, ne...
CoffeeScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
baedde8ee076605eeaf56dd50eb72fe6d5621f8e
622
https://github.com/twilson63/express-coffee/blob/baedde8ee076605eeaf56dd50eb72fe6d5621f8e/src/routes.coffee
1
50
twilson63/express-coffee:src/routes.coffee:2:raw_corpus
raw_corpus
next() return data = null if typeof controller[methodName] is 'function' actionMethod = controller[methodName].bind controller actionMethod req, res, next else console.warn 'method not found: ' + methodName next()
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
baedde8ee076605eeaf56dd50eb72fe6d5621f8e
622
https://github.com/twilson63/express-coffee/blob/baedde8ee076605eeaf56dd50eb72fe6d5621f8e/src/routes.coffee
51
59
twilson63/express-coffee:src/routes.coffee:2:completion
completion
next() return data = null if typeof controller[methodName] is 'function'
actionMethod = controller[methodName].bind controller actionMethod req, res, next else console.warn 'method not found: ' + methodName next()
CoffeeScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
baedde8ee076605eeaf56dd50eb72fe6d5621f8e
622
https://github.com/twilson63/express-coffee/blob/baedde8ee076605eeaf56dd50eb72fe6d5621f8e/src/routes.coffee
51
59
twilson63/express-coffee:src/routes.coffee:1:raw_corpus
raw_corpus
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) -...
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
43b4e1c06f2b97abb3190a2396741caf715a9e58
622
https://github.com/twilson63/express-coffee/blob/43b4e1c06f2b97abb3190a2396741caf715a9e58/src/routes.coffee
1
46
twilson63/express-coffee:src/routes.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript #### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> control...
//### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { // - _/_ -> controllers/index/index method app.al...
CoffeeScript
JavaScript
twilson63/express-coffee
src/routes.coffee
MIT
43b4e1c06f2b97abb3190a2396741caf715a9e58
622
https://github.com/twilson63/express-coffee/blob/43b4e1c06f2b97abb3190a2396741caf715a9e58/src/routes.coffee
1
46
twilson63/express-coffee:src/routes.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript //### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { ...
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) -...
JavaScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
43b4e1c06f2b97abb3190a2396741caf715a9e58
622
https://github.com/twilson63/express-coffee/blob/43b4e1c06f2b97abb3190a2396741caf715a9e58/src/routes.coffee
1
46
twilson63/express-coffee:src/routes.coffee:1:completion
completion
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) -...
# If all else failed, show 404 page app.all '/*', (req, res) -> console.warn "error 404: ", req.url res.statusCode = 404 res.render '404', 404 # render the page based on controller name, method and id routeMvc = (controllerName, methodName, req, res, next) -> controllerName = 'index' if not controllerN...
CoffeeScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
43b4e1c06f2b97abb3190a2396741caf715a9e58
622
https://github.com/twilson63/express-coffee/blob/43b4e1c06f2b97abb3190a2396741caf715a9e58/src/routes.coffee
1
46
twilson63/express-coffee:src/routes.coffee:1:raw_corpus
raw_corpus
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) ...
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
a1b277121ba9508466907141c91c54f1b0fd703a
622
https://github.com/twilson63/express-coffee/blob/a1b277121ba9508466907141c91c54f1b0fd703a/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript #### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> contro...
//### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { // - _/_ -> controllers/index/index method app.al...
CoffeeScript
JavaScript
twilson63/express-coffee
src/routes.coffee
MIT
a1b277121ba9508466907141c91c54f1b0fd703a
622
https://github.com/twilson63/express-coffee/blob/a1b277121ba9508466907141c91c54f1b0fd703a/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript //### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { ...
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) ...
JavaScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
a1b277121ba9508466907141c91c54f1b0fd703a
622
https://github.com/twilson63/express-coffee/blob/a1b277121ba9508466907141c91c54f1b0fd703a/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:completion
completion
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) ...
# If all else failed, show 404 page app.all '/*', (req, res) -> console.warn "error 404: ", req.url res.statusCode = 404 res.render '404', 404 # render the page based on controller name, method and id routeMvc = (controllerName, methodName, req, res, next) -> controllerName = 'index' if not controllerN...
CoffeeScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
a1b277121ba9508466907141c91c54f1b0fd703a
622
https://github.com/twilson63/express-coffee/blob/a1b277121ba9508466907141c91c54f1b0fd703a/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:raw_corpus
raw_corpus
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) ...
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
c29913c25d264957ee3be15a953aa27b05e04e52
622
https://github.com/twilson63/express-coffee/blob/c29913c25d264957ee3be15a953aa27b05e04e52/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript #### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> contro...
//### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { // - _/_ -> controllers/index/index method app.al...
CoffeeScript
JavaScript
twilson63/express-coffee
src/routes.coffee
MIT
c29913c25d264957ee3be15a953aa27b05e04e52
622
https://github.com/twilson63/express-coffee/blob/c29913c25d264957ee3be15a953aa27b05e04e52/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript //### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { ...
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) ...
JavaScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
c29913c25d264957ee3be15a953aa27b05e04e52
622
https://github.com/twilson63/express-coffee/blob/c29913c25d264957ee3be15a953aa27b05e04e52/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:completion
completion
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next) ...
# If all else failed, show 404 page app.all '/*', (req, res) -> console.warn "error 404: ", req.url res.statusCode = 404 res.render '404', 404 # render the page based on controller name, method and id routeMvc = (controllerName, methodName, req, res, next) -> controllerName = 'index' if not controllerN...
CoffeeScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
c29913c25d264957ee3be15a953aa27b05e04e52
622
https://github.com/twilson63/express-coffee/blob/c29913c25d264957ee3be15a953aa27b05e04e52/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:raw_corpus
raw_corpus
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next)...
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
c67393054345653afd1dcde0f49fc814d4c1ce14
622
https://github.com/twilson63/express-coffee/blob/c67393054345653afd1dcde0f49fc814d4c1ce14/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript #### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> contr...
//### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { // - _/_ -> controllers/index/index method app.al...
CoffeeScript
JavaScript
twilson63/express-coffee
src/routes.coffee
MIT
c67393054345653afd1dcde0f49fc814d4c1ce14
622
https://github.com/twilson63/express-coffee/blob/c67393054345653afd1dcde0f49fc814d4c1ce14/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript //### Routes // We are setting up theese routes: // GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. // We are using method names to determine controller actions for clearness. var routeMvc; module.exports = function(app) { ...
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next)...
JavaScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
c67393054345653afd1dcde0f49fc814d4c1ce14
622
https://github.com/twilson63/express-coffee/blob/c67393054345653afd1dcde0f49fc814d4c1ce14/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:completion
completion
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next)...
# If all else failed, show 404 page app.all '/*', (req, res)-> console.warn "error 404: ", req.url res.statusCode = 404 res.render '404', 404 # render the page based on controller name, method and id routeMvc = (controllerName, methodName, req, res, next)-> controllerName='index' if not controllerName?...
CoffeeScript
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
c67393054345653afd1dcde0f49fc814d4c1ce14
622
https://github.com/twilson63/express-coffee/blob/c67393054345653afd1dcde0f49fc814d4c1ce14/src/routes.coffee
1
47
twilson63/express-coffee:src/routes.coffee:1:raw_corpus
raw_corpus
#### Routes # We are setting up theese routes: # # GET, POST, PUT, DELETE methods are going to the same controller methods - we dont care. # We are using method names to determine controller actions for clearness. module.exports = (app) -> # - _/_ -> controllers/index/index method app.all '/', (req, res, next)...
CoffeeScript
twilson63/express-coffee
src/routes.coffee
MIT
63c412c61179b3eb48d1a8d01ce4046ced481748
622
https://github.com/twilson63/express-coffee/blob/63c412c61179b3eb48d1a8d01ce4046ced481748/src/routes.coffee
1
50