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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# TODO make it server side so filtering can scale
filterCollections = (query, collections) ->
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> @collect... | // TODO make it server side so filtering can scale
var filterCollections;
filterCollections = function(query, collections) {
if (query) {
return _.filter(collections, function(c) {
return c.name.indexOf(query) > -1;
});
} else {
return collections;
}
};
Template._houston_db_view.helpers({
co... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 581357048f3577f0487ed598e26eaf063c813183 | 802 | https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/db_view.coffee | 1 | 23 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// TODO make it server side so filtering can scale
var filterCollections;
filterCollections = function(query, collections) {
if (query) {
return _.filter(collections, function(c) {
return c.name.indexOf(query) > -1;
});
} else {
return collec... | # TODO make it server side so filtering can scale
filterCollections = (query, collections) ->
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> @collections
filtered_collections: ->
filterCollections(Hou... | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 581357048f3577f0487ed598e26eaf063c813183 | 802 | https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/db_view.coffee | 1 | 23 |
gterrono/houston:client/db_view.coffee:1:completion | completion | # TODO make it server side so filtering can scale
filterCollections = (query, collections) ->
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> @collections | filtered_collections: ->
filterCollections(Houston._session('search'), @collections.find().fetch())
Template._houston_db_view.events
# trigger meteor session invalidation, definitely a hack
"click #refresh": -> window.location.reload()
'keyup .houston-column-filter': (e) ->
Houston._session 'search', $("... | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 581357048f3577f0487ed598e26eaf063c813183 | 802 | https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/db_view.coffee | 1 | 23 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | # TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> Houston._session('collections'... | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | a32808b056df45e21fb59f9bce37162f03d626b1 | 802 | https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/db_view.coffee | 1 | 26 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view... | // TODO make it server side so filtering can scale
var filterCollections;
filterCollections = function(query) {
var collections;
collections = Houston._session('collections');
if (query) {
return _.filter(collections, function(c) {
return c.name.indexOf(query) > -1;
});
} else {
return collec... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | a32808b056df45e21fb59f9bce37162f03d626b1 | 802 | https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/db_view.coffee | 1 | 26 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// TODO make it server side so filtering can scale
var filterCollections;
filterCollections = function(query) {
var collections;
collections = Houston._session('collections');
if (query) {
return _.filter(collections, function(c) {
return c.name.in... | # TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> Houston._session('collections'... | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | a32808b056df45e21fb59f9bce37162f03d626b1 | 802 | https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/db_view.coffee | 1 | 26 |
gterrono/houston:client/db_view.coffee:1:completion | completion | # TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> Houston._session('collections'... | Template._houston_db_view.events
# trigger meteor session invalidation, definitely a hack
"click #refresh": -> window.location.reload()
'keyup .houston-column-filter': (e) ->
Houston._session 'search', $("#search").val()
Template._houston_db_view.rendered = ->
alert 'hey ther'
$("#search").val("")
Hous... | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | a32808b056df45e21fb59f9bce37162f03d626b1 | 802 | https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/db_view.coffee | 1 | 26 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | # TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> Houston._session('collections'... | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/client/db_view.coffee | 1 | 25 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view... | // TODO make it server side so filtering can scale
var filterCollections;
filterCollections = function(query) {
var collections;
collections = Houston._session('collections');
if (query) {
return _.filter(collections, function(c) {
return c.name.indexOf(query) > -1;
});
} else {
return collec... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/client/db_view.coffee | 1 | 25 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// TODO make it server side so filtering can scale
var filterCollections;
filterCollections = function(query) {
var collections;
collections = Houston._session('collections');
if (query) {
return _.filter(collections, function(c) {
return c.name.in... | # TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> Houston._session('collections'... | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/client/db_view.coffee | 1 | 25 |
gterrono/houston:client/db_view.coffee:1:completion | completion | # TODO make it server side so filtering can scale
filterCollections = (query) ->
collections = Houston._session('collections')
if query
_.filter(collections, (c) ->
(c.name).indexOf(query) > -1
)
else
collections
Template._houston_db_view.helpers
collections: -> Houston._session('collections'... | filtered_collections: -> filterCollections Houston._session('search')
Template._houston_db_view.events
# trigger meteor session invalidation, definitely a hack
"click #refresh": -> window.location.reload()
'keyup .houston-column-filter': (e) ->
Houston._session 'search', $("#search").val()
Template._houston... | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/client/db_view.coffee | 1 | 25 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.events
# trigger meteor session invalidation, definitely a hack
"click #refresh": -> window.location.reload()
Template._h... | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | ae5b414cda759a6315bee8b8d98f2f20aa389ed2 | 802 | https://github.com/gterrono/houston/blob/ae5b414cda759a6315bee8b8d98f2f20aa389ed2/client/db_view.coffee | 1 | 11 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.events
# trigger meteor session invalidation, definitely a hack
"... | Template._houston_db_view.helpers({
collections: function() {
return Houston._session('collections');
},
num_of_records: function() {
return Houston._collections.collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_view.events({
// trigger meteor session invalidation, ... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | ae5b414cda759a6315bee8b8d98f2f20aa389ed2 | 802 | https://github.com/gterrono/houston/blob/ae5b414cda759a6315bee8b8d98f2f20aa389ed2/client/db_view.coffee | 1 | 11 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template._houston_db_view.helpers({
collections: function() {
return Houston._session('collections');
},
num_of_records: function() {
return Houston._collections.collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_v... | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.events
# trigger meteor session invalidation, definitely a hack
"click #refresh": -> window.location.reload()
Template._h... | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | ae5b414cda759a6315bee8b8d98f2f20aa389ed2 | 802 | https://github.com/gterrono/houston/blob/ae5b414cda759a6315bee8b8d98f2f20aa389ed2/client/db_view.coffee | 1 | 11 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.events | # trigger meteor session invalidation, definitely a hack
"click #refresh": -> window.location.reload()
Template._houston_db_view.rendered = ->
Houston._session('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | ae5b414cda759a6315bee8b8d98f2f20aa389ed2 | 802 | https://github.com/gterrono/houston/blob/ae5b414cda759a6315bee8b8d98f2f20aa389ed2/client/db_view.coffee | 1 | 11 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Houston._session('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 446fa960c31d33c521b881308100a6ac27b904d0 | 802 | https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/db_view.coffee | 1 | 8 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Houston._session('field_selectors', {})
$(window).... | Template._houston_db_view.helpers({
collections: function() {
return Houston._session('collections');
},
num_of_records: function() {
return Houston._collections.collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_view.rendered = function() {
Houston._session('field_s... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 446fa960c31d33c521b881308100a6ac27b904d0 | 802 | https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template._houston_db_view.helpers({
collections: function() {
return Houston._session('collections');
},
num_of_records: function() {
return Houston._collections.collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_v... | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Houston._session('field_selectors', {})
$(window).unbind('scroll') | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 446fa960c31d33c521b881308100a6ac27b904d0 | 802 | https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.collections.findOne({name: @name}).count | Template._houston_db_view.rendered = ->
Houston._session('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 446fa960c31d33c521b881308100a6ac27b904d0 | 802 | https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Houston._session('top_selector', {})
Houston._session('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 16ea359dbf8dfec50191fb5cf8c98d6c81120457 | 802 | https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/db_view.coffee | 1 | 9 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Houston._session('top_selector', {})
Houston._session('field_s... | Template._houston_db_view.helpers({
collections: function() {
return Houston._session('collections');
},
num_of_records: function() {
return Houston._collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_view.rendered = function() {
Houston._session('top_selector', {});... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 16ea359dbf8dfec50191fb5cf8c98d6c81120457 | 802 | https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template._houston_db_view.helpers({
collections: function() {
return Houston._session('collections');
},
num_of_records: function() {
return Houston._collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_view.rendered... | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Houston._session('top_selector', {})
Houston._session('field_selectors', {})
$(window).unbind('scroll') | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 16ea359dbf8dfec50191fb5cf8c98d6c81120457 | 802 | https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template._houston_db_view.helpers
collections: -> Houston._session('collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count | Template._houston_db_view.rendered = ->
Houston._session('top_selector', {})
Houston._session('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 16ea359dbf8dfec50191fb5cf8c98d6c81120457 | 802 | https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | ba6c723092fb3f35eb69a4a33e76b399ef118dae | 802 | https://github.com/gterrono/houston/blob/ba6c723092fb3f35eb69a4a33e76b399ef118dae/client/db_view.coffee | 1 | 8 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('field_selectors', {})
$(window).unbind('scroll')
``` | Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return Collections.findOne({
name: this.name
}).count;
}
});
Template.db_view.rendered = function() {
Session.set('field_selectors', {});
return $(window).unbind('scroll... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | ba6c723092fb3f35eb69a4a33e76b399ef118dae | 802 | https://github.com/gterrono/houston/blob/ba6c723092fb3f35eb69a4a33e76b399ef118dae/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return Collections.findOne({
name: this.name
}).count;
}
});
Template.db_view.rendered = function() {
Session.set('f... | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('field_selectors', {})
$(window).unbind('scroll') | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | ba6c723092fb3f35eb69a4a33e76b399ef118dae | 802 | https://github.com/gterrono/houston/blob/ba6c723092fb3f35eb69a4a33e76b399ef118dae/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count | Template.db_view.rendered = ->
Session.set('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | ba6c723092fb3f35eb69a4a33e76b399ef118dae | 802 | https://github.com/gterrono/houston/blob/ba6c723092fb3f35eb69a4a33e76b399ef118dae/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template._houston_db_view.helpers
collections: -> Session.get('_houston_collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Session.set('_houston_top_selector', {})
Session.set('_houston_field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 93e06a251afa99843d47e26f6bfde1ba3c93c47e | 802 | https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/db_view.coffee | 1 | 9 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template._houston_db_view.helpers
collections: -> Session.get('_houston_collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Session.set('_houston_top_selector', {})
Session.set('_hou... | Template._houston_db_view.helpers({
collections: function() {
return Session.get('_houston_collections');
},
num_of_records: function() {
return Houston._collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_view.rendered = function() {
Session.set('_houston_top_selecto... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 93e06a251afa99843d47e26f6bfde1ba3c93c47e | 802 | https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template._houston_db_view.helpers({
collections: function() {
return Session.get('_houston_collections');
},
num_of_records: function() {
return Houston._collections.findOne({
name: this.name
}).count;
}
});
Template._houston_db_view.rend... | Template._houston_db_view.helpers
collections: -> Session.get('_houston_collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count
Template._houston_db_view.rendered = ->
Session.set('_houston_top_selector', {})
Session.set('_houston_field_selectors', {})
$(window).unbind('scroll') | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 93e06a251afa99843d47e26f6bfde1ba3c93c47e | 802 | https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template._houston_db_view.helpers
collections: -> Session.get('_houston_collections')
num_of_records: -> Houston._collections.findOne({name: @name}).count | Template._houston_db_view.rendered = ->
Session.set('_houston_top_selector', {})
Session.set('_houston_field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 93e06a251afa99843d47e26f6bfde1ba3c93c47e | 802 | https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 0191c5e36cb38096d9ebbc53ad07954c2dc1e77f | 802 | https://github.com/gterrono/houston/blob/0191c5e36cb38096d9ebbc53ad07954c2dc1e77f/client/db_view.coffee | 1 | 9 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
$(window).unbind('scroll'... | Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return Collections.findOne({
name: this.name
}).count;
}
});
Template.db_view.rendered = function() {
Session.set('top_selector', {});
Session.set('field_selectors', {})... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 0191c5e36cb38096d9ebbc53ad07954c2dc1e77f | 802 | https://github.com/gterrono/houston/blob/0191c5e36cb38096d9ebbc53ad07954c2dc1e77f/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return Collections.findOne({
name: this.name
}).count;
}
});
Template.db_view.rendered = function() {
Session.set('t... | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
$(window).unbind('scroll') | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 0191c5e36cb38096d9ebbc53ad07954c2dc1e77f | 802 | https://github.com/gterrono/houston/blob/0191c5e36cb38096d9ebbc53ad07954c2dc1e77f/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count | Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
$(window).unbind('scroll') | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 0191c5e36cb38096d9ebbc53ad07954c2dc1e77f | 802 | https://github.com/gterrono/houston/blob/0191c5e36cb38096d9ebbc53ad07954c2dc1e77f/client/db_view.coffee | 1 | 9 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 807768bc0f427d33bc2cad8771293fcfa4722c13 | 802 | https://github.com/gterrono/houston/blob/807768bc0f427d33bc2cad8771293fcfa4722c13/client/db_view.coffee | 1 | 8 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
``` | Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return Collections.findOne({
name: this.name
}).count;
}
});
Template.db_view.rendered = function() {
Session.set('top_selector', {});
return Session.set('field_selector... | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 807768bc0f427d33bc2cad8771293fcfa4722c13 | 802 | https://github.com/gterrono/houston/blob/807768bc0f427d33bc2cad8771293fcfa4722c13/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return Collections.findOne({
name: this.name
}).count;
}
});
Template.db_view.rendered = function() {
Session.set('t... | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 807768bc0f427d33bc2cad8771293fcfa4722c13 | 802 | https://github.com/gterrono/houston/blob/807768bc0f427d33bc2cad8771293fcfa4722c13/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> Collections.findOne({name: @name}).count | Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 807768bc0f427d33bc2cad8771293fcfa4722c13 | 802 | https://github.com/gterrono/houston/blob/807768bc0f427d33bc2cad8771293fcfa4722c13/client/db_view.coffee | 1 | 8 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> look_up_collection(@name).find().count()
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 15adc0fcce3896869e1fb729d42008b74a32e6b2 | 802 | https://github.com/gterrono/houston/blob/15adc0fcce3896869e1fb729d42008b74a32e6b2/client/db_view.coffee | 1 | 7 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> look_up_collection(@name).find().count()
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
``` | Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return look_up_collection(this.name).find().count();
}
});
Template.db_view.rendered = function() {
Session.set('top_selector', {});
return Session.set('field_selectors', {});
}; | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | 15adc0fcce3896869e1fb729d42008b74a32e6b2 | 802 | https://github.com/gterrono/houston/blob/15adc0fcce3896869e1fb729d42008b74a32e6b2/client/db_view.coffee | 1 | 7 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template.db_view.helpers({
collections: function() {
return Session.get('collections');
},
num_of_records: function() {
return look_up_collection(this.name).find().count();
}
});
Template.db_view.rendered = function() {
Session.set('top_selector'... | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> look_up_collection(@name).find().count()
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 15adc0fcce3896869e1fb729d42008b74a32e6b2 | 802 | https://github.com/gterrono/houston/blob/15adc0fcce3896869e1fb729d42008b74a32e6b2/client/db_view.coffee | 1 | 7 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template.db_view.helpers
collections: -> Session.get('collections')
num_of_records: -> look_up_collection(@name).find().count() | Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | 15adc0fcce3896869e1fb729d42008b74a32e6b2 | 802 | https://github.com/gterrono/houston/blob/15adc0fcce3896869e1fb729d42008b74a32e6b2/client/db_view.coffee | 1 | 7 |
gterrono/houston:client/db_view.coffee:1:raw_corpus | raw_corpus | Template.db_view.helpers
collections: -> Session.get('collections')
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | c9850c13ce13c620d454610ed082e55ddf0eca9c | 802 | https://github.com/gterrono/houston/blob/c9850c13ce13c620d454610ed082e55ddf0eca9c/client/db_view.coffee | 1 | 6 | ||
gterrono/houston:client/db_view.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Template.db_view.helpers
collections: -> Session.get('collections')
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {})
``` | Template.db_view.helpers({
collections: function() {
return Session.get('collections');
}
});
Template.db_view.rendered = function() {
Session.set('top_selector', {});
return Session.set('field_selectors', {});
}; | CoffeeScript | JavaScript | gterrono/houston | client/db_view.coffee | MIT | c9850c13ce13c620d454610ed082e55ddf0eca9c | 802 | https://github.com/gterrono/houston/blob/c9850c13ce13c620d454610ed082e55ddf0eca9c/client/db_view.coffee | 1 | 6 |
gterrono/houston:client/db_view.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Template.db_view.helpers({
collections: function() {
return Session.get('collections');
}
});
Template.db_view.rendered = function() {
Session.set('top_selector', {});
return Session.set('field_selectors', {});
};
``` | Template.db_view.helpers
collections: -> Session.get('collections')
Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | JavaScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | c9850c13ce13c620d454610ed082e55ddf0eca9c | 802 | https://github.com/gterrono/houston/blob/c9850c13ce13c620d454610ed082e55ddf0eca9c/client/db_view.coffee | 1 | 6 |
gterrono/houston:client/db_view.coffee:1:completion | completion | Template.db_view.helpers
collections: -> Session.get('collections') | Template.db_view.rendered = ->
Session.set('top_selector', {})
Session.set('field_selectors', {}) | CoffeeScript | CoffeeScript | gterrono/houston | client/db_view.coffee | MIT | c9850c13ce13c620d454610ed082e55ddf0eca9c | 802 | https://github.com/gterrono/houston/blob/c9850c13ce13c620d454610ed082e55ddf0eca9c/client/db_view.coffee | 1 | 6 |
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:1:raw_corpus | raw_corpus | class StoryMessageMailer extends BaseMailer
delay: 30 * 60 * 1000
template: 'story-message'
send: (_userId, _storyId, _teamId) ->
_storyId = _storyId._id if _storyId instanceof StoryModel
email = id: _userId + _storyId + _teamId
self = this
$preference = PreferenceModel.findOneAsync _id: _use... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 19 | 68 | ||
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class StoryMessageMailer extends BaseMailer
delay: 30 * 60 * 1000
template: 'story-message'
send: (_userId, _storyId, _teamId) ->
_storyId = _storyId._id if _storyId instanceof StoryModel
email = id: _userId + _storyId + _teamId
self = this
... | var StoryMessageMailer;
StoryMessageMailer = (function() {
class StoryMessageMailer extends BaseMailer {
send(_userId, _storyId, _teamId) {
var $notification, $preference, $story, $user, email, self;
if (_storyId instanceof StoryModel) {
_storyId = _storyId._id;
}
email = {
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 19 | 68 |
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var StoryMessageMailer;
StoryMessageMailer = (function() {
class StoryMessageMailer extends BaseMailer {
send(_userId, _storyId, _teamId) {
var $notification, $preference, $story, $user, email, self;
if (_storyId instanceof StoryModel) {
... | class StoryMessageMailer extends BaseMailer
delay: 30 * 60 * 1000
template: 'story-message'
send: (_userId, _storyId, _teamId) ->
_storyId = _storyId._id if _storyId instanceof StoryModel
email = id: _userId + _storyId + _teamId
self = this
$preference = PreferenceModel.findOneAsync _id: _use... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 19 | 68 |
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:1:completion | completion | class StoryMessageMailer extends BaseMailer
delay: 30 * 60 * 1000
template: 'story-message'
send: (_userId, _storyId, _teamId) ->
_storyId = _storyId._id if _storyId instanceof StoryModel
email = id: _userId + _storyId + _teamId
self = this
$preference = PreferenceModel.findOneAsync _id: _use... | type: 'story'
, 'unreadNum'
Promise.all [$preference, $story, $user, $notification]
.spread (preference, story, user, notification) ->
return if preference?.emailNotification is false
return unless story
return unless user?.isRobot or user?.email
return unless notification?.unreadN... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 19 | 68 |
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:2:raw_corpus | raw_corpus | limit: limit
_storyId: _storyId
MessageModel.findByOptionsAsync options
# Construct messages
.then (messages) ->
return unless messages?.length
messages.sort (x, y) -> if x._id > y._id then 1 else -1
messages = messages.map (message) ->
message.alert = i18n.replace messa... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 69 | 90 | ||
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
limit: limit
_storyId: _storyId
MessageModel.findByOptionsAsync options
# Construct messages
.then (messages) ->
return unless messages?.length
messages.sort (x, y) -> if x._id > y._id then 1 else -1
messages = messages.ma... | ({
limit: limit({
_storyId: _storyId
})
});
// Construct messages
MessageModel.findByOptionsAsync(options).then(function(messages) {
var ref, ref1;
if (!(messages != null ? messages.length : void 0)) {
return;
}
messages.sort(function(x, y) {
if (x._id > y._id) {
return 1;
} else {
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 69 | 90 |
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
limit: limit({
_storyId: _storyId
})
});
// Construct messages
MessageModel.findByOptionsAsync(options).then(function(messages) {
var ref, ref1;
if (!(messages != null ? messages.length : void 0)) {
return;
}
messages.sort(function(x, y) {
... | limit: limit
_storyId: _storyId
MessageModel.findByOptionsAsync options
# Construct messages
.then (messages) ->
return unless messages?.length
messages.sort (x, y) -> if x._id > y._id then 1 else -1
messages = messages.map (message) ->
message.alert = i18n.replace messa... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 69 | 90 |
jianliaoim/talk-os:talk-api2x/server/mailers/story-message.coffee:2:completion | completion | limit: limit
_storyId: _storyId
MessageModel.findByOptionsAsync options
# Construct messages
.then (messages) ->
return unless messages?.length
messages.sort (x, y) -> if x._id > y._id then 1 else -1
messages = messages.map (message) ->
message.alert = i18n.replace messa... | return message
email.messages = messages
email.clickUrl = util.buildStoryUrl _teamId, _storyId
email.subject = "[简聊] 来自 #{email.story?.title?[0..10] or ''} 的讨论"
self._sendByRender email
.catch (err) -> logger.warn err.stack
cancel: (_userId, _storyId, _teamId) ->
id = _userId + _stor... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/mailers/story-message.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/mailers/story-message.coffee | 69 | 90 |
js2coffee/js2coffee:lib/support/report_notes.coffee:1:raw_corpus | raw_corpus | ###
# Generates spec notes (special_cases.md), invoked via a Makefile
###
{eachGroup} = require('./specs_iterator')
eachGroup (group) ->
return if group.pending
specs = group.specs.filter (s) -> s.meta?.notes
return if specs.length is 0
console.log "## #{group.name}\n"
for spec in specs
console.log "#... | CoffeeScript | js2coffee/js2coffee | lib/support/report_notes.coffee | MIT | 47d3159aba94ffd4377138f7837717d8628eef9f | 2,082 | https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/report_notes.coffee | 1 | 18 | ||
js2coffee/js2coffee:lib/support/report_notes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Generates spec notes (special_cases.md), invoked via a Makefile
###
{eachGroup} = require('./specs_iterator')
eachGroup (group) ->
return if group.pending
specs = group.specs.filter (s) -> s.meta?.notes
return if specs.length is 0
console.log "##... | /*
* Generates spec notes (special_cases.md), invoked via a Makefile
*/
var eachGroup;
({eachGroup} = require('./specs_iterator'));
eachGroup(function(group) {
var i, len, results, spec, specs;
if (group.pending) {
return;
}
specs = group.specs.filter(function(s) {
var ref;
return (ref = s.meta)... | CoffeeScript | JavaScript | js2coffee/js2coffee | lib/support/report_notes.coffee | MIT | 47d3159aba94ffd4377138f7837717d8628eef9f | 2,082 | https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/report_notes.coffee | 1 | 18 |
js2coffee/js2coffee:lib/support/report_notes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Generates spec notes (special_cases.md), invoked via a Makefile
*/
var eachGroup;
({eachGroup} = require('./specs_iterator'));
eachGroup(function(group) {
var i, len, results, spec, specs;
if (group.pending) {
return;
}
specs = group.specs.filt... | ###
# Generates spec notes (special_cases.md), invoked via a Makefile
###
{eachGroup} = require('./specs_iterator')
eachGroup (group) ->
return if group.pending
specs = group.specs.filter (s) -> s.meta?.notes
return if specs.length is 0
console.log "## #{group.name}\n"
for spec in specs
console.log "#... | JavaScript | CoffeeScript | js2coffee/js2coffee | lib/support/report_notes.coffee | MIT | 47d3159aba94ffd4377138f7837717d8628eef9f | 2,082 | https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/report_notes.coffee | 1 | 18 |
js2coffee/js2coffee:lib/support/report_notes.coffee:1:completion | completion | ###
# Generates spec notes (special_cases.md), invoked via a Makefile
###
{eachGroup} = require('./specs_iterator')
eachGroup (group) ->
return if group.pending
specs = group.specs.filter (s) -> s.meta?.notes | return if specs.length is 0
console.log "## #{group.name}\n"
for spec in specs
console.log "### #{spec.name}\n"
console.log "#{spec.meta.notes}\n"
console.log "```js\n// Input:\n#{spec.input}```\n"
console.log "```coffee\n# Output:\n#{spec.output}```\n" | CoffeeScript | CoffeeScript | js2coffee/js2coffee | lib/support/report_notes.coffee | MIT | 47d3159aba94ffd4377138f7837717d8628eef9f | 2,082 | https://github.com/js2coffee/js2coffee/blob/47d3159aba94ffd4377138f7837717d8628eef9f/lib/support/report_notes.coffee | 1 | 18 |
dropbox/zxcvbn:src/time_estimates.coffee:1:raw_corpus | raw_corpus | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 10
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
cr... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 67c4ece9efc40c9d0a1d7d995b2b22a91be500c2 | 15,961 | https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/src/time_estimates.coffee | 1 | 50 | ||
dropbox/zxcvbn:src/time_estimates.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 10
offline_slow_hashing_1e4_per_second: guesses / 1e4
off... | var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throttling_10_per_second: guesses / 10,
offline_slow_h... | CoffeeScript | JavaScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 67c4ece9efc40c9d0a1d7d995b2b22a91be500c2 | 15,961 | https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throt... | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 10
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
cr... | JavaScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 67c4ece9efc40c9d0a1d7d995b2b22a91be500c2 | 15,961 | https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:completion | completion | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 10
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
cr... | else if guesses < 1e8 + DELTA
# modest protection from unthrottled online attacks: "somewhat guessable"
2
else if guesses < 1e10 + DELTA
# modest protection from offline attacks: "safely unguessable"
# assuming a salted, slow hash function like bcrypt, scrypt, PBKDF2, argon, etc
3
... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 67c4ece9efc40c9d0a1d7d995b2b22a91be500c2 | 15,961 | https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:2:raw_corpus | raw_corpus | [base, "#{base} minute"]
else if seconds < day
base = Math.round seconds / hour
[base, "#{base} hour"]
else if seconds < month
base = Math.round seconds / day
[base, "#{base} day"]
else if seconds < year
base = Math.round seconds / month
[base, "#{base} month"]
else i... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 67c4ece9efc40c9d0a1d7d995b2b22a91be500c2 | 15,961 | https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/src/time_estimates.coffee | 51 | 69 | ||
dropbox/zxcvbn:src/time_estimates.coffee:2:completion | completion | [base, "#{base} minute"]
else if seconds < day
base = Math.round seconds / hour
[base, "#{base} hour"]
else if seconds < month
base = Math.round seconds / day
[base, "#{base} day"]
else if seconds < year
base = Math.round seconds / month | [base, "#{base} month"]
else if seconds < century
base = Math.round seconds / year
[base, "#{base} year"]
else
[null, 'centuries']
display_str += 's' if display_num? and display_num != 1
display_str
module.exports = time_estimates | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 67c4ece9efc40c9d0a1d7d995b2b22a91be500c2 | 15,961 | https://github.com/dropbox/zxcvbn/blob/67c4ece9efc40c9d0a1d7d995b2b22a91be500c2/src/time_estimates.coffee | 51 | 69 |
dropbox/zxcvbn:src/time_estimates.coffee:1:raw_corpus | raw_corpus | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
c... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 9a82d2eb1f077bc50722107fc5f2c967561a49c0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/9a82d2eb1f077bc50722107fc5f2c967561a49c0/src/time_estimates.coffee | 1 | 50 | ||
dropbox/zxcvbn:src/time_estimates.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
of... | var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throttling_10_per_second: guesses / 1e2,
offline_slow_... | CoffeeScript | JavaScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 9a82d2eb1f077bc50722107fc5f2c967561a49c0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/9a82d2eb1f077bc50722107fc5f2c967561a49c0/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throt... | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
c... | JavaScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 9a82d2eb1f077bc50722107fc5f2c967561a49c0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/9a82d2eb1f077bc50722107fc5f2c967561a49c0/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:completion | completion | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
c... | else if guesses < 1e8 + DELTA
# modest protection from unthrottled online attacks: "somewhat guessable"
2
else if guesses < 1e10 + DELTA
# modest protection from offline attacks: "safely unguessable"
# assuming a salted, slow hash function like bcrypt, scrypt, PBKDF2, argon, etc
3
... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 9a82d2eb1f077bc50722107fc5f2c967561a49c0 | 15,961 | https://github.com/dropbox/zxcvbn/blob/9a82d2eb1f077bc50722107fc5f2c967561a49c0/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:raw_corpus | raw_corpus | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
c... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 0f1f706d17b2cf4184015a0e8a2213c706639939 | 15,961 | https://github.com/dropbox/zxcvbn/blob/0f1f706d17b2cf4184015a0e8a2213c706639939/src/time_estimates.coffee | 1 | 50 | ||
dropbox/zxcvbn:src/time_estimates.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
of... | var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throttling_10_per_second: guesses / 1e2,
offline_slow_... | CoffeeScript | JavaScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 0f1f706d17b2cf4184015a0e8a2213c706639939 | 15,961 | https://github.com/dropbox/zxcvbn/blob/0f1f706d17b2cf4184015a0e8a2213c706639939/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throt... | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
c... | JavaScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 0f1f706d17b2cf4184015a0e8a2213c706639939 | 15,961 | https://github.com/dropbox/zxcvbn/blob/0f1f706d17b2cf4184015a0e8a2213c706639939/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:completion | completion | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_slow_hashing_1e4_per_second: guesses / 1e4
offline_fast_hashing_1e10_per_second: guesses / 1e10
c... | else if guesses < 1e8 + DELTA
# modest protection from unthrottled online attacks: "somewhat guessable"
2
else if guesses < 1e10 + DELTA
# modest protection from offline attacks: "safely unguessable"
# assuming a salted, slow hash function like bcrypt, scrypt, PBKDF2, argon, etc
3
... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 0f1f706d17b2cf4184015a0e8a2213c706639939 | 15,961 | https://github.com/dropbox/zxcvbn/blob/0f1f706d17b2cf4184015a0e8a2213c706639939/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:2:raw_corpus | raw_corpus | else if seconds < day
base = Math.round seconds / hour
[base, "#{base} hour"]
else if seconds < month
base = Math.round seconds / day
[base, "#{base} day"]
else if seconds < year
base = Math.round seconds / month
[base, "#{base} month"]
else if seconds < century
bas... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 0f1f706d17b2cf4184015a0e8a2213c706639939 | 15,961 | https://github.com/dropbox/zxcvbn/blob/0f1f706d17b2cf4184015a0e8a2213c706639939/src/time_estimates.coffee | 51 | 68 | ||
dropbox/zxcvbn:src/time_estimates.coffee:2:completion | completion | else if seconds < day
base = Math.round seconds / hour
[base, "#{base} hour"]
else if seconds < month
base = Math.round seconds / day
[base, "#{base} day"]
else if seconds < year
base = Math.round seconds / month
[base, "#{base} month"] | else if seconds < century
base = Math.round seconds / year
[base, "#{base} year"]
else
[null, 'centuries']
display_str += 's' if display_num? and display_num != 1
display_str
module.exports = time_estimates | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | 0f1f706d17b2cf4184015a0e8a2213c706639939 | 15,961 | https://github.com/dropbox/zxcvbn/blob/0f1f706d17b2cf4184015a0e8a2213c706639939/src/time_estimates.coffee | 51 | 68 |
dropbox/zxcvbn:src/time_estimates.coffee:1:raw_corpus | raw_corpus | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_salted_slow_hashing_1e4_per_second: guesses / 1e4
offline_salted_fast_hashing_1e10_per_second: guesses... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | ef101b646f197b8353ed89780af84b724116d91c | 15,961 | https://github.com/dropbox/zxcvbn/blob/ef101b646f197b8353ed89780af84b724116d91c/src/time_estimates.coffee | 1 | 50 | ||
dropbox/zxcvbn:src/time_estimates.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_salted_slow_hashing_1e4_per_second: guesses / 1e4
... | var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throttling_10_per_second: guesses / 1e2,
offline_salte... | CoffeeScript | JavaScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | ef101b646f197b8353ed89780af84b724116d91c | 15,961 | https://github.com/dropbox/zxcvbn/blob/ef101b646f197b8353ed89780af84b724116d91c/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var time_estimates;
time_estimates = {
estimate_attack_times: function(guesses) {
var crack_times_display, crack_times_seconds, scenario, seconds;
crack_times_seconds = {
online_throttling_100_per_hour: guesses / (100 / 3600),
online_no_throt... | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_salted_slow_hashing_1e4_per_second: guesses / 1e4
offline_salted_fast_hashing_1e10_per_second: guesses... | JavaScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | ef101b646f197b8353ed89780af84b724116d91c | 15,961 | https://github.com/dropbox/zxcvbn/blob/ef101b646f197b8353ed89780af84b724116d91c/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:1:completion | completion | time_estimates =
estimate_attack_times: (guesses) ->
crack_times_seconds =
online_throttling_100_per_hour: guesses / (100 / 3600)
online_no_throttling_10_per_second: guesses / 1e2
offline_salted_slow_hashing_1e4_per_second: guesses / 1e4
offline_salted_fast_hashing_1e10_per_second: guesses... | else if guesses < 1e8 + DELTA
# modest protection from unthrottled online attacks: "somewhat guessable"
2
else if guesses < 1e10 + DELTA
# modest protection from offline attacks: "safely unguessable"
# assuming a salted, slow hash function like bcrypt, scrypt, PBKDF2, argon, etc
3
... | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | ef101b646f197b8353ed89780af84b724116d91c | 15,961 | https://github.com/dropbox/zxcvbn/blob/ef101b646f197b8353ed89780af84b724116d91c/src/time_estimates.coffee | 1 | 50 |
dropbox/zxcvbn:src/time_estimates.coffee:2:raw_corpus | raw_corpus | [base, "#{base} hour"]
else if seconds < month
base = Math.round seconds / day
[base, "#{base} day"]
else if seconds < year
base = Math.round seconds / month
[base, "#{base} month"]
else if seconds < century
base = Math.round seconds / year
[base, "#{base} year"]
else... | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | ef101b646f197b8353ed89780af84b724116d91c | 15,961 | https://github.com/dropbox/zxcvbn/blob/ef101b646f197b8353ed89780af84b724116d91c/src/time_estimates.coffee | 51 | 66 | ||
dropbox/zxcvbn:src/time_estimates.coffee:2:completion | completion | [base, "#{base} hour"]
else if seconds < month
base = Math.round seconds / day
[base, "#{base} day"]
else if seconds < year
base = Math.round seconds / month
[base, "#{base} month"]
else if seconds < century | base = Math.round seconds / year
[base, "#{base} year"]
else
[null, 'centuries']
display_str += 's' if display_num? and display_num != 1
display_str
module.exports = time_estimates | CoffeeScript | CoffeeScript | dropbox/zxcvbn | src/time_estimates.coffee | MIT | ef101b646f197b8353ed89780af84b724116d91c | 15,961 | https://github.com/dropbox/zxcvbn/blob/ef101b646f197b8353ed89780af84b724116d91c/src/time_estimates.coffee | 51 | 66 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:raw_corpus | raw_corpus | NodeType = require './NodeType'
XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @deb... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLRaw.coffee | 1 | 33 | ||
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
NodeType = require './NodeType'
XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if no... | var NodeType, XMLNode, XMLRaw;
NodeType = require('./NodeType');
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(parent, text) {
super(parent);
if (text == null) ... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLRaw.coffee | 1 | 33 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType, XMLNode, XMLRaw;
NodeType = require('./NodeType');
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(pa... | NodeType = require './NodeType'
XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @deb... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLRaw.coffee | 1 | 33 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:completion | completion | NodeType = require './NodeType'
XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @deb... | @type = NodeType.Raw
@value = @stringify.raw text
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# Converts the XML fragment to string
#
# `options.pretty` pretty prints the result
# `options.indent` indentation for pretty print
# `options.offset` how many indentatio... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLRaw.coffee | 1 | 33 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @deb... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLRaw.coffee | 1 | 33 | ||
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if no... | var NodeType, XMLNode, XMLRaw;
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(parent, text) {
super(parent);
if (text == null) ... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLRaw.coffee | 1 | 33 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType, XMLNode, XMLRaw;
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(pa... | XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @deb... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLRaw.coffee | 1 | 33 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:completion | completion | XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @deb... | @type = NodeType.Raw
@value = @stringify.raw text
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# Converts the XML fragment to string
#
# `options.pretty` pretty prints the result
# `options.indent` indentation for pretty print
# `options.offset` how many indentatio... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLRaw.coffee | 1 | 33 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @debugInfo()
@value = @stringif... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLRaw.coffee | 1 | 31 | ||
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "M... | var XMLNode, XMLRaw;
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(parent, text) {
super(parent);
if (text == null) {
throw new Error("Missing raw text. " ... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLRaw.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLNode, XMLRaw;
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(parent, text) {
super(parent);
if (text... | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @debugInfo()
@value = @stringif... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLRaw.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @debugInfo() | @value = @stringify.raw text
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# Converts the XML fragment to string
#
# `options.pretty` pretty prints the result
# `options.indent` indentation for pretty print
# `options.offset` how many indentations to add to every line f... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLRaw.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @debugInfo()
@value = @stringif... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLRaw.coffee | 1 | 31 | ||
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "M... | var XMLNode, XMLRaw;
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(parent, text) {
super(parent);
if (text == null) {
throw new Error("Missing raw text. " ... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLRaw.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLNode, XMLRaw;
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLRaw = class XMLRaw extends XMLNode {
// Initializes a new instance of `XMLRaw`
// `text` raw text
constructor(parent, text) {
super(parent);
if (text... | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @debugInfo()
@value = @stringif... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLRaw.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLRaw.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLRaw extends XMLNode
# Initializes a new instance of `XMLRaw`
#
# `text` raw text
constructor: (parent, text) ->
super parent
if not text?
throw new Error "Missing raw text. " + @debugInfo() | @value = @stringify.raw text
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# Converts the XML fragment to string
#
# `options.pretty` pretty prints the result
# `options.indent` indentation for pretty print
# `options.offset` how many indentations to add to every line f... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLRaw.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLRaw.coffee | 1 | 31 |
mojotech/pioneer:test/integration/widgets/div.coffee:1:raw_corpus | raw_corpus | module.exports = ->
this.Widgets = this.Widgets || {}
return this.Widgets.Div = this.Widget.extend
root: "#onSubmit"
getText: ->
@find().then (el) -> el.getText() | CoffeeScript | mojotech/pioneer | test/integration/widgets/div.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/widgets/div.coffee | 1 | 8 | ||
mojotech/pioneer:test/integration/widgets/div.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = ->
this.Widgets = this.Widgets || {}
return this.Widgets.Div = this.Widget.extend
root: "#onSubmit"
getText: ->
@find().then (el) -> el.getText()
``` | module.exports = function() {
this.Widgets = this.Widgets || {};
return this.Widgets.Div = this.Widget.extend({
root: "#onSubmit",
getText: function() {
return this.find().then(function(el) {
return el.getText();
});
}
});
}; | CoffeeScript | JavaScript | mojotech/pioneer | test/integration/widgets/div.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/widgets/div.coffee | 1 | 8 |
mojotech/pioneer:test/integration/widgets/div.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = function() {
this.Widgets = this.Widgets || {};
return this.Widgets.Div = this.Widget.extend({
root: "#onSubmit",
getText: function() {
return this.find().then(function(el) {
return el.getText();
});
}
});
};
`... | module.exports = ->
this.Widgets = this.Widgets || {}
return this.Widgets.Div = this.Widget.extend
root: "#onSubmit"
getText: ->
@find().then (el) -> el.getText() | JavaScript | CoffeeScript | mojotech/pioneer | test/integration/widgets/div.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/integration/widgets/div.coffee | 1 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.