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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Atraci/Atraci:coffee/_TrackSource.class.coffee:3:raw_corpus | raw_corpus | if track_hash not in tracks_hash
tracks.push
title: track['im:name'].label
artist: track['im:artist'].label
cover_url_medium: track['im:image'][1].label
cover_url_large: track['im:imag... | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | e089667bab6c51070baa53879d45f45d7dc5e3d8 | 800 | https://github.com/Atraci/Atraci/blob/e089667bab6c51070baa53879d45f45d7dc5e3d8/coffee/_TrackSource.class.coffee | 103 | 121 | ||
Atraci/Atraci:coffee/_TrackSource.class.coffee:3:completion | completion | if track_hash not in tracks_hash
tracks.push
title: track['im:name'].label
artist: track['im:artist'].label
cover_url_medium: track['im:image'][1].label
cover_url_large: track['im:imag... | @history: (success) ->
History.getTracks((tracks) ->
success? tracks
)
@playlist: (playlist, success) ->
Playlists.getTracksForPlaylist(playlist, ((tracks) ->
success? tracks
)) | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | e089667bab6c51070baa53879d45f45d7dc5e3d8 | 800 | https://github.com/Atraci/Atraci/blob/e089667bab6c51070baa53879d45f45d7dc5e3d8/coffee/_TrackSource.class.coffee | 103 | 121 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:2:raw_corpus | raw_corpus | data.results.trackmatches.track = [data.results.trackmatches.track]
$.each data.results.trackmatches.track, (i, track) ->
cover_url_medium = cover_url_large = 'images/cover_default_large.png'
if track.image
$.each track.imag... | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | b99a53dabc12408e56685ffc7d53cfdc14f902a7 | 800 | https://github.com/Atraci/Atraci/blob/b99a53dabc12408e56685ffc7d53cfdc14f902a7/coffee/_TrackSource.class.coffee | 53 | 102 | ||
Atraci/Atraci:coffee/_TrackSource.class.coffee:2:completion | completion | data.results.trackmatches.track = [data.results.trackmatches.track]
$.each data.results.trackmatches.track, (i, track) ->
cover_url_medium = cover_url_large = 'images/cover_default_large.png'
if track.image
$.each track.imag... | if track
trackNameExploded = track.title.split(" - ")
coverPhoto = track.artwork_url
coverPhoto = 'images/cover_default_large.png' if !track.artwork_url
console.log(trackNameExploded);
tracks.push
... | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | b99a53dabc12408e56685ffc7d53cfdc14f902a7 | 800 | https://github.com/Atraci/Atraci/blob/b99a53dabc12408e56685ffc7d53cfdc14f902a7/coffee/_TrackSource.class.coffee | 53 | 102 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:3:raw_corpus | raw_corpus | track_hash = track['im:artist'].label + '___' + track['im:name'].label
if track_hash not in tracks_hash
tracks.push
title: track['im:name'].label
artist: track['im:artist'].label
cover_url_med... | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | b99a53dabc12408e56685ffc7d53cfdc14f902a7 | 800 | https://github.com/Atraci/Atraci/blob/b99a53dabc12408e56685ffc7d53cfdc14f902a7/coffee/_TrackSource.class.coffee | 103 | 122 | ||
Atraci/Atraci:coffee/_TrackSource.class.coffee:3:completion | completion | track_hash = track['im:artist'].label + '___' + track['im:name'].label
if track_hash not in tracks_hash
tracks.push
title: track['im:name'].label
artist: track['im:artist'].label
cover_url_med... | @history: (success) ->
History.getTracks((tracks) ->
success? tracks
)
@playlist: (playlist, success) ->
Playlists.getTracksForPlaylist(playlist, ((tracks) ->
success? tracks
)) | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | b99a53dabc12408e56685ffc7d53cfdc14f902a7 | 800 | https://github.com/Atraci/Atraci/blob/b99a53dabc12408e56685ffc7d53cfdc14f902a7/coffee/_TrackSource.class.coffee | 103 | 122 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:1:raw_corpus | raw_corpus | class TrackSource
@search: (keywords, success) ->
tracks_all = {}
mashTracks = ->
tracks_all = tracks_all['itunes'].concat tracks_all['lastfm']
tracks_deduplicated = []
tracks_hash = []
$.each tracks_all, (i, track) ->
if track.artis... | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d2b0651c68741273add9091a6b0f392ddf7644df | 800 | https://github.com/Atraci/Atraci/blob/d2b0651c68741273add9091a6b0f392ddf7644df/coffee/_TrackSource.class.coffee | 3 | 52 | ||
Atraci/Atraci:coffee/_TrackSource.class.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class TrackSource
@search: (keywords, success) ->
tracks_all = {}
mashTracks = ->
tracks_all = tracks_all['itunes'].concat tracks_all['lastfm']
tracks_deduplicated = []
tracks_hash = []
$.each... | var TrackSource,
indexOf = [].indexOf;
TrackSource = class TrackSource {
static search(keywords, success) {
var mashTracks, tracks_all;
tracks_all = {};
mashTracks = function() {
var tracks_deduplicated, tracks_hash;
tracks_all = tracks_all['itunes'].concat(tracks_all['lastfm']);
trac... | CoffeeScript | JavaScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d2b0651c68741273add9091a6b0f392ddf7644df | 800 | https://github.com/Atraci/Atraci/blob/d2b0651c68741273add9091a6b0f392ddf7644df/coffee/_TrackSource.class.coffee | 3 | 52 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var TrackSource,
indexOf = [].indexOf;
TrackSource = class TrackSource {
static search(keywords, success) {
var mashTracks, tracks_all;
tracks_all = {};
mashTracks = function() {
var tracks_deduplicated, tracks_hash;
tracks_all = tracks... | class TrackSource
@search: (keywords, success) ->
tracks_all = {}
mashTracks = ->
tracks_all = tracks_all['itunes'].concat tracks_all['lastfm']
tracks_deduplicated = []
tracks_hash = []
$.each tracks_all, (i, track) ->
if track.artis... | JavaScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d2b0651c68741273add9091a6b0f392ddf7644df | 800 | https://github.com/Atraci/Atraci/blob/d2b0651c68741273add9091a6b0f392ddf7644df/coffee/_TrackSource.class.coffee | 3 | 52 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:1:completion | completion | class TrackSource
@search: (keywords, success) ->
tracks_all = {}
mashTracks = ->
tracks_all = tracks_all['itunes'].concat tracks_all['lastfm']
tracks_deduplicated = []
tracks_hash = []
$.each tracks_all, (i, track) ->
if track.artis... | try
$.each data.results, (i, track) ->
tracks.push
title: track.trackCensoredName
artist: track.artistName
cover_url_medium: track.artworkUrl60
cover_url_large: tra... | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d2b0651c68741273add9091a6b0f392ddf7644df | 800 | https://github.com/Atraci/Atraci/blob/d2b0651c68741273add9091a6b0f392ddf7644df/coffee/_TrackSource.class.coffee | 3 | 52 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:2:raw_corpus | raw_corpus | if image.size == 'medium' and image['#text'] != ''
cover_url_medium = image['#text']
else if image.size == 'large' and image['#text'] != ''
cover_url_large = image['#text']
tracks.push
... | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d2b0651c68741273add9091a6b0f392ddf7644df | 800 | https://github.com/Atraci/Atraci/blob/d2b0651c68741273add9091a6b0f392ddf7644df/coffee/_TrackSource.class.coffee | 53 | 95 | ||
Atraci/Atraci:coffee/_TrackSource.class.coffee:2:completion | completion | if image.size == 'medium' and image['#text'] != ''
cover_url_medium = image['#text']
else if image.size == 'large' and image['#text'] != ''
cover_url_large = image['#text']
tracks.push
... | tracks_hash = []
$.each data.feed.entry, (i, track) ->
track_hash = track['im:artist'].label + '___' + track['im:name'].label
if track_hash not in tracks_hash
tracks.push
title: track['im:name'].label
... | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d2b0651c68741273add9091a6b0f392ddf7644df | 800 | https://github.com/Atraci/Atraci/blob/d2b0651c68741273add9091a6b0f392ddf7644df/coffee/_TrackSource.class.coffee | 53 | 95 |
Atraci/Atraci:coffee/_TrackSource.class.coffee:2:raw_corpus | raw_corpus | if image.size == 'medium' and image['#text'] != ''
cover_url_medium = image['#text']
else if image.size == 'large' and image['#text'] != ''
cover_url_large = image['#text']
tracks.push
... | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d4b7f952575352efeff69f232ab345bac48fe586 | 800 | https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_TrackSource.class.coffee | 53 | 95 | ||
Atraci/Atraci:coffee/_TrackSource.class.coffee:2:completion | completion | if image.size == 'medium' and image['#text'] != ''
cover_url_medium = image['#text']
else if image.size == 'large' and image['#text'] != ''
cover_url_large = image['#text']
tracks.push
... | tracks_hash = []
$.each data.feed.entry, (i, track) ->
track_hash = track['im:artist'].label + '___' + track['im:name'].label
if track_hash not in tracks_hash
tracks.push
title: track['im:name'].label
... | CoffeeScript | CoffeeScript | Atraci/Atraci | coffee/_TrackSource.class.coffee | MIT | d4b7f952575352efeff69f232ab345bac48fe586 | 800 | https://github.com/Atraci/Atraci/blob/d4b7f952575352efeff69f232ab345bac48fe586/coffee/_TrackSource.class.coffee | 53 | 95 |
linemanjs/lineman:lib/extend.coffee:1:raw_corpus | raw_corpus | buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _.isFunction(config) then config(original) else config
extend(true, {}, original, userConfig) | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/extend.coffee | 1 | 8 | ||
linemanjs/lineman:lib/extend.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _.isFunction(config) then config(original) else conf... | var _, buildsAppConfig, extend;
buildsAppConfig = require('./builds-app-config');
_ = require('lodash');
extend = require('config-extend');
module.exports = function(key, config = {}) {
var original, userConfig;
original = buildsAppConfig.withPlugins()[key];
userConfig = _.isFunction(config) ? config(original... | CoffeeScript | JavaScript | linemanjs/lineman | lib/extend.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, buildsAppConfig, extend;
buildsAppConfig = require('./builds-app-config');
_ = require('lodash');
extend = require('config-extend');
module.exports = function(key, config = {}) {
var original, userConfig;
original = buildsAppConfig.withPlugins()[key]... | buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _.isFunction(config) then config(original) else config
extend(true, {}, original, userConfig) | JavaScript | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:completion | completion | buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend') | module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _.isFunction(config) then config(original) else config
extend(true, {}, original, userConfig) | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:raw_corpus | raw_corpus | buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else config
extend(true, {}, original, userConfig) | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/extend.coffee | 1 | 8 | ||
linemanjs/lineman:lib/extend.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else co... | var _, buildsAppConfig, extend;
buildsAppConfig = require('./builds-app-config');
_ = require('lodash');
extend = require('config-extend');
module.exports = function(key, config = {}) {
var original, userConfig;
original = buildsAppConfig.withPlugins()[key];
userConfig = _(config).isFunction() ? config(origin... | CoffeeScript | JavaScript | linemanjs/lineman | lib/extend.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, buildsAppConfig, extend;
buildsAppConfig = require('./builds-app-config');
_ = require('lodash');
extend = require('config-extend');
module.exports = function(key, config = {}) {
var original, userConfig;
original = buildsAppConfig.withPlugins()[key]... | buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else config
extend(true, {}, original, userConfig) | JavaScript | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:completion | completion | buildsAppConfig = require('./builds-app-config')
_ = require('lodash')
extend = require('config-extend') | module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else config
extend(true, {}, original, userConfig) | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:raw_corpus | raw_corpus | buildsAppConfig = require('./builds-app-config')
_ = require('grunt').util._
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else config
extend(true, {}, original, userConfig) | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | 6318ce2aa0b785f49abde268edc68cbac20e522c | 1,168 | https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/extend.coffee | 1 | 8 | ||
linemanjs/lineman:lib/extend.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
buildsAppConfig = require('./builds-app-config')
_ = require('grunt').util._
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) e... | var _, buildsAppConfig, extend;
buildsAppConfig = require('./builds-app-config');
_ = require('grunt').util._;
extend = require('config-extend');
module.exports = function(key, config = {}) {
var original, userConfig;
original = buildsAppConfig.withPlugins()[key];
userConfig = _(config).isFunction() ? config(... | CoffeeScript | JavaScript | linemanjs/lineman | lib/extend.coffee | MIT | 6318ce2aa0b785f49abde268edc68cbac20e522c | 1,168 | https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, buildsAppConfig, extend;
buildsAppConfig = require('./builds-app-config');
_ = require('grunt').util._;
extend = require('config-extend');
module.exports = function(key, config = {}) {
var original, userConfig;
original = buildsAppConfig.withPlugins(... | buildsAppConfig = require('./builds-app-config')
_ = require('grunt').util._
extend = require('config-extend')
module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else config
extend(true, {}, original, userConfig) | JavaScript | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | 6318ce2aa0b785f49abde268edc68cbac20e522c | 1,168 | https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/extend.coffee | 1 | 8 |
linemanjs/lineman:lib/extend.coffee:1:completion | completion | buildsAppConfig = require('./builds-app-config')
_ = require('grunt').util._
extend = require('config-extend') | module.exports = (key, config = {}) ->
original = buildsAppConfig.withPlugins()[key]
userConfig = if _(config).isFunction() then config(original) else config
extend(true, {}, original, userConfig) | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/extend.coffee | MIT | 6318ce2aa0b785f49abde268edc68cbac20e522c | 1,168 | https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/extend.coffee | 1 | 8 |
octoblu/meshblu:lib/getSubscriptions.coffee:1:raw_corpus | raw_corpus | SubscriptionGetter = require './SubscriptionGetter'
module.exports = (emitterUuid, type, callback) ->
subscriptionGetter = new SubscriptionGetter emitterUuid: emitterUuid, type: type
subscriptionGetter.get callback | CoffeeScript | octoblu/meshblu | lib/getSubscriptions.coffee | MIT | 34fcd9be8665d56fe7253a9824cea239276ea0fe | 815 | https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/getSubscriptions.coffee | 1 | 5 | ||
octoblu/meshblu:lib/getSubscriptions.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
SubscriptionGetter = require './SubscriptionGetter'
module.exports = (emitterUuid, type, callback) ->
subscriptionGetter = new SubscriptionGetter emitterUuid: emitterUuid, type: type
subscriptionGetter.get callback
``` | var SubscriptionGetter;
SubscriptionGetter = require('./SubscriptionGetter');
module.exports = function(emitterUuid, type, callback) {
var subscriptionGetter;
subscriptionGetter = new SubscriptionGetter({
emitterUuid: emitterUuid,
type: type
});
return subscriptionGetter.get(callback);
}; | CoffeeScript | JavaScript | octoblu/meshblu | lib/getSubscriptions.coffee | MIT | 34fcd9be8665d56fe7253a9824cea239276ea0fe | 815 | https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/getSubscriptions.coffee | 1 | 5 |
octoblu/meshblu:lib/getSubscriptions.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var SubscriptionGetter;
SubscriptionGetter = require('./SubscriptionGetter');
module.exports = function(emitterUuid, type, callback) {
var subscriptionGetter;
subscriptionGetter = new SubscriptionGetter({
emitterUuid: emitterUuid,
type: type
});
r... | SubscriptionGetter = require './SubscriptionGetter'
module.exports = (emitterUuid, type, callback) ->
subscriptionGetter = new SubscriptionGetter emitterUuid: emitterUuid, type: type
subscriptionGetter.get callback | JavaScript | CoffeeScript | octoblu/meshblu | lib/getSubscriptions.coffee | MIT | 34fcd9be8665d56fe7253a9824cea239276ea0fe | 815 | https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/getSubscriptions.coffee | 1 | 5 |
octoblu/meshblu:lib/getSubscriptions.coffee:1:completion | completion | SubscriptionGetter = require './SubscriptionGetter' | module.exports = (emitterUuid, type, callback) ->
subscriptionGetter = new SubscriptionGetter emitterUuid: emitterUuid, type: type
subscriptionGetter.get callback | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/getSubscriptions.coffee | MIT | 34fcd9be8665d56fe7253a9824cea239276ea0fe | 815 | https://github.com/octoblu/meshblu/blob/34fcd9be8665d56fe7253a9824cea239276ea0fe/lib/getSubscriptions.coffee | 1 | 5 |
lmaccherone/node-localstorage:test/same-directory-twice-test.coffee:1:raw_corpus | raw_corpus | {LocalStorage} = require('../')
tape = require('tape')
tape('same directory twice', (test) =>
localStorage1 = new LocalStorage('./scratch10')
localStorage2 = new LocalStorage('./scratch10')
localStorage1.setItem("key1", "value1")
test.equal(localStorage1.getItem('key1'), localStorage2.getItem('key1'))
loc... | CoffeeScript | lmaccherone/node-localstorage | test/same-directory-twice-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/same-directory-twice-test.coffee | 1 | 14 | ||
lmaccherone/node-localstorage:test/same-directory-twice-test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{LocalStorage} = require('../')
tape = require('tape')
tape('same directory twice', (test) =>
localStorage1 = new LocalStorage('./scratch10')
localStorage2 = new LocalStorage('./scratch10')
localStorage1.setItem("key1", "value1")
test.equal(localStorag... | var LocalStorage, tape;
({LocalStorage} = require('../'));
tape = require('tape');
tape('same directory twice', (test) => {
var localStorage1, localStorage2;
localStorage1 = new LocalStorage('./scratch10');
localStorage2 = new LocalStorage('./scratch10');
localStorage1.setItem("key1", "value1");
test.equal... | CoffeeScript | JavaScript | lmaccherone/node-localstorage | test/same-directory-twice-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/same-directory-twice-test.coffee | 1 | 14 |
lmaccherone/node-localstorage:test/same-directory-twice-test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var LocalStorage, tape;
({LocalStorage} = require('../'));
tape = require('tape');
tape('same directory twice', (test) => {
var localStorage1, localStorage2;
localStorage1 = new LocalStorage('./scratch10');
localStorage2 = new LocalStorage('./scratch10');
... | {LocalStorage} = require('../')
tape = require('tape')
tape('same directory twice', (test) =>
localStorage1 = new LocalStorage('./scratch10')
localStorage2 = new LocalStorage('./scratch10')
localStorage1.setItem("key1", "value1")
test.equal(localStorage1.getItem('key1'), localStorage2.getItem('key1'))
loc... | JavaScript | CoffeeScript | lmaccherone/node-localstorage | test/same-directory-twice-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/same-directory-twice-test.coffee | 1 | 14 |
lmaccherone/node-localstorage:test/same-directory-twice-test.coffee:1:completion | completion | {LocalStorage} = require('../')
tape = require('tape')
tape('same directory twice', (test) =>
localStorage1 = new LocalStorage('./scratch10')
localStorage2 = new LocalStorage('./scratch10') | localStorage1.setItem("key1", "value1")
test.equal(localStorage1.getItem('key1'), localStorage2.getItem('key1'))
localStorage1._deleteLocation()
test.end()
) | CoffeeScript | CoffeeScript | lmaccherone/node-localstorage | test/same-directory-twice-test.coffee | MIT | 23eff752dc603ad9559c50739589d3ec673c07f7 | 460 | https://github.com/lmaccherone/node-localstorage/blob/23eff752dc603ad9559c50739589d3ec673c07f7/test/same-directory-twice-test.coffee | 1 | 14 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | compile = (coffee_path, callback) ->
fs.readFile coffee_path, (err, data) ->
if err then callback(err)
else
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dir... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 36 | 47 | ||
mauricemach/zappa:bin/zappa.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
compile = (coffee_path, callback) ->
fs.readFile coffee_path, (err, data) ->
if err then callback(err)
else
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path... | var compile;
compile = function(coffee_path, callback) {
return fs.readFile(coffee_path, function(err, data) {
var dir, js, js_path;
if (err) {
return callback(err);
} else {
js = coffee.compile(String(data), {
bare: true
});
js = `require('zappa').run(function(){${js}});`... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 36 | 47 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var compile;
compile = function(coffee_path, callback) {
return fs.readFile(coffee_path, function(err, data) {
var dir, js, js_path;
if (err) {
return callback(err);
} else {
js = coffee.compile(String(data), {
bare: true
})... | compile = (coffee_path, callback) ->
fs.readFile coffee_path, (err, data) ->
if err then callback(err)
else
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dir... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 36 | 47 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | compile = (coffee_path, callback) ->
fs.readFile coffee_path, (err, data) ->
if err then callback(err)
else
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});" | js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dirname coffee_path
js_path = path.join dir, js_path
fs.writeFile js_path, js, (err) ->
if err then callback(err)
else callback() | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 36 | 47 |
mauricemach/zappa:bin/zappa.coffee:2:raw_corpus | raw_corpus | remove_watch_option = ->
i = argv.indexOf('-w')
argv.splice(i, 1) if i > -1
i = argv.indexOf('--watch')
argv.splice(i, 1) if i > -1 | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 49 | 53 | ||
mauricemach/zappa:bin/zappa.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
remove_watch_option = ->
i = argv.indexOf('-w')
argv.splice(i, 1) if i > -1
i = argv.indexOf('--watch')
argv.splice(i, 1) if i > -1
``` | var remove_watch_option;
remove_watch_option = function() {
var i;
i = argv.indexOf('-w');
if (i > -1) {
argv.splice(i, 1);
}
i = argv.indexOf('--watch');
if (i > -1) {
return argv.splice(i, 1);
}
}; | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 49 | 53 |
mauricemach/zappa:bin/zappa.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var remove_watch_option;
remove_watch_option = function() {
var i;
i = argv.indexOf('-w');
if (i > -1) {
argv.splice(i, 1);
}
i = argv.indexOf('--watch');
if (i > -1) {
return argv.splice(i, 1);
}
};
``` | remove_watch_option = ->
i = argv.indexOf('-w')
argv.splice(i, 1) if i > -1
i = argv.indexOf('--watch')
argv.splice(i, 1) if i > -1 | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 49 | 53 |
mauricemach/zappa:bin/zappa.coffee:2:completion | completion | remove_watch_option = ->
i = argv.indexOf('-w') | argv.splice(i, 1) if i > -1
i = argv.indexOf('--watch')
argv.splice(i, 1) if i > -1 | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 49 | 53 |
mauricemach/zappa:bin/zappa.coffee:3:raw_corpus | raw_corpus | spawn_child = ->
child = spawn 'zappa', argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file), included) unless included in watching
watching.pu... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 55 | 64 | ||
mauricemach/zappa:bin/zappa.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
spawn_child = ->
child = spawn 'zappa', argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file)... | var spawn_child,
indexOf = [].indexOf;
spawn_child = function() {
var child;
child = spawn('zappa', argv);
child.stdout.on('data', function(data) {
var included;
data = String(data);
if (data.match(/^Included file \".*\.coffee\"/)) {
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 55 | 64 |
mauricemach/zappa:bin/zappa.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var spawn_child,
indexOf = [].indexOf;
spawn_child = function() {
var child;
child = spawn('zappa', argv);
child.stdout.on('data', function(data) {
var included;
data = String(data);
if (data.match(/^Included file \".*\.coffee\"/)) {
incl... | spawn_child = ->
child = spawn 'zappa', argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file), included) unless included in watching
watching.pu... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 55 | 64 |
mauricemach/zappa:bin/zappa.coffee:3:completion | completion | spawn_child = ->
child = spawn 'zappa', argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/ | included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file), included) unless included in watching
watching.push included
puts data
child.stderr.on 'data', (data) -> puts String(data) | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 55 | 64 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 66 | 105 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 66 | 105 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 66 | 105 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | process.exit()
else
file = args[0]
path.exists file, (exists) ->
if not exists
puts "\"#{file}\" not found."
process.exit -1
if options.compile
compile file, (err) ->
if err then puts err; process.exit -1
else process.exit()
else
if options.watch
remove_... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf9cd29be5266f30eac5da710a9baab17078ee96 | 943 | https://github.com/mauricemach/zappa/blob/bf9cd29be5266f30eac5da710a9baab17078ee96/bin/zappa.coffee | 66 | 105 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dirname coffee_path
js_path = path.join dir, js_path
... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 36 | 43 | ||
mauricemach/zappa:bin/zappa.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dir... | var compile;
compile = function(coffee_path) {
return fs.readFile(coffee_path, function(err, data) {
var dir, js, js_path;
js = coffee.compile(String(data), {
bare: true
});
js = `require('zappa').run(function(){${js}});`;
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 36 | 43 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var compile;
compile = function(coffee_path) {
return fs.readFile(coffee_path, function(err, data) {
var dir, js, js_path;
js = coffee.compile(String(data), {
bare: true
});
js = `require('zappa').run(function(){${js}});`;
js_path = pat... | compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dirname coffee_path
js_path = path.join dir, js_path
... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 36 | 43 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});" | js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dirname coffee_path
js_path = path.join dir, js_path
fs.writeFile js_path, js | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 36 | 43 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 62 | 99 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 62 | 99 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 62 | 99 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | puts zappa.version if options.version
process.exit()
else
file = args[0]
path.exists file, (exists) ->
if not exists
puts "\"#{file}\" not found."
process.exit -1
if options.compile
compile file
else
if options.watch
remove_watch_option()
spawn_child()
... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 83f9e729d3d52d057afbf0eeb759a39fe28af2b7 | 943 | https://github.com/mauricemach/zappa/blob/83f9e729d3d52d057afbf0eeb759a39fe28af2b7/bin/zappa.coffee | 62 | 99 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
# Get the... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | e481dbf11df9f16c37cd3e45662dad8878ac226c | 943 | https://github.com/mauricemach/zappa/blob/e481dbf11df9f16c37cd3e45662dad8878ac226c/bin/zappa.coffee | 56 | 100 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | e481dbf11df9f16c37cd3e45662dad8878ac226c | 943 | https://github.com/mauricemach/zappa/blob/e481dbf11df9f16c37cd3e45662dad8878ac226c/bin/zappa.coffee | 56 | 100 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
# Get the... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | e481dbf11df9f16c37cd3e45662dad8878ac226c | 943 | https://github.com/mauricemach/zappa/blob/e481dbf11df9f16c37cd3e45662dad8878ac226c/bin/zappa.coffee | 56 | 100 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
# Get the... | options.port[i] = parseInt(p)
if args.length is 0
puts parser.help() if options.help or argv.length is 0
puts zappa.version if options.version
process.exit()
else
file = args[0]
path.exists file, (exists) ->
if not exists
puts "\"#{file}\" not found."
process.exit -1
if options.compile
... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | e481dbf11df9f16c37cd3e45662dad8878ac226c | 943 | https://github.com/mauricemach/zappa/blob/e481dbf11df9f16c37cd3e45662dad8878ac226c/bin/zappa.coffee | 56 | 100 |
mauricemach/zappa:bin/zappa.coffee:2:raw_corpus | raw_corpus | remove_watch_option = ->
i = process.argv.indexOf('-w')
process.argv.splice(i, 1) if i > -1
i = process.argv.indexOf('--watch')
process.argv.splice(i, 1) if i > -1 | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 38 | 42 | ||
mauricemach/zappa:bin/zappa.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
remove_watch_option = ->
i = process.argv.indexOf('-w')
process.argv.splice(i, 1) if i > -1
i = process.argv.indexOf('--watch')
process.argv.splice(i, 1) if i > -1
``` | var remove_watch_option;
remove_watch_option = function() {
var i;
i = process.argv.indexOf('-w');
if (i > -1) {
process.argv.splice(i, 1);
}
i = process.argv.indexOf('--watch');
if (i > -1) {
return process.argv.splice(i, 1);
}
}; | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 38 | 42 |
mauricemach/zappa:bin/zappa.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var remove_watch_option;
remove_watch_option = function() {
var i;
i = process.argv.indexOf('-w');
if (i > -1) {
process.argv.splice(i, 1);
}
i = process.argv.indexOf('--watch');
if (i > -1) {
return process.argv.splice(i, 1);
}
};
``` | remove_watch_option = ->
i = process.argv.indexOf('-w')
process.argv.splice(i, 1) if i > -1
i = process.argv.indexOf('--watch')
process.argv.splice(i, 1) if i > -1 | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 38 | 42 |
mauricemach/zappa:bin/zappa.coffee:2:completion | completion | remove_watch_option = ->
i = process.argv.indexOf('-w') | process.argv.splice(i, 1) if i > -1
i = process.argv.indexOf('--watch')
process.argv.splice(i, 1) if i > -1 | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 38 | 42 |
mauricemach/zappa:bin/zappa.coffee:3:raw_corpus | raw_corpus | spawn_child = ->
child = spawn 'zappa', process.argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file), included) unless included in watching
wat... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 44 | 53 | ||
mauricemach/zappa:bin/zappa.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
spawn_child = ->
child = spawn 'zappa', process.argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirna... | var spawn_child,
indexOf = [].indexOf;
spawn_child = function() {
var child;
child = spawn('zappa', process.argv);
child.stdout.on('data', function(data) {
var included;
data = String(data);
if (data.match(/^Included file \".*\.coffee\"/)) {
included = data.match(/^Included file \"(.*\.coffee... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 44 | 53 |
mauricemach/zappa:bin/zappa.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var spawn_child,
indexOf = [].indexOf;
spawn_child = function() {
var child;
child = spawn('zappa', process.argv);
child.stdout.on('data', function(data) {
var included;
data = String(data);
if (data.match(/^Included file \".*\.coffee\"/)) {
... | spawn_child = ->
child = spawn 'zappa', process.argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/
included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file), included) unless included in watching
wat... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 44 | 53 |
mauricemach/zappa:bin/zappa.coffee:3:completion | completion | spawn_child = ->
child = spawn 'zappa', process.argv
child.stdout.on 'data', (data) ->
data = String(data)
if data.match /^Included file \".*\.coffee\"/ | included = data.match(/^Included file \"(.*\.coffee)\"/)[1]
watch path.join(path.dirname(file), included) unless included in watching
watching.push included
puts data
child.stderr.on 'data', (data) -> puts String(data) | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 44 | 53 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 55 | 92 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 55 | 92 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 55 | 92 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | puts zappa.version if options.version
process.exit()
else
file = args[0]
path.exists file, (exists) ->
if not exists
puts "\"#{file}\" not found."
process.exit -1
if options.compile
compile file
else
if options.watch
remove_watch_option()
spawn_child()
... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a | 943 | https://github.com/mauricemach/zappa/blob/2f11ca13b3cac0ceea1c7f43127bbc2e0f56cf4a/bin/zappa.coffee | 55 | 92 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b | 943 | https://github.com/mauricemach/zappa/blob/bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b/bin/zappa.coffee | 54 | 90 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b | 943 | https://github.com/mauricemach/zappa/blob/bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b/bin/zappa.coffee | 54 | 90 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b | 943 | https://github.com/mauricemach/zappa/blob/bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b/bin/zappa.coffee | 54 | 90 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | puts zappa.version if options.version
if args.length > 0
file = args[0]
path.exists file, (exists) ->
if !exists
console.log "\"#{file}\" not found."
process.exit -1
if options.compile
compile file
else
if options.watch
remove_watch_option()
spawn_child()
... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b | 943 | https://github.com/mauricemach/zappa/blob/bf3a7ecd489ec12ba4e6a2d1256e3af2180f696b/bin/zappa.coffee | 54 | 90 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 7da08a44edcd30859cbe4ddb5f31e2efd9c35929 | 943 | https://github.com/mauricemach/zappa/blob/7da08a44edcd30859cbe4ddb5f31e2efd9c35929/bin/zappa.coffee | 54 | 90 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 7da08a44edcd30859cbe4ddb5f31e2efd9c35929 | 943 | https://github.com/mauricemach/zappa/blob/7da08a44edcd30859cbe4ddb5f31e2efd9c35929/bin/zappa.coffee | 54 | 90 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 7da08a44edcd30859cbe4ddb5f31e2efd9c35929 | 943 | https://github.com/mauricemach/zappa/blob/7da08a44edcd30859cbe4ddb5f31e2efd9c35929/bin/zappa.coffee | 54 | 90 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | puts zappa.version if options.version
if args.length > 0
file = args[0]
path.exists file, (exists) ->
if !exists
console.log "#{file} not found."
process.exit -1
if options.compile
compile file
else
if options.watch
remove_watch_option()
spawn_child()
w... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 7da08a44edcd30859cbe4ddb5f31e2efd9c35929 | 943 | https://github.com/mauricemach/zappa/blob/7da08a44edcd30859cbe4ddb5f31e2efd9c35929/bin/zappa.coffee | 54 | 90 |
mauricemach/zappa:bin/zappa.coffee:4:raw_corpus | raw_corpus | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | e22edde3bb61874fa7ed08d5a32c91450c6b5691 | 943 | https://github.com/mauricemach/zappa/blob/e22edde3bb61874fa7ed08d5a32c91450c6b5691/bin/zappa.coffee | 54 | 83 | ||
mauricemach/zappa:bin/zappa.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_chi... | var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | e22edde3bb61874fa7ed08d5a32c91450c6b5691 | 943 | https://github.com/mauricemach/zappa/blob/e22edde3bb61874fa7ed08d5a32c91450c6b5691/bin/zappa.coffee | 54 | 83 |
mauricemach/zappa:bin/zappa.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref, watch;
watch = function(file) {
return fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
... | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | e22edde3bb61874fa7ed08d5a32c91450c6b5691 | 943 | https://github.com/mauricemach/zappa/blob/e22edde3bb61874fa7ed08d5a32c91450c6b5691/bin/zappa.coffee | 54 | 83 |
mauricemach/zappa:bin/zappa.coffee:4:completion | completion | watch = (file) ->
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options =... | options.port[i] = parseInt(p)
puts parser.help() if options.help or process.argv.length is 0
puts zappa.version if options.version
if args.length > 0
file = args[0]
if options.compile then compile file
else
if options.watch
remove_watch_option()
spawn_child()
watch file
else
zapp... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | e22edde3bb61874fa7ed08d5a32c91450c6b5691 | 943 | https://github.com/mauricemach/zappa/blob/e22edde3bb61874fa7ed08d5a32c91450c6b5691/bin/zappa.coffee | 54 | 83 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 1 | 50 | ||
mauricemach/zappa:bin/zappa.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = nul... | //!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, puts, remove_watch_option, spawn, spawn_child, switches, usage, watch, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('fs');
path = require('path');
puts = console.lo... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, puts, remove_watch_option, spawn, spawn_child, switches, usage, watch, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = req... | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dirname coffee_path
js_path = path.join dir, js_path
... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:2:raw_corpus | raw_corpus | fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options = parser.parse proces... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 51 | 79 | ||
mauricemach/zappa:bin/zappa.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new O... | var args, file, i, options, p, parser, ref;
fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...');
child.kill(); // Infanticide!
return spawn_child... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 51 | 79 |
mauricemach/zappa:bin/zappa.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var args, file, i, options, p, parser, ref;
fs.watchFile(file, {
persistent: true,
interval: 500
}, function(curr, prev) {
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
return;
}
puts('Changes detected, reloading...'... | fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options = parser.parse proces... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 51 | 79 |
mauricemach/zappa:bin/zappa.coffee:2:completion | completion | fs.watchFile file, {persistent: true, interval: 500}, (curr, prev) ->
return if curr.size is prev.size and curr.mtime.getTime() is prev.mtime.getTime()
puts 'Changes detected, reloading...'
child.kill() # Infanticide!
spawn_child()
parser = new OptionParser switches, usage
options = parser.parse proces... | options.port[i] = parseInt(p)
puts parser.help() if options.help or process.argv.length is 0
puts zappa.version if options.version
if args.length > 0
file = args[0]
if options.compile then compile file
else
if options.watch
remove_watch_option()
spawn_child()
watch file
else
zapp... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 54e1fda7f4e511478127c331b0bbdeb47316a67a | 943 | https://github.com/mauricemach/zappa/blob/54e1fda7f4e511478127c331b0bbdeb47316a67a/bin/zappa.coffee | 51 | 79 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 5242a5f76c6aa6861ba3124ee386d3ca0edcb058 | 943 | https://github.com/mauricemach/zappa/blob/5242a5f76c6aa6861ba3124ee386d3ca0edcb058/bin/zappa.coffee | 1 | 50 | ||
mauricemach/zappa:bin/zappa.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = nul... | //!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, puts, remove_watch_option, spawn, spawn_child, switches, usage, watch, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('fs');
path = require('path');
puts = console.lo... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 5242a5f76c6aa6861ba3124ee386d3ca0edcb058 | 943 | https://github.com/mauricemach/zappa/blob/5242a5f76c6aa6861ba3124ee386d3ca0edcb058/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, puts, remove_watch_option, spawn, spawn_child, switches, usage, watch, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = req... | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 5242a5f76c6aa6861ba3124ee386d3ca0edcb058 | 943 | https://github.com/mauricemach/zappa/blob/5242a5f76c6aa6861ba3124ee386d3ca0edcb058/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), bare: yes
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_path)) + '.js'
dir = path.dirname coffee_path
js_path = path.join dir, js_path
... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 5242a5f76c6aa6861ba3124ee386d3ca0edcb058 | 943 | https://github.com/mauricemach/zappa/blob/5242a5f76c6aa6861ba3124ee386d3ca0edcb058/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS]... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 16eb51f0a9da7a2b72f72c7394c7d203c8004ddd | 943 | https://github.com/mauricemach/zappa/blob/16eb51f0a9da7a2b72f72c7394c7d203c8004ddd/bin/zappa.coffee | 1 | 50 | ||
mauricemach/zappa:bin/zappa.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
#!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
puts = console.log
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = nul... | //!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, puts, remove_watch_option, spawn, spawn_child, switches, usage, watch, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('fs');
path = require('path');
puts = console.lo... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 16eb51f0a9da7a2b72f72c7394c7d203c8004ddd | 943 | https://github.com/mauricemach/zappa/blob/16eb51f0a9da7a2b72f72c7394c7d203c8004ddd/bin/zappa.coffee | 1 | 50 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.