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
Nedomas/databound:src/databound.coffee:14:raw_corpus
raw_corpus
Databound::url = (action) -> if _.isEmpty(Databound.API_URL) "#{@endpoint}/#{action}" else "#{Databound.API_URL}/#{@endpoint}/#{action}"
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
128
132
Nedomas/databound:src/databound.coffee:14:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::url = (action) -> if _.isEmpty(Databound.API_URL) "#{@endpoint}/#{action}" else "#{Databound.API_URL}/#{@endpoint}/#{action}" ```
Databound.prototype.url = function(action) { if (_.isEmpty(Databound.API_URL)) { return `${this.endpoint}/${action}`; } else { return `${Databound.API_URL}/${this.endpoint}/${action}`; } };
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
128
132
Nedomas/databound:src/databound.coffee:14:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.url = function(action) { if (_.isEmpty(Databound.API_URL)) { return `${this.endpoint}/${action}`; } else { return `${Databound.API_URL}/${this.endpoint}/${action}`; } }; ```
Databound::url = (action) -> if _.isEmpty(Databound.API_URL) "#{@endpoint}/#{action}" else "#{Databound.API_URL}/#{@endpoint}/#{action}"
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
128
132
Nedomas/databound:src/databound.coffee:14:completion
completion
Databound::url = (action) -> if _.isEmpty(Databound.API_URL)
"#{@endpoint}/#{action}" else "#{Databound.API_URL}/#{@endpoint}/#{action}"
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
128
132
Nedomas/databound:src/databound.coffee:15:raw_corpus
raw_corpus
Databound::data = (params) -> scope: JSON.stringify(@scope) extra_find_scopes: JSON.stringify(@extra_find_scopes) data: JSON.stringify(params)
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
134
137
Nedomas/databound:src/databound.coffee:15:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::data = (params) -> scope: JSON.stringify(@scope) extra_find_scopes: JSON.stringify(@extra_find_scopes) data: JSON.stringify(params) ```
Databound.prototype.data = function(params) { return { scope: JSON.stringify(this.scope), extra_find_scopes: JSON.stringify(this.extra_find_scopes), data: JSON.stringify(params) }; };
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
134
137
Nedomas/databound:src/databound.coffee:15:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.data = function(params) { return { scope: JSON.stringify(this.scope), extra_find_scopes: JSON.stringify(this.extra_find_scopes), data: JSON.stringify(params) }; }; ```
Databound::data = (params) -> scope: JSON.stringify(@scope) extra_find_scopes: JSON.stringify(@extra_find_scopes) data: JSON.stringify(params)
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
134
137
Nedomas/databound:src/databound.coffee:15:completion
completion
Databound::data = (params) -> scope: JSON.stringify(@scope)
extra_find_scopes: JSON.stringify(@extra_find_scopes) data: JSON.stringify(params)
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
3298bfbdb88366d938c1aa0bc30b30664cb7a216
452
https://github.com/Nedomas/databound/blob/3298bfbdb88366d938c1aa0bc30b30664cb7a216/src/databound.coffee
134
137
Nedomas/databound:src/databound.coffee:13:raw_corpus
raw_corpus
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with: # { # success: true, # id: record.id, # scoped_records: [] # } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success # TODO: fix inconsistency if _.isSt...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
6bd2a3c4644ed2166328c330c9230dc14c77b677
452
https://github.com/Nedomas/databound/blob/6bd2a3c4644ed2166328c330c9230dc14c77b677/src/databound.coffee
107
129
Nedomas/databound:src/databound.coffee:13:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with: # { # success: true, # id: record.id, # scoped_records: [] # } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless r...
Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with: // { // success: true, // id: record.id, // scoped_records: [] // } return this.request(action, params).then(function(resp) { var records; if (!(resp != null ? resp.succe...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
6bd2a3c4644ed2166328c330c9230dc14c77b677
452
https://github.com/Nedomas/databound/blob/6bd2a3c4644ed2166328c330c9230dc14c77b677/src/databound.coffee
107
129
Nedomas/databound:src/databound.coffee:13:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with: // { // success: true, // id: record.id, // scoped_records: [] // } return this.request(action, params).then(function(resp)...
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with: # { # success: true, # id: record.id, # scoped_records: [] # } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success # TODO: fix inconsistency if _.isSt...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
6bd2a3c4644ed2166328c330c9230dc14c77b677
452
https://github.com/Nedomas/databound/blob/6bd2a3c4644ed2166328c330c9230dc14c77b677/src/databound.coffee
107
129
Nedomas/databound:src/databound.coffee:13:completion
completion
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with: # { # success: true, # id: record.id, # scoped_records: [] # } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success
# TODO: fix inconsistency if _.isString(resp.scoped_records) resp.scoped_records = JSON.parse(resp.scoped_records) records = resp.scoped_records.concat(_this.seeds) _this.records = _.sortBy(records, 'id') if resp.id _this.promise _this.take(resp.id) else _this.promise resp.succes...
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
6bd2a3c4644ed2166328c330c9230dc14c77b677
452
https://github.com/Nedomas/databound/blob/6bd2a3c4644ed2166328c330c9230dc14c77b677/src/databound.coffee
107
129
Nedomas/databound:src/databound.coffee:4:raw_corpus
raw_corpus
Databound::where = (params) -> _this = @ @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.properties = _.keys(records[0]) _this.records = _.sortBy(computed_records, 'id') ...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
41
58
Nedomas/databound:src/databound.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::where = (params) -> _this = @ @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.properties = _.keys(records[...
Databound.prototype.where = function(params) { var _this; _this = this; return this.request('where', params).then(function(records) { var computed_records; records = records.concat(_this.seeds); computed_records = _.map(records, function(record) { return _this.withComputedProps(record); }); ...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
41
58
Nedomas/databound:src/databound.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.where = function(params) { var _this; _this = this; return this.request('where', params).then(function(records) { var computed_records; records = records.concat(_this.seeds); computed_records = _.map(records, function(record) {...
Databound::where = (params) -> _this = @ @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.properties = _.keys(records[0]) _this.records = _.sortBy(computed_records, 'id') ...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
41
58
Nedomas/databound:src/databound.coffee:4:completion
completion
Databound::where = (params) -> _this = @ @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.properties = _.keys(records[0])
_this.records = _.sortBy(computed_records, 'id') _this.promise _this.records # Return a single record by ``id`` # # ```coffeescript # User.find(15).then (user) -> # alert "Yo, #{user.name}" # ```
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
41
58
Nedomas/databound:src/databound.coffee:10:raw_corpus
raw_corpus
Databound::take = (id) -> _this = @ _.detect @records, (record) -> JSON.stringify(id) == JSON.stringify(record.id)
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
98
102
Nedomas/databound:src/databound.coffee:10:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::take = (id) -> _this = @ _.detect @records, (record) -> JSON.stringify(id) == JSON.stringify(record.id) ```
Databound.prototype.take = function(id) { var _this; _this = this; return _.detect(this.records, function(record) { return JSON.stringify(id) === JSON.stringify(record.id); }); };
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
98
102
Nedomas/databound:src/databound.coffee:10:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.take = function(id) { var _this; _this = this; return _.detect(this.records, function(record) { return JSON.stringify(id) === JSON.stringify(record.id); }); }; ```
Databound::take = (id) -> _this = @ _.detect @records, (record) -> JSON.stringify(id) == JSON.stringify(record.id)
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
98
102
Nedomas/databound:src/databound.coffee:10:completion
completion
Databound::take = (id) -> _this = @
_.detect @records, (record) -> JSON.stringify(id) == JSON.stringify(record.id)
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
98
102
Nedomas/databound:src/databound.coffee:12:raw_corpus
raw_corpus
Databound::injectSeedRecords = (records) -> @seeds = records # Used with Angular.js ``$watch`` to sync model changes to backend
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
108
111
Nedomas/databound:src/databound.coffee:12:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::injectSeedRecords = (records) -> @seeds = records # Used with Angular.js ``$watch`` to sync model changes to backend ```
Databound.prototype.injectSeedRecords = function(records) { return this.seeds = records; }; // Used with Angular.js ``$watch`` to sync model changes to backend
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
108
111
Nedomas/databound:src/databound.coffee:12:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.injectSeedRecords = function(records) { return this.seeds = records; }; // Used with Angular.js ``$watch`` to sync model changes to backend ```
Databound::injectSeedRecords = (records) -> @seeds = records # Used with Angular.js ``$watch`` to sync model changes to backend
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
108
111
Nedomas/databound:src/databound.coffee:13:raw_corpus
raw_corpus
Databound::syncDiff = (new_records, old_records) -> _this = this dirty_records = _.select(new_records, (new_record) -> record_with_same_id = _.detect(old_records, (old_record) -> new_record.id is old_record.id ) JSON.stringify(_.pick(record_with_same_id, _this.properties)) isnt JSON.stringi...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
112
123
Nedomas/databound:src/databound.coffee:13:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::syncDiff = (new_records, old_records) -> _this = this dirty_records = _.select(new_records, (new_record) -> record_with_same_id = _.detect(old_records, (old_record) -> new_record.id is old_record.id ) JSON.stringify(_.pick(record...
Databound.prototype.syncDiff = function(new_records, old_records) { var _this, dirty_records; _this = this; dirty_records = _.select(new_records, function(new_record) { var record_with_same_id; record_with_same_id = _.detect(old_records, function(old_record) { return new_record.id === old_record.id;...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
112
123
Nedomas/databound:src/databound.coffee:13:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.syncDiff = function(new_records, old_records) { var _this, dirty_records; _this = this; dirty_records = _.select(new_records, function(new_record) { var record_with_same_id; record_with_same_id = _.detect(old_records, function(old_...
Databound::syncDiff = (new_records, old_records) -> _this = this dirty_records = _.select(new_records, (new_record) -> record_with_same_id = _.detect(old_records, (old_record) -> new_record.id is old_record.id ) JSON.stringify(_.pick(record_with_same_id, _this.properties)) isnt JSON.stringi...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
112
123
Nedomas/databound:src/databound.coffee:13:completion
completion
Databound::syncDiff = (new_records, old_records) -> _this = this dirty_records = _.select(new_records, (new_record) -> record_with_same_id = _.detect(old_records, (old_record) -> new_record.id is old_record.id
) JSON.stringify(_.pick(record_with_same_id, _this.properties)) isnt JSON.stringify(_.pick(new_record, _this.properties)) ) _.each dirty_records, (record) -> _this.update record
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
112
123
Nedomas/databound:src/databound.coffee:14:raw_corpus
raw_corpus
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success # TODO: fix inconsistency if _.isString(resp.scoped_records) resp.scoped_rec...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
125
141
Nedomas/databound:src/databound.coffee:14:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success # TODO: fix inconsistency ...
Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) { throw new Error('Error in the backend'); } ...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
125
141
Nedomas/databound:src/databound.coffee:14:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) ...
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success # TODO: fix inconsistency if _.isString(resp.scoped_records) resp.scoped_rec...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
125
141
Nedomas/databound:src/databound.coffee:14:completion
completion
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success # TODO: fix inconsistency
if _.isString(resp.scoped_records) resp.scoped_records = JSON.parse(resp.scoped_records) _this.records = _.sortBy(resp.scoped_records, 'id') if resp.id _this.promise _this.take(resp.id) else _this.promise resp.success
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
125
141
Nedomas/databound:src/databound.coffee:15:raw_corpus
raw_corpus
Databound::withComputedProps = (record) -> if @computed _.extend record, @computed(record) else record
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
143
147
Nedomas/databound:src/databound.coffee:15:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::withComputedProps = (record) -> if @computed _.extend record, @computed(record) else record ```
Databound.prototype.withComputedProps = function(record) { if (this.computed) { return _.extend(record, this.computed(record)); } else { return record; } };
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
143
147
Nedomas/databound:src/databound.coffee:15:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.withComputedProps = function(record) { if (this.computed) { return _.extend(record, this.computed(record)); } else { return record; } }; ```
Databound::withComputedProps = (record) -> if @computed _.extend record, @computed(record) else record
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
143
147
Nedomas/databound:src/databound.coffee:15:completion
completion
Databound::withComputedProps = (record) -> if @computed
_.extend record, @computed(record) else record
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
270aa35b3bb2300a0ee14de29e4e6a8409f6ecec
452
https://github.com/Nedomas/databound/blob/270aa35b3bb2300a0ee14de29e4e6a8409f6ecec/src/databound.coffee
143
147
Nedomas/databound:src/databound.coffee:10:raw_corpus
raw_corpus
Databound::take = (id) -> _.detect @records, (record) -> parseInt(record.id) == parseInt(id)
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
8c027951b7b20fd17b15a1d6930cc2125b113e06
452
https://github.com/Nedomas/databound/blob/8c027951b7b20fd17b15a1d6930cc2125b113e06/src/databound.coffee
98
100
Nedomas/databound:src/databound.coffee:10:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::take = (id) -> _.detect @records, (record) -> parseInt(record.id) == parseInt(id) ```
Databound.prototype.take = function(id) { return _.detect(this.records, function(record) { return parseInt(record.id) === parseInt(id); }); };
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
8c027951b7b20fd17b15a1d6930cc2125b113e06
452
https://github.com/Nedomas/databound/blob/8c027951b7b20fd17b15a1d6930cc2125b113e06/src/databound.coffee
98
100
Nedomas/databound:src/databound.coffee:10:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.take = function(id) { return _.detect(this.records, function(record) { return parseInt(record.id) === parseInt(id); }); }; ```
Databound::take = (id) -> _.detect @records, (record) -> parseInt(record.id) == parseInt(id)
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
8c027951b7b20fd17b15a1d6930cc2125b113e06
452
https://github.com/Nedomas/databound/blob/8c027951b7b20fd17b15a1d6930cc2125b113e06/src/databound.coffee
98
100
Nedomas/databound:src/databound.coffee:14:raw_corpus
raw_corpus
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.records = _.sortBy(JSON.parse(resp.scoped_records), 'id') if resp.id ...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
036f9f4b26077f20157c2bda1f7ad9ddf8d96345
452
https://github.com/Nedomas/databound/blob/036f9f4b26077f20157c2bda1f7ad9ddf8d96345/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.records = _.sortBy(JSON...
Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) { throw new Error('Error in the backend'); } ...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
036f9f4b26077f20157c2bda1f7ad9ddf8d96345
452
https://github.com/Nedomas/databound/blob/036f9f4b26077f20157c2bda1f7ad9ddf8d96345/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) ...
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.records = _.sortBy(JSON.parse(resp.scoped_records), 'id') if resp.id ...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
036f9f4b26077f20157c2bda1f7ad9ddf8d96345
452
https://github.com/Nedomas/databound/blob/036f9f4b26077f20157c2bda1f7ad9ddf8d96345/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:completion
completion
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success
_this.records = _.sortBy(JSON.parse(resp.scoped_records), 'id') if resp.id _this.promise _this.take(resp.id) else _this.promise resp.success
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
036f9f4b26077f20157c2bda1f7ad9ddf8d96345
452
https://github.com/Nedomas/databound/blob/036f9f4b26077f20157c2bda1f7ad9ddf8d96345/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:raw_corpus
raw_corpus
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.records = _.sortBy(resp.scoped_records, 'id') if resp.id _this.promis...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
7948ec80c94af98500d458de4741e4f89f28093d
452
https://github.com/Nedomas/databound/blob/7948ec80c94af98500d458de4741e4f89f28093d/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.records = _.sortBy(resp...
Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) { throw new Error('Error in the backend'); } ...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
7948ec80c94af98500d458de4741e4f89f28093d
452
https://github.com/Nedomas/databound/blob/7948ec80c94af98500d458de4741e4f89f28093d/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) ...
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.records = _.sortBy(resp.scoped_records, 'id') if resp.id _this.promis...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
7948ec80c94af98500d458de4741e4f89f28093d
452
https://github.com/Nedomas/databound/blob/7948ec80c94af98500d458de4741e4f89f28093d/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:completion
completion
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success
_this.records = _.sortBy(resp.scoped_records, 'id') if resp.id _this.promise _this.take(resp.id) else _this.promise resp.success
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
7948ec80c94af98500d458de4741e4f89f28093d
452
https://github.com/Nedomas/databound/blob/7948ec80c94af98500d458de4741e4f89f28093d/src/databound.coffee
123
135
Nedomas/databound:src/databound.coffee:14:raw_corpus
raw_corpus
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.where().then -> if resp.id _this.promise _this.take(resp.id) ...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
e55f7da19d9334ae05d79e3de34f36b8dc94bfc0
452
https://github.com/Nedomas/databound/blob/e55f7da19d9334ae05d79e3de34f36b8dc94bfc0/src/databound.coffee
123
134
Nedomas/databound:src/databound.coffee:14:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.where().then -> i...
Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) { throw new Error('Error in the backend'); } ...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
e55f7da19d9334ae05d79e3de34f36b8dc94bfc0
452
https://github.com/Nedomas/databound/blob/e55f7da19d9334ae05d79e3de34f36b8dc94bfc0/src/databound.coffee
123
134
Nedomas/databound:src/databound.coffee:14:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.requestAndRefresh = function(action, params) { var _this; _this = this; // backend responds with { success: true, id: record.id } return this.request(action, params).then(function(resp) { if (!(resp != null ? resp.success : void 0)) ...
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success _this.where().then -> if resp.id _this.promise _this.take(resp.id) ...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
e55f7da19d9334ae05d79e3de34f36b8dc94bfc0
452
https://github.com/Nedomas/databound/blob/e55f7da19d9334ae05d79e3de34f36b8dc94bfc0/src/databound.coffee
123
134
Nedomas/databound:src/databound.coffee:14:completion
completion
Databound::requestAndRefresh = (action, params) -> _this = @ # backend responds with { success: true, id: record.id } @request(action, params).then (resp) -> throw new Error 'Error in the backend' unless resp?.success
_this.where().then -> if resp.id _this.promise _this.take(resp.id) else _this.promise resp.success
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
e55f7da19d9334ae05d79e3de34f36b8dc94bfc0
452
https://github.com/Nedomas/databound/blob/e55f7da19d9334ae05d79e3de34f36b8dc94bfc0/src/databound.coffee
123
134
Nedomas/databound:src/databound.coffee:4:raw_corpus
raw_corpus
Databound::where = (params) -> _this = @ console.log('ddd') @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.properties = _.keys(records[0]) _this.records = _.sortBy(com...
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
748ec26728bc1719dacf25256e9c8409195bd153
452
https://github.com/Nedomas/databound/blob/748ec26728bc1719dacf25256e9c8409195bd153/src/databound.coffee
41
59
Nedomas/databound:src/databound.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Databound::where = (params) -> _this = @ console.log('ddd') @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.propert...
Databound.prototype.where = function(params) { var _this; _this = this; console.log('ddd'); return this.request('where', params).then(function(records) { var computed_records; records = records.concat(_this.seeds); computed_records = _.map(records, function(record) { return _this.withComputedP...
CoffeeScript
JavaScript
Nedomas/databound
src/databound.coffee
MIT
748ec26728bc1719dacf25256e9c8409195bd153
452
https://github.com/Nedomas/databound/blob/748ec26728bc1719dacf25256e9c8409195bd153/src/databound.coffee
41
59
Nedomas/databound:src/databound.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Databound.prototype.where = function(params) { var _this; _this = this; console.log('ddd'); return this.request('where', params).then(function(records) { var computed_records; records = records.concat(_this.seeds); computed_records = _.map(recor...
Databound::where = (params) -> _this = @ console.log('ddd') @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record ) _this.properties = _.keys(records[0]) _this.records = _.sortBy(com...
JavaScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
748ec26728bc1719dacf25256e9c8409195bd153
452
https://github.com/Nedomas/databound/blob/748ec26728bc1719dacf25256e9c8409195bd153/src/databound.coffee
41
59
Nedomas/databound:src/databound.coffee:4:completion
completion
Databound::where = (params) -> _this = @ console.log('ddd') @request('where', params).then (records) -> records = records.concat(_this.seeds) computed_records = _.map(records, (record) -> _this.withComputedProps record )
_this.properties = _.keys(records[0]) _this.records = _.sortBy(computed_records, 'id') _this.promise _this.records # Return a single record by ``id`` # # ```coffeescript # User.find(15).then (user) -> # alert "Yo, #{user.name}" # ```
CoffeeScript
CoffeeScript
Nedomas/databound
src/databound.coffee
MIT
748ec26728bc1719dacf25256e9c8409195bd153
452
https://github.com/Nedomas/databound/blob/748ec26728bc1719dacf25256e9c8409195bd153/src/databound.coffee
41
59
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:1:raw_corpus
raw_corpus
recorder = require 'actions-recorder' pathUtil = require 'router-view/lib/path' routes = require '../guest/routes' dispatcher = require '../dispatcher' socket = require '../network/socket' time = require '../util/time' userActions = require '../actions/user' guestActions = require './actions' routerActions = requir...
CoffeeScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
1
50
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript recorder = require 'actions-recorder' pathUtil = require 'router-view/lib/path' routes = require '../guest/routes' dispatcher = require '../dispatcher' socket = require '../network/socket' time = require '../util/time' userActions = require '../actions/user' g...
var deviceActions, dispatcher, fetchTopicData, fetchUserData, guestActions, joinRoom, loopStarted, loopState, pathUtil, recorder, routerActions, routes, sendState, socket, time, userActions; recorder = require('actions-recorder'); pathUtil = require('router-view/lib/path'); routes = require('../guest/routes'); disp...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
1
50
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var deviceActions, dispatcher, fetchTopicData, fetchUserData, guestActions, joinRoom, loopStarted, loopState, pathUtil, recorder, routerActions, routes, sendState, socket, time, userActions; recorder = require('actions-recorder'); pathUtil = require('router-view/...
recorder = require 'actions-recorder' pathUtil = require 'router-view/lib/path' routes = require '../guest/routes' dispatcher = require '../dispatcher' socket = require '../network/socket' time = require '../util/time' userActions = require '../actions/user' guestActions = require './actions' routerActions = requir...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
1
50
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:1:completion
completion
recorder = require 'actions-recorder' pathUtil = require 'router-view/lib/path' routes = require '../guest/routes' dispatcher = require '../dispatcher' socket = require '../network/socket' time = require '../util/time' userActions = require '../actions/user' guestActions = require './actions' routerActions = requir...
joinRoom = -> guestToken = location.pathname.replace('/rooms/', '') guestActions.roomJoin guestToken, (resp) -> socket.connect() deviceActions.markTeam resp._teamId loopState() routerActions.guestRoom resp._id (error) -> routerActions.guestDisabled() fetchTopicData = (guestTok...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
1
50
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:2:raw_corpus
raw_corpus
exports.initialize = -> oldAddress = "#{location.pathname}#{location.search}" defaultRouteInfo = pathUtil.getCurrentInfo routes, oldAddress switch defaultRouteInfo.get('name') when 'room' guestToken = defaultRouteInfo.getIn(['data', 'token']) fetchTopicData(guestToken) else routerActions...
CoffeeScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
51
66
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.initialize = -> oldAddress = "#{location.pathname}#{location.search}" defaultRouteInfo = pathUtil.getCurrentInfo routes, oldAddress switch defaultRouteInfo.get('name') when 'room' guestToken = defaultRouteInfo.getIn(['data', 'token']) ...
exports.initialize = function() { var defaultRouteInfo, guestToken, oldAddress; oldAddress = `${location.pathname}${location.search}`; defaultRouteInfo = pathUtil.getCurrentInfo(routes, oldAddress); switch (defaultRouteInfo.get('name')) { case 'room': guestToken = defaultRouteInfo.getIn(['data', 'toke...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
51
66
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.initialize = function() { var defaultRouteInfo, guestToken, oldAddress; oldAddress = `${location.pathname}${location.search}`; defaultRouteInfo = pathUtil.getCurrentInfo(routes, oldAddress); switch (defaultRouteInfo.get('name')) { case 'room': ...
exports.initialize = -> oldAddress = "#{location.pathname}#{location.search}" defaultRouteInfo = pathUtil.getCurrentInfo routes, oldAddress switch defaultRouteInfo.get('name') when 'room' guestToken = defaultRouteInfo.getIn(['data', 'token']) fetchTopicData(guestToken) else routerActions...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
51
66
jianliaoim/talk-os:talk-web/client/guest/handlers.coffee:2:completion
completion
exports.initialize = -> oldAddress = "#{location.pathname}#{location.search}" defaultRouteInfo = pathUtil.getCurrentInfo routes, oldAddress switch defaultRouteInfo.get('name') when 'room' guestToken = defaultRouteInfo.getIn(['data', 'token']) fetchTopicData(guestToken)
else routerActions.guest404() exports.registerUser = (user) -> dispatcher.handleViewAction type: 'user/me', data: user exports.joinTopic = -> joinRoom()
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/guest/handlers.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/guest/handlers.coffee
51
66
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:1:raw_corpus
raw_corpus
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Forwarder Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @confi...
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Forwarder Events', -> before (done) -> ...
var MeshbluConfig, MeshbluHTTP, MeshbluSocketIO, _, meshblu, path; _ = require('lodash'); path = require('path'); meshblu = require('meshblu'); MeshbluHTTP = require('meshblu-http'); MeshbluSocketIO = require('meshblu-socket.io'); MeshbluConfig = require('meshblu-config'); describe('SocketLogic Forwarder Events'...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var MeshbluConfig, MeshbluHTTP, MeshbluSocketIO, _, meshblu, path; _ = require('lodash'); path = require('path'); meshblu = require('meshblu'); MeshbluHTTP = require('meshblu-http'); MeshbluSocketIO = require('meshblu-socket.io'); MeshbluConfig = require('mes...
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Forwarder Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @confi...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:1:completion
completion
_ = require 'lodash' path = require 'path' meshblu = require 'meshblu' MeshbluHTTP = require 'meshblu-http' MeshbluSocketIO = require 'meshblu-socket.io' MeshbluConfig = require 'meshblu-config' describe 'SocketLogic Forwarder Events', -> before (done) -> filename = path.join __dirname, 'meshblu.json' @confi...
before (done) -> meshbluHTTP = new MeshbluHTTP _.pick @config, 'server', 'port' meshbluHTTP.register {}, (error, device) => return done error if error? @device = device @meshblu = new MeshbluSocketIO uuid: @device.uuid, token: @device.token, host: @config.host, protocol: @config.protocol, soc...
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
1
40
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:2:raw_corpus
raw_corpus
it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(_.omit @message.payload, '_timestamp').to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: {foo: 'bar'}} } describ...
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(_.omit @message.payload, '_timestamp').to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} ...
it('should send an "update" message', function() { expect(this.message.topic).to.deep.equal('update'); return expect(_.omit(this.message.payload, '_timestamp')).to.deep.equal({ fromUuid: this.device.uuid, request: { query: { uuid: this.device.uuid }, params: { $set: { ...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript it('should send an "update" message', function() { expect(this.message.topic).to.deep.equal('update'); return expect(_.omit(this.message.payload, '_timestamp')).to.deep.equal({ fromUuid: this.device.uuid, request: { query: { uuid: this.dev...
it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(_.omit @message.payload, '_timestamp').to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: {foo: 'bar'}} } describ...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:2:completion
completion
it 'should send an "update" message', -> expect(@message.topic).to.deep.equal 'update' expect(_.omit @message.payload, '_timestamp').to.deep.equal { fromUuid: @device.uuid request: query: {uuid: @device.uuid} params: {$set: {foo: 'bar'}} } describ...
request: query: {uuid: 'invalid-uuid'} params: {$set: {foo: 'bar'}} } describe 'EVENT identity', -> describe 'when called with a valid request', -> beforeEach (done) -> @meshblu.identity uuid: @device.uuid, token: @device.token, (error) => return done error...
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
42
86
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:3:raw_corpus
raw_corpus
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @event...
describe('when called with an invalid request', function() { beforeEach(function(done) { return this.meshblu.identity({ uuid: 'invalid-uuid', token: 'invalid-token' }, (error) => { if (error == null) { return done(new Error('expected identity to raise an error')); } retur...
CoffeeScript
JavaScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript describe('when called with an invalid request', function() { beforeEach(function(done) { return this.meshblu.identity({ uuid: 'invalid-uuid', token: 'invalid-token' }, (error) => { if (error == null) { return done(new Error('expe...
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
JavaScript
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
88
102
octoblu/meshblu:integration/socketIO-forwarder-spec.coffee:3:completion
completion
describe 'when called with an invalid request', -> beforeEach (done) -> @meshblu.identity uuid: 'invalid-uuid', token: 'invalid-token', (error) => return done new Error('expected identity to raise an error') unless error? @eventForwarder.once 'message', (@message) => done(...
it 'should send a "identity-error" message', -> expect(@message.topic).to.deep.equal 'identity-error' expect(_.omit @message.payload, '_timestamp').to.deep.equal { error: "Invalid Device UUID" request: uuid: 'invalid-uuid' }
CoffeeScript
CoffeeScript
octoblu/meshblu
integration/socketIO-forwarder-spec.coffee
MIT
6754e66b703b650d55f2452ba9ac6c8100e7cc57
815
https://github.com/octoblu/meshblu/blob/6754e66b703b650d55f2452ba9ac6c8100e7cc57/integration/socketIO-forwarder-spec.coffee
88
102
cdglabs/apparatus:src/View/R.coffee:1:raw_corpus
raw_corpus
module.exports = R = {} # Provide easy access to React.DOM for own key, value of React.DOM R[key] = value # Utility (from React.addons.classSet)
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
8
15
cdglabs/apparatus:src/View/R.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = R = {} # Provide easy access to React.DOM for own key, value of React.DOM R[key] = value # Utility (from React.addons.classSet) ```
var R, key, ref, value, hasProp = {}.hasOwnProperty; module.exports = R = {}; ref = React.DOM; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; R[key] = value; } // Utility (from React.addons.classSet)
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
8
15
cdglabs/apparatus:src/View/R.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var R, key, ref, value, hasProp = {}.hasOwnProperty; module.exports = R = {}; ref = React.DOM; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; R[key] = value; } // Utility (from React.addons.classSet) ```
module.exports = R = {} # Provide easy access to React.DOM for own key, value of React.DOM R[key] = value # Utility (from React.addons.classSet)
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
8
15
cdglabs/apparatus:src/View/R.coffee:1:completion
completion
module.exports = R = {} # Provide easy access to React.DOM
for own key, value of React.DOM R[key] = value # Utility (from React.addons.classSet)
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
8
15
cdglabs/apparatus:src/View/R.coffee:2:raw_corpus
raw_corpus
R.cx = (classNames) -> Object.keys(classNames).filter((className) -> classNames[className]).join(" ") # AnnotateMixin is used to annotate the created DOM Node with some extra # information in an "expando" property called annotation. This is often useful # when coordinating interactions with other Components. When us...
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
16
33
cdglabs/apparatus:src/View/R.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R.cx = (classNames) -> Object.keys(classNames).filter((className) -> classNames[className]).join(" ") # AnnotateMixin is used to annotate the created DOM Node with some extra # information in an "expando" property called annotation. This is often useful # when...
R.cx = function(classNames) { return Object.keys(classNames).filter(function(className) { return classNames[className]; }).join(" "); }; // AnnotateMixin is used to annotate the created DOM Node with some extra // information in an "expando" property called annotation. This is often useful // when coordinating...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
16
33
cdglabs/apparatus:src/View/R.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript R.cx = function(classNames) { return Object.keys(classNames).filter(function(className) { return classNames[className]; }).join(" "); }; // AnnotateMixin is used to annotate the created DOM Node with some extra // information in an "expando" property calle...
R.cx = (classNames) -> Object.keys(classNames).filter((className) -> classNames[className]).join(" ") # AnnotateMixin is used to annotate the created DOM Node with some extra # information in an "expando" property called annotation. This is often useful # when coordinating interactions with other Components. When us...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
16
33
cdglabs/apparatus:src/View/R.coffee:2:completion
completion
R.cx = (classNames) -> Object.keys(classNames).filter((className) -> classNames[className]).join(" ") # AnnotateMixin is used to annotate the created DOM Node with some extra # information in an "expando" property called annotation. This is often useful # when coordinating interactions with other Components. When us...
componentDidUpdate: -> @_annotateDOMNode() componentWillUnmount: -> @_clearAnnotation() _annotateDOMNode: -> el = ReactDOM.findDOMNode(@) el.annotation = @annotation() _clearAnnotation: -> el = ReactDOM.findDOMNode(@) delete el.annotation }
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
16
33
cdglabs/apparatus:src/View/R.coffee:3:raw_corpus
raw_corpus
R.create = (name, spec) -> # Component.displayName is used by React in its debugging messages. spec.displayName = name for typesProperty in ["propTypes", "childContextTypes", "contextTypes"] if spec[typesProperty] spec[typesProperty] = desugarPropTypes(spec[typesProperty]) component = React.createCl...
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
36
49
cdglabs/apparatus:src/View/R.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript R.create = (name, spec) -> # Component.displayName is used by React in its debugging messages. spec.displayName = name for typesProperty in ["propTypes", "childContextTypes", "contextTypes"] if spec[typesProperty] spec[typesProperty] = desugarPro...
R.create = function(name, spec) { var component, i, len, ref, typesProperty; // Component.displayName is used by React in its debugging messages. spec.displayName = name; ref = ["propTypes", "childContextTypes", "contextTypes"]; for (i = 0, len = ref.length; i < len; i++) { typesProperty = ref[i]; if ...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
36
49
cdglabs/apparatus:src/View/R.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript R.create = function(name, spec) { var component, i, len, ref, typesProperty; // Component.displayName is used by React in its debugging messages. spec.displayName = name; ref = ["propTypes", "childContextTypes", "contextTypes"]; for (i = 0, len = ref.leng...
R.create = (name, spec) -> # Component.displayName is used by React in its debugging messages. spec.displayName = name for typesProperty in ["propTypes", "childContextTypes", "contextTypes"] if spec[typesProperty] spec[typesProperty] = desugarPropTypes(spec[typesProperty]) component = React.createCl...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
36
49
cdglabs/apparatus:src/View/R.coffee:3:completion
completion
R.create = (name, spec) -> # Component.displayName is used by React in its debugging messages. spec.displayName = name for typesProperty in ["propTypes", "childContextTypes", "contextTypes"] if spec[typesProperty] spec[typesProperty] = desugarPropTypes(spec[typesProperty])
component = React.createClass(spec) R[name] = React.createFactory(component) R.render = ReactDOM.render R.findDOMNode = ReactDOM.findDOMNode
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
36
49
cdglabs/apparatus:src/View/R.coffee:5:raw_corpus
raw_corpus
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propT...
var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { return React.PropTypes.bool.isRequired; } else if...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { ...
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:completion
completion
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
R.DragManager = require "./Manager/DragManager" R.HoverManager = require "./Manager/HoverManager" require "./Generic/EditableText" require "./Generic/HTMLCanvas" require "./EditorLoader" require "./Editor" require "./Menubar" require "./CreatePanel" require "./ApparatusCanvas" require "./RightPanel" require "./Outline...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
107e0c2db5a0adf0f1c3b49f16f7625cff4e523b
1,052
https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:raw_corpus
raw_corpus
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
6468bc5630827b0673f41ad19edb883b1dfb1530
1,052
https://github.com/cdglabs/apparatus/blob/6468bc5630827b0673f41ad19edb883b1dfb1530/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propT...
var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { return React.PropTypes.bool.isRequired; } else if...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
6468bc5630827b0673f41ad19edb883b1dfb1530
1,052
https://github.com/cdglabs/apparatus/blob/6468bc5630827b0673f41ad19edb883b1dfb1530/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { ...
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
6468bc5630827b0673f41ad19edb883b1dfb1530
1,052
https://github.com/cdglabs/apparatus/blob/6468bc5630827b0673f41ad19edb883b1dfb1530/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:completion
completion
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
R.DragManager = require "./Manager/DragManager" R.HoverManager = require "./Manager/HoverManager" require "./Generic/EditableText" require "./Generic/HTMLCanvas" require "./Editor" require "./Menubar" require "./CreatePanel" require "./ApparatusCanvas" require "./RightPanel" require "./Outline" require "./Inspector" r...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
6468bc5630827b0673f41ad19edb883b1dfb1530
1,052
https://github.com/cdglabs/apparatus/blob/6468bc5630827b0673f41ad19edb883b1dfb1530/src/View/R.coffee
55
104
cdglabs/apparatus:src/View/R.coffee:5:raw_corpus
raw_corpus
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
666399f42bd64a6c01357fe7e536fb0e8b85d874
1,052
https://github.com/cdglabs/apparatus/blob/666399f42bd64a6c01357fe7e536fb0e8b85d874/src/View/R.coffee
55
102
cdglabs/apparatus:src/View/R.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propT...
var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { return React.PropTypes.bool.isRequired; } else if...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
666399f42bd64a6c01357fe7e536fb0e8b85d874
1,052
https://github.com/cdglabs/apparatus/blob/666399f42bd64a6c01357fe7e536fb0e8b85d874/src/View/R.coffee
55
102
cdglabs/apparatus:src/View/R.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { ...
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
JavaScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
666399f42bd64a6c01357fe7e536fb0e8b85d874
1,052
https://github.com/cdglabs/apparatus/blob/666399f42bd64a6c01357fe7e536fb0e8b85d874/src/View/R.coffee
55
102
cdglabs/apparatus:src/View/R.coffee:5:completion
completion
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
R.DragManager = require "./Manager/DragManager" R.HoverManager = require "./Manager/HoverManager" require "./Generic/EditableText" require "./Generic/HTMLCanvas" require "./Editor" require "./Menubar" require "./CreatePanel" require "./ApparatusCanvas" require "./RightPanel" require "./Outline" require "./Inspector" r...
CoffeeScript
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
666399f42bd64a6c01357fe7e536fb0e8b85d874
1,052
https://github.com/cdglabs/apparatus/blob/666399f42bd64a6c01357fe7e536fb0e8b85d874/src/View/R.coffee
55
102
cdglabs/apparatus:src/View/R.coffee:5:raw_corpus
raw_corpus
desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propType == Function return React.PropTypes.func.isRequire...
CoffeeScript
cdglabs/apparatus
src/View/R.coffee
MIT
c4f8051fc1dce8c7050fdabb8c782a6a0122071f
1,052
https://github.com/cdglabs/apparatus/blob/c4f8051fc1dce8c7050fdabb8c782a6a0122071f/src/View/R.coffee
55
101
cdglabs/apparatus:src/View/R.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript desugarPropType = (propType) -> if propType == Number return React.PropTypes.number.isRequired else if propType == String return React.PropTypes.string.isRequired else if propType == Boolean return React.PropTypes.bool.isRequired else if propT...
var Dropzone, desugarPropType; desugarPropType = function(propType) { if (propType === Number) { return React.PropTypes.number.isRequired; } else if (propType === String) { return React.PropTypes.string.isRequired; } else if (propType === Boolean) { return React.PropTypes.bool.isRequired; } else if...
CoffeeScript
JavaScript
cdglabs/apparatus
src/View/R.coffee
MIT
c4f8051fc1dce8c7050fdabb8c782a6a0122071f
1,052
https://github.com/cdglabs/apparatus/blob/c4f8051fc1dce8c7050fdabb8c782a6a0122071f/src/View/R.coffee
55
101