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
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Swag.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Swag.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[fie...
var indexOf = [].indexOf; Swag.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Swag.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(function(a, b) { ...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var indexOf = [].indexOf; Swag.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Swag.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sor...
Swag.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Swag.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Swag.registerHelper 'withSort', (array, f...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:completion
completion
Swag.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Swag.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Swag.registerHelper 'withSort', (array, f...
result Swag.registerHelper 'length', (array) -> array.length Swag.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Swag.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else options.inverse(@)...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
for value, index in array result += options.fn item: value, index: index result Swag.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript for value, index in array result += options.fn item: value, index: index result Swag.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result ```
var i, index, len, value; for (index = i = 0, len = array.length; i < len; index = ++i) { value = array[index]; result += options.fn({ item: value, index: index }); } result; Swag.registerHelper('eachProperty', function(obj, options) { var key, result; result = ''; for (key in obj) { value = ...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var i, index, len, value; for (index = i = 0, len = array.length; i < len; index = ++i) { value = array[index]; result += options.fn({ item: value, index: index }); } result; Swag.registerHelper('eachProperty', function(obj, options) { var key, r...
for value, index in array result += options.fn item: value, index: index result Swag.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:3:completion
completion
for value, index in array result += options.fn item: value, index: index result Swag.registerHelper 'eachProperty', (obj, options) ->
result = '' for key, value of obj result += options.fn key: key, value: value result
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17
675
https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:1:raw_corpus
raw_corpus
Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options.fn array[0] else array = array.slice 0, count...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
1
43
elving/swag:src/swag.collections.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options....
Handlebars.registerHelper('first', function(array, count) { if (Utils.isUndefined(count)) { return array[0]; } else { return array.slice(0, count); } }); Handlebars.registerHelper('withFirst', function(array, count, options) { var item, result; if (Utils.isUndefined(count)) { options = count; ...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
1
43
elving/swag:src/swag.collections.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('first', function(array, count) { if (Utils.isUndefined(count)) { return array[0]; } else { return array.slice(0, count); } }); Handlebars.registerHelper('withFirst', function(array, count, options) { var item, result; i...
Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options.fn array[0] else array = array.slice 0, count...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
1
43
elving/swag:src/swag.collections.coffee:1:completion
completion
Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options.fn array[0] else array = array.slice 0, count...
array = array.slice -count result = '' for item of array then result += options.fn array[item] result Handlebars.registerHelper 'after', (array, count) -> array.slice count Handlebars.registerHelper 'withAfter', (array, count, options) -> array = array.slice count result = '' f...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
1
43
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
var indexOf = [].indexOf; Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(funct...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var indexOf = [].indexOf; Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { retu...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
result Handlebars.registerHelper 'length', (array) -> array.length Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else ...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
for value, index in array result += options.fn item: value, index: index result Handlebars.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript for value, index in array result += options.fn item: value, index: index result Handlebars.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result ``...
var i, index, len, value; for (index = i = 0, len = array.length; i < len; index = ++i) { value = array[index]; result += options.fn({ item: value, index: index }); } result; Handlebars.registerHelper('eachProperty', function(obj, options) { var key, result; result = ''; for (key in obj) { va...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var i, index, len, value; for (index = i = 0, len = array.length; i < len; index = ++i) { value = array[index]; result += options.fn({ item: value, index: index }); } result; Handlebars.registerHelper('eachProperty', function(obj, options) { var ...
for value, index in array result += options.fn item: value, index: index result Handlebars.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:3:completion
completion
for value, index in array result += options.fn item: value, index: index result Handlebars.registerHelper 'eachProperty', (obj, options) ->
result = '' for key, value of obj result += options.fn key: key, value: value result
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
3236ef391806d1cf8ad9c13147055b18b52b79de
675
https://github.com/elving/swag/blob/3236ef391806d1cf8ad9c13147055b18b52b79de/src/swag.collections.coffee
85
96
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
a17cbed4f1c324b6eb28292c529a1fb838f7f704
675
https://github.com/elving/swag/blob/a17cbed4f1c324b6eb28292c529a1fb838f7f704/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
var indexOf = [].indexOf; Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(funct...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
a17cbed4f1c324b6eb28292c529a1fb838f7f704
675
https://github.com/elving/swag/blob/a17cbed4f1c324b6eb28292c529a1fb838f7f704/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var indexOf = [].indexOf; Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { retu...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
a17cbed4f1c324b6eb28292c529a1fb838f7f704
675
https://github.com/elving/swag/blob/a17cbed4f1c324b6eb28292c529a1fb838f7f704/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
result Handlebars.registerHelper 'length', (array) -> array.length Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else ...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
a17cbed4f1c324b6eb28292c529a1fb838f7f704
675
https://github.com/elving/swag/blob/a17cbed4f1c324b6eb28292c529a1fb838f7f704/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
03af4a4083f7506a52b9402c1ba9a7251feba2f6
675
https://github.com/elving/swag/blob/03af4a4083f7506a52b9402c1ba9a7251feba2f6/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(function(a, b) { return a[...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
03af4a4083f7506a52b9402c1ba9a7251feba2f6
675
https://github.com/elving/swag/blob/03af4a4083f7506a52b9402c1ba9a7251feba2f6/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else {...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
03af4a4083f7506a52b9402c1ba9a7251feba2f6
675
https://github.com/elving/swag/blob/03af4a4083f7506a52b9402c1ba9a7251feba2f6/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
result Handlebars.registerHelper 'length', (array) -> array.length Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else ...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
03af4a4083f7506a52b9402c1ba9a7251feba2f6
675
https://github.com/elving/swag/blob/03af4a4083f7506a52b9402c1ba9a7251feba2f6/src/swag.collections.coffee
45
83
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
ddfdb1abaa9505a033e48f8fe22856c37a32e8c9
675
https://github.com/elving/swag/blob/ddfdb1abaa9505a033e48f8fe22856c37a32e8c9/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(function(a, b) { return a[...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
ddfdb1abaa9505a033e48f8fe22856c37a32e8c9
675
https://github.com/elving/swag/blob/ddfdb1abaa9505a033e48f8fe22856c37a32e8c9/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else {...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
ddfdb1abaa9505a033e48f8fe22856c37a32e8c9
675
https://github.com/elving/swag/blob/ddfdb1abaa9505a033e48f8fe22856c37a32e8c9/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
Handlebars.registerHelper 'length', (array) -> array.length Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else options....
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
ddfdb1abaa9505a033e48f8fe22856c37a32e8c9
675
https://github.com/elving/swag/blob/ddfdb1abaa9505a033e48f8fe22856c37a32e8c9/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
while i < j data.index = i if data context[i].index = i ret = ret + options.fn context[i] i++ else ret = options.inverse(@) ret Handlebars.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += option...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
ddfdb1abaa9505a033e48f8fe22856c37a32e8c9
675
https://github.com/elving/swag/blob/ddfdb1abaa9505a033e48f8fe22856c37a32e8c9/src/swag.collections.coffee
89
104
elving/swag:src/swag.collections.coffee:3:completion
completion
while i < j data.index = i if data context[i].index = i ret = ret + options.fn context[i] i++ else ret = options.inverse(@) ret
Handlebars.registerHelper 'eachProperty', (obj, options) -> result = '' for key, value of obj result += options.fn key: key, value: value result
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
ddfdb1abaa9505a033e48f8fe22856c37a32e8c9
675
https://github.com/elving/swag/blob/ddfdb1abaa9505a033e48f8fe22856c37a32e8c9/src/swag.collections.coffee
89
104
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
while i < j data.index = i if data context[i].index = i ret = ret + options.fn context[i] i++ else ret = options.inverse(@) ret
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
8973486a6844ae4fb58b9878359aab583143af98
675
https://github.com/elving/swag/blob/8973486a6844ae4fb58b9878359aab583143af98/src/swag.collections.coffee
89
96
elving/swag:src/swag.collections.coffee:3:completion
completion
while i < j data.index = i if data context[i].index = i ret = ret + options.fn context[i]
i++ else ret = options.inverse(@) ret
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
8973486a6844ae4fb58b9878359aab583143af98
675
https://github.com/elving/swag/blob/8973486a6844ae4fb58b9878359aab583143af98/src/swag.collections.coffee
89
96
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
bfe98d27e401faaa884a8f6d6ef39c7a058a31db
675
https://github.com/elving/swag/blob/bfe98d27e401faaa884a8f6d6ef39c7a058a31db/src/swag.collections.coffee
45
84
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(function(a, b) { return a[...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
bfe98d27e401faaa884a8f6d6ef39c7a058a31db
675
https://github.com/elving/swag/blob/bfe98d27e401faaa884a8f6d6ef39c7a058a31db/src/swag.collections.coffee
45
84
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else {...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
bfe98d27e401faaa884a8f6d6ef39c7a058a31db
675
https://github.com/elving/swag/blob/bfe98d27e401faaa884a8f6d6ef39c7a058a31db/src/swag.collections.coffee
45
84
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
array.length Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'any', (array...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
bfe98d27e401faaa884a8f6d6ef39c7a058a31db
675
https://github.com/elving/swag/blob/bfe98d27e401faaa884a8f6d6ef39c7a058a31db/src/swag.collections.coffee
45
84
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
while i < j data.index = i if data ret = ret + options.fn(_.extend({}, context[i], index: i)) i++ else ret = options.inverse(@) ret
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
441efdfd6622cbb0b2664d383464f2c9ef78604a
675
https://github.com/elving/swag/blob/441efdfd6622cbb0b2664d383464f2c9ef78604a/src/swag.collections.coffee
86
92
elving/swag:src/swag.collections.coffee:3:completion
completion
while i < j data.index = i if data ret = ret + options.fn(_.extend({}, context[i], index: i))
i++ else ret = options.inverse(@) ret
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
441efdfd6622cbb0b2664d383464f2c9ef78604a
675
https://github.com/elving/swag/blob/441efdfd6622cbb0b2664d383464f2c9ef78604a/src/swag.collections.coffee
86
92
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
c5ec07506c9f02bb29b0eea4aaec74ac896a136f
675
https://github.com/elving/swag/blob/c5ec07506c9f02bb29b0eea4aaec74ac896a136f/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(function(a, b) { return a[...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
c5ec07506c9f02bb29b0eea4aaec74ac896a136f
675
https://github.com/elving/swag/blob/c5ec07506c9f02bb29b0eea4aaec74ac896a136f/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else {...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
c5ec07506c9f02bb29b0eea4aaec74ac896a136f
675
https://github.com/elving/swag/blob/c5ec07506c9f02bb29b0eea4aaec74ac896a136f/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'any', (array, options) -> ...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
c5ec07506c9f02bb29b0eea4aaec74ac896a136f
675
https://github.com/elving/swag/blob/c5ec07506c9f02bb29b0eea4aaec74ac896a136f/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
while i < j data.index = i if data ret = ret + fn(_.extend({}, context[i], index: i nextIndex: i + 1 )) i++ else ret = inverse(this) ret
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
c5ec07506c9f02bb29b0eea4aaec74ac896a136f
675
https://github.com/elving/swag/blob/c5ec07506c9f02bb29b0eea4aaec74ac896a136f/src/swag.collections.coffee
89
98
elving/swag:src/swag.collections.coffee:3:completion
completion
while i < j data.index = i if data ret = ret + fn(_.extend({}, context[i], index: i nextIndex: i + 1
)) i++ else ret = inverse(this) ret
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
c5ec07506c9f02bb29b0eea4aaec74ac896a136f
675
https://github.com/elving/swag/blob/c5ec07506c9f02bb29b0eea4aaec74ac896a136f/src/swag.collections.coffee
89
98
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
9813478e09049ae8820c8d4e76b2776bf0337bab
675
https://github.com/elving/swag/blob/9813478e09049ae8820c8d4e76b2776bf0337bab/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a,...
Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else { return array.sort(function(a, b) { return a[...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
9813478e09049ae8820c8d4e76b2776bf0337bab
675
https://github.com/elving/swag/blob/9813478e09049ae8820c8d4e76b2776bf0337bab/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('join', function(array, separator) { return array.join(Utils.isUndefined(separator) ? ' ' : separator); }); Handlebars.registerHelper('sort', function(array, field) { if (Utils.isUndefined(field)) { return array.sort(); } else {...
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
9813478e09049ae8820c8d4e76b2776bf0337bab
675
https://github.com/elving/swag/blob/9813478e09049ae8820c8d4e76b2776bf0337bab/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:2:completion
completion
Handlebars.registerHelper 'join', (array, separator) -> array.join if Utils.isUndefined(separator) then ' ' else separator Handlebars.registerHelper 'sort', (array, field) -> if Utils.isUndefined field array.sort() else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'wi...
Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'any', (array, options) -> ...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
9813478e09049ae8820c8d4e76b2776bf0337bab
675
https://github.com/elving/swag/blob/9813478e09049ae8820c8d4e76b2776bf0337bab/src/swag.collections.coffee
45
87
elving/swag:src/swag.collections.coffee:3:raw_corpus
raw_corpus
while i < j data.index = i if data ret = ret + fn(_.extend({}, context[i], i: i iPlus1: i + 1 )) i++ else ret = inverse(this) ret
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
9813478e09049ae8820c8d4e76b2776bf0337bab
675
https://github.com/elving/swag/blob/9813478e09049ae8820c8d4e76b2776bf0337bab/src/swag.collections.coffee
89
98
elving/swag:src/swag.collections.coffee:3:completion
completion
while i < j data.index = i if data ret = ret + fn(_.extend({}, context[i], i: i iPlus1: i + 1
)) i++ else ret = inverse(this) ret
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
9813478e09049ae8820c8d4e76b2776bf0337bab
675
https://github.com/elving/swag/blob/9813478e09049ae8820c8d4e76b2776bf0337bab/src/swag.collections.coffee
89
98
elving/swag:src/swag.collections.coffee:1:raw_corpus
raw_corpus
Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options.fn array[0] else array = array.slice 0, count...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.collections.coffee
1
50
elving/swag:src/swag.collections.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options....
Handlebars.registerHelper('first', function(array, count) { if (Utils.isUndefined(count)) { return array[0]; } else { return array.slice(0, count); } }); Handlebars.registerHelper('withFirst', function(array, count, options) { var item, result; if (Utils.isUndefined(count)) { options = count; ...
CoffeeScript
JavaScript
elving/swag
src/swag.collections.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.collections.coffee
1
50
elving/swag:src/swag.collections.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Handlebars.registerHelper('first', function(array, count) { if (Utils.isUndefined(count)) { return array[0]; } else { return array.slice(0, count); } }); Handlebars.registerHelper('withFirst', function(array, count, options) { var item, result; i...
Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options.fn array[0] else array = array.slice 0, count...
JavaScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.collections.coffee
1
50
elving/swag:src/swag.collections.coffee:1:completion
completion
Handlebars.registerHelper 'first', (array, count) -> if Utils.isUndefined(count) then array[0] else array.slice 0, count Handlebars.registerHelper 'withFirst', (array, count, options) -> if Utils.isUndefined count options = count options.fn array[0] else array = array.slice 0, count...
Handlebars.registerHelper 'after', (array, count) -> array.slice count Handlebars.registerHelper 'withAfter', (array, count, options) -> array = array.slice count result = '' for item of array then result += options.fn array[item] result Handlebars.registerHelper 'before', (array, count) -> ar...
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.collections.coffee
1
50
elving/swag:src/swag.collections.coffee:2:raw_corpus
raw_corpus
else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'withSort', (array, field, options) -> if Utils.isUndefined field options = field options.fn array.sort() else array = array.sort (a, b) -> a[field] > b[field] result = '' for item of array t...
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.collections.coffee
51
77
elving/swag:src/swag.collections.coffee:2:completion
completion
else array.sort (a, b) -> a[field] > b[field] Handlebars.registerHelper 'withSort', (array, field, options) -> if Utils.isUndefined field options = field options.fn array.sort() else array = array.sort (a, b) -> a[field] > b[field] result = '' for item of array t...
Handlebars.registerHelper 'length', (array) -> array.length Handlebars.registerHelper 'lengthEqual', (array, length, options) -> if array.length is length then options.fn(@) else options.inverse(@) Handlebars.registerHelper 'empty', (array, options) -> if array.length <= 0 then options.fn(@) else options....
CoffeeScript
CoffeeScript
elving/swag
src/swag.collections.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.collections.coffee
51
77
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:1:raw_corpus
raw_corpus
should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request, requestAsync} = app { UserModel } = limbo.use 'talk' describe 'Activity#CURD', -> before prepare it 'should create an activity when create new room', (done) -> $broadcast = ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
1
41
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request, requestAsync} = app { UserModel } = limbo.use 'talk' describe 'Activity#CURD', -> before prepare it 'should create an act...
var Promise, UserModel, app, cleanup, limbo, prepare, request, requestAsync, should; should = require('should'); Promise = require('bluebird'); limbo = require('limbo'); app = require('../app'); ({prepare, cleanup, request, requestAsync} = app); ({UserModel} = limbo.use('talk')); describe('Activity#CURD', functi...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
1
41
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Promise, UserModel, app, cleanup, limbo, prepare, request, requestAsync, should; should = require('should'); Promise = require('bluebird'); limbo = require('limbo'); app = require('../app'); ({prepare, cleanup, request, requestAsync} = app); ({UserModel} ...
should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request, requestAsync} = app { UserModel } = limbo.use 'talk' describe 'Activity#CURD', -> before prepare it 'should create an activity when create new room', (done) -> $broadcast = ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
1
41
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:1:completion
completion
should = require 'should' Promise = require 'bluebird' limbo = require 'limbo' app = require '../app' {prepare, cleanup, request, requestAsync} = app { UserModel } = limbo.use 'talk' describe 'Activity#CURD', -> before prepare it 'should create an activity when create new room', (done) -> $broadcast = ...
app.broadcast = (channel, event, data) -> try if event is 'activity:create' and data.type is 'room' hits |= 0b1 data.should.have.properties 'target', 'type', 'text', 'creator' data.target.topic.should.eql 'New room' data.text.should.eql "{{__info-create-...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
1
41
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:2:raw_corpus
raw_corpus
Promise.all [$createRoom, $broadcast] .nodeify done it 'should create an activity when create new story', (done) -> $broadcast = new Promise (resolve, reject) -> hits = 0 app.broadcast = (channel, event, data) -> try if event is 'activity:create' and data.type is 'story' ...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
43
85
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:2:completion
completion
Promise.all [$createRoom, $broadcast] .nodeify done it 'should create an activity when create new story', (done) -> $broadcast = new Promise (resolve, reject) -> hits = 0 app.broadcast = (channel, event, data) -> try if event is 'activity:create' and data.type is 'story' ...
body: _sessionUserId: app.user1._id _teamId: app.team1._id category: 'topic' data: title: 'New topic' requestAsync options Promise.all [$createStory, $broadcast] .nodeify done it 'should create an activity when add new users', (done) -> $broadca...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
43
85
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:3:raw_corpus
raw_corpus
$user = Promise.resolve().then -> user = new UserModel name: 'tt' user.$save() $inviteNewUser = $user.then (user) -> options = method: 'POST' url: "/teams/#{app.team1._id}/invite" body: _sessionUserId: app.user1._id _userId: user._id reque...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
87
130
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $user = Promise.resolve().then -> user = new UserModel name: 'tt' user.$save() $inviteNewUser = $user.then (user) -> options = method: 'POST' url: "/teams/#{app.team1._id}/invite" body: _sessionUser...
var $inviteNewUser, $user; $user = Promise.resolve().then(function() { var user; user = new UserModel({ name: 'tt' }); return user.$save(); }); $inviteNewUser = $user.then(function(user) { var options; options = { method: 'POST', url: `/teams/${app.team1._id}/invite`, body: { _sessio...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
87
130
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $inviteNewUser, $user; $user = Promise.resolve().then(function() { var user; user = new UserModel({ name: 'tt' }); return user.$save(); }); $inviteNewUser = $user.then(function(user) { var options; options = { method: 'POST', url: `/te...
$user = Promise.resolve().then -> user = new UserModel name: 'tt' user.$save() $inviteNewUser = $user.then (user) -> options = method: 'POST' url: "/teams/#{app.team1._id}/invite" body: _sessionUserId: app.user1._id _userId: user._id reque...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
87
130
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:3:completion
completion
$user = Promise.resolve().then -> user = new UserModel name: 'tt' user.$save() $inviteNewUser = $user.then (user) -> options = method: 'POST' url: "/teams/#{app.team1._id}/invite" body: _sessionUserId: app.user1._id _userId: user._id reque...
url: '/activities' qs: _sessionUserId: app.user2._id _teamId: app.team1._id requestAsync options .spread (res) -> res.body.length.should.eql 2 app.activity1 = res.body[0] res.body[0].text.should.eql '{{__info-invite-team-member}} tt' $activities.nod...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
87
130
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:4:raw_corpus
raw_corpus
$activities = $removeRoom.then -> options = method: 'GET' url: '/activities' qs: _sessionUserId: app.user2._id _teamId: app.team1._id requestAsync options .spread (res) -> res.body.length.should.eql 1 $activities.nodeify done it 'should remove an ac...
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
132
166
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript $activities = $removeRoom.then -> options = method: 'GET' url: '/activities' qs: _sessionUserId: app.user2._id _teamId: app.team1._id requestAsync options .spread (res) -> res.body.length.should.eql 1...
var $activities; $activities = $removeRoom.then(function() { var options; options = { method: 'GET', url: '/activities', qs: { _sessionUserId: app.user2._id, _teamId: app.team1._id } }; return requestAsync(options).spread(function(res) { return res.body.length.should.eql(1); }...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
132
166
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var $activities; $activities = $removeRoom.then(function() { var options; options = { method: 'GET', url: '/activities', qs: { _sessionUserId: app.user2._id, _teamId: app.team1._id } }; return requestAsync(options).spread(functi...
$activities = $removeRoom.then -> options = method: 'GET' url: '/activities' qs: _sessionUserId: app.user2._id _teamId: app.team1._id requestAsync options .spread (res) -> res.body.length.should.eql 1 $activities.nodeify done it 'should remove an ac...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
132
166
jianliaoim/talk-os:talk-api2x/test/controllers/activity.coffee:4:completion
completion
$activities = $removeRoom.then -> options = method: 'GET' url: '/activities' qs: _sessionUserId: app.user2._id _teamId: app.team1._id requestAsync options .spread (res) -> res.body.length.should.eql 1 $activities.nodeify done it 'should remove an ac...
app.broadcast = (channel, event, data) -> try if event is 'activity:remove' hits |= 0b1 resolve() if hits is 0b1 catch err reject err $activity = Promise.resolve().then -> options = method: 'DELETE' url: "/activities/#{app.activity1._i...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/test/controllers/activity.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/test/controllers/activity.coffee
132
166
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.c...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var caretPos, content, end, isString, query, start, subtext; ...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var car...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:completion
completion
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
# Get offset of current at char(`flag`) # # @return [Hash] the offset which look likes this: {top: y, left: x, bottom: bottom} rect: -> return if not c = @$inputor.caret('offset', @pos - 1, {iframe: @app.iframe}) if @app.iframe and not @app.iframeAsRoot iframeOffset = $(@app.iframe).offset() c...
CoffeeScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8
5,250
https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.c...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var caretPos, content, end, isString, query, start, subtext; ...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8
5,250
https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var car...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8
5,250
https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:completion
completion
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
# Get offset of current at char(`flag`) # # @return [Hash] the offset which look likes this: {top: y, left: x, bottom: bottom} rect: -> return if not c = @$inputor.caret('offset', @pos - 1, {iframe: @app.iframe}) if @app.iframe and not @app.iframeAsRoot iframeOffset = $(@app.iframe).offset() c...
CoffeeScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8
5,250
https://github.com/ichord/At.js/blob/c9b7609aa6ddfe2adea9f05cc2a289e9e6dc55f8/src/textareaController.coffee
1
50
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
f8692dc89f56d0925511cf9b7715113d49a00fef
5,250
https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/src/textareaController.coffee
1
48
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.c...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var caretPos, content, end, query, start, subtext; content...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
f8692dc89f56d0925511cf9b7715113d49a00fef
5,250
https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/src/textareaController.coffee
1
48
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var car...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
f8692dc89f56d0925511cf9b7715113d49a00fef
5,250
https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/src/textareaController.coffee
1
48
ichord/At.js:src/textareaController.coffee:1:completion
completion
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
# @return [Hash] the offset which look likes this: {top: y, left: x, bottom: bottom} rect: -> return if not c = @$inputor.caret('offset', @pos - 1, {iframe: @app.iframe}) if @app.iframe and not @app.iframeAsRoot iframeOffset = $(@app.iframe).offset() c.left += iframeOffset.left c.top += ifra...
CoffeeScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
f8692dc89f56d0925511cf9b7715113d49a00fef
5,250
https://github.com/ichord/At.js/blob/f8692dc89f56d0925511cf9b7715113d49a00fef/src/textareaController.coffee
1
48
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007
5,250
https://github.com/ichord/At.js/blob/eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.c...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var caretPos, content, end, query, start, subtext; content...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007
5,250
https://github.com/ichord/At.js/blob/eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var car...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007
5,250
https://github.com/ichord/At.js/blob/eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:completion
completion
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
# @return [Hash] the offset which look likes this: {top: y, left: x, bottom: bottom} rect: -> return if not c = @$inputor.caret('offset', @pos - 1, {iframe: @app.iframe}) if @app.iframe and not @app.iframeAsRoot iframeOffset = $(@app.iframe).offset() c.left += iframeOffset.left c.top += ifra...
CoffeeScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007
5,250
https://github.com/ichord/At.js/blob/eaf8d9e4db5dba89f1a3a3de8f75da47ac2cf007/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
ac213212f2d0d421896f8e490ec99698ed1d99f0
5,250
https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.c...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var caretPos, content, end, query, start, subtext; content...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
ac213212f2d0d421896f8e490ec99698ed1d99f0
5,250
https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var car...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
ac213212f2d0d421896f8e490ec99698ed1d99f0
5,250
https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:completion
completion
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
# @return [Hash] the offset which look likes this: {top: y, left: x, bottom: bottom} rect: -> return if not c = @$inputor.caret('offset', @pos - 1, {iframe: @app.iframe}) if @app.iframe and not @app.iframeStandalone iframeOffset = $(@app.iframe).offset() c.left += iframeOffset.left c.top += ...
CoffeeScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
ac213212f2d0d421896f8e490ec99698ed1d99f0
5,250
https://github.com/ichord/At.js/blob/ac213212f2d0d421896f8e490ec99698ed1d99f0/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.c...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var caretPos, content, end, query, start, subtext; content...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery() { var car...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:completion
completion
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'headPos': 0, 'endPos': 0} catchQuery: -> content = @$inputor.val() caretPos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = content....
# @return [Hash] the offset which look likes this: {top: y, left: x, bottom: bottom} rect: -> return if not c = @$inputor.caret('offset', @pos - 1, {iframe: @app.iframe}) if @app.iframe and not @app.iframeStandalone iframeOffset = $(@app.iframe).offset() c.left += iframeOffset.left c.top += ...
CoffeeScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:raw_corpus
raw_corpus
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'head_pos': 0, 'end_pos': 0} catch_query: -> content = @$inputor.val() caret_pos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = cont...
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0
5,250
https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'head_pos': 0, 'end_pos': 0} catch_query: -> content = @$inputor.val() caret_pos = @$input...
var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'head_pos': 0, 'end_pos': 0} catch_query() { var caret_pos, content, end, query, start, subtext; con...
CoffeeScript
JavaScript
ichord/At.js
src/textareaController.coffee
MIT
b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0
5,250
https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/src/textareaController.coffee
1
47
ichord/At.js:src/textareaController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var TextareaController; TextareaController = class TextareaController extends Controller { // Catch query string behind the at char // @return [Hash] Info of the query. Look likes this: {'text': "hello", 'head_pos': 0, 'end_pos': 0} catch_query() { var ...
class TextareaController extends Controller # Catch query string behind the at char # # @return [Hash] Info of the query. Look likes this: {'text': "hello", 'head_pos': 0, 'end_pos': 0} catch_query: -> content = @$inputor.val() caret_pos = @$inputor.caret('pos', {iframe: @app.iframe}) subtext = cont...
JavaScript
CoffeeScript
ichord/At.js
src/textareaController.coffee
MIT
b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0
5,250
https://github.com/ichord/At.js/blob/b05d51a77ef9a02aa2dbcd72543ead335a5cb5a0/src/textareaController.coffee
1
47