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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | 16eb51f0a9da7a2b72f72c7394c7d203c8004ddd | 943 | https://github.com/mauricemach/zappa/blob/16eb51f0a9da7a2b72f72c7394c7d203c8004ddd/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), {'noWrap'}
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 | 16eb51f0a9da7a2b72f72c7394c7d203c8004ddd | 943 | https://github.com/mauricemach/zappa/blob/16eb51f0a9da7a2b72f72c7394c7d203c8004ddd/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'
sys = require 'sys'
puts = sys.puts
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 01433247ade434bb732381bbdf376e316defae9c | 943 | https://github.com/mauricemach/zappa/blob/01433247ade434bb732381bbdf376e316defae9c/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'
sys = require 'sys'
puts = sys.puts
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child ... | //!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, puts, remove_watch_option, spawn, spawn_child, switches, sys, usage, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('fs');
path = require('path');
sys = require('sys'... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 01433247ade434bb732381bbdf376e316defae9c | 943 | https://github.com/mauricemach/zappa/blob/01433247ade434bb732381bbdf376e316defae9c/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, sys, usage, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = requi... | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
sys = require 'sys'
puts = sys.puts
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 01433247ade434bb732381bbdf376e316defae9c | 943 | https://github.com/mauricemach/zappa/blob/01433247ade434bb732381bbdf376e316defae9c/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'
sys = require 'sys'
puts = sys.puts
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
... | ['-w', '--watch', 'Keeps watching the file and restarts the app when it changes.']
]
compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), {'noWrap'}
js = "require('zappa').run(function(){#{js}});"
js_path = path.basename(coffee_path, path.extname(coffee_pat... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 01433247ade434bb732381bbdf376e316defae9c | 943 | https://github.com/mauricemach/zappa/blob/01433247ade434bb732381bbdf376e316defae9c/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'
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/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'
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
us... | //!/usr/bin/env coffee
var OptionParser, child, coffee, compile, file, fs, path, 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');
spawn = require('child_... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/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, remove_watch_option, spawn, spawn_child, switches, usage, watch, watching, zappa,
indexOf = [].indexOf;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('... | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/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'
spawn = require('child_process').spawn
OptionParser = require('coffee-script/optparse').OptionParser
child = null
file = null
watching = []
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee... | compile = (coffee_path) ->
fs.readFile coffee_path, (err, data) ->
js = coffee.compile String(data), {'noWrap'}
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 | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/bin/zappa.coffee | 1 | 50 |
mauricemach/zappa:bin/zappa.coffee:2:raw_corpus | raw_corpus | 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 process.argv
args = options.arguments
delete options.arguments
if options.port
... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/bin/zappa.coffee | 51 | 78 | ||
mauricemach/zappa:bin/zappa.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
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 process.argv
args = opt... | var args, file, i, options, p, parser, ref;
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
puts('Changes detected, reloading...');
child.kill(); // Infanticide!
return spawn_child();
}
parser = new OptionParser(switches, usage);
options = parser.parse(process.argv);
args = opt... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/bin/zappa.coffee | 51 | 78 |
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;
if (curr.size === prev.size && curr.mtime.getTime() === prev.mtime.getTime()) {
puts('Changes detected, reloading...');
child.kill(); // Infanticide!
return spawn_child();
}
parser = new OptionParser(switches, usa... | 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 process.argv
args = options.arguments
delete options.arguments
if options.port
... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/bin/zappa.coffee | 51 | 78 |
mauricemach/zappa:bin/zappa.coffee:2:completion | completion | 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 process.argv
args = options.arguments
delete options.arguments
if options.port
... | 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
zappa.run_file file, options | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 30891e68c788a98da43c727dd3383b3a03f1573c | 943 | https://github.com/mauricemach/zappa/blob/30891e68c788a98da43c727dd3383b3a03f1573c/bin/zappa.coffee | 51 | 78 |
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'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative he... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | c298d56ff6d15329f3513fad9ff39cefba850060 | 943 | https://github.com/mauricemach/zappa/blob/c298d56ff6d15329f3513fad9ff39cefba850060/bin/zappa.coffee | 1 | 45 | ||
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'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
... | //!/usr/bin/env coffee
var OptionParser, args, coffee, compile, fs, i, options, p, parser, path, ref, switches, usage, zappa;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('fs');
path = require('path');
OptionParser = require('coffee-script/optparse').OptionParser;
usage = `Usage:
za... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | c298d56ff6d15329f3513fad9ff39cefba850060 | 943 | https://github.com/mauricemach/zappa/blob/c298d56ff6d15329f3513fad9ff39cefba850060/bin/zappa.coffee | 1 | 45 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var OptionParser, args, coffee, compile, fs, i, options, p, parser, path, ref, switches, usage, zappa;
zappa = require('zappa');
coffee = require('coffee-script');
fs = require('fs');
path = require('path');
OptionParser = require('coffe... | #!/usr/bin/env coffee
zappa = require 'zappa'
coffee = require 'coffee-script'
fs = require 'fs'
path = require 'path'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative he... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | c298d56ff6d15329f3513fad9ff39cefba850060 | 943 | https://github.com/mauricemach/zappa/blob/c298d56ff6d15329f3513fad9ff39cefba850060/bin/zappa.coffee | 1 | 45 |
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'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative he... | js = coffee.compile String(data), {'noWrap'}
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
parser = new OptionParser switches, usage
opt... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | c298d56ff6d15329f3513fad9ff39cefba850060 | 943 | https://github.com/mauricemach/zappa/blob/c298d56ff6d15329f3513fad9ff39cefba850060/bin/zappa.coffee | 1 | 45 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
zappa = require 'zappa'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message']
['-v', '--version', 'Shows zappa version']
['-p', '--por... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | f06d652ccede2e1272361d3fca9bcd03100efd26 | 943 | https://github.com/mauricemach/zappa/blob/f06d652ccede2e1272361d3fca9bcd03100efd26/bin/zappa.coffee | 1 | 31 | ||
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'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message']
[... | //!/usr/bin/env coffee
var OptionParser, args, i, options, p, parser, ref, switches, usage, zappa;
zappa = require('zappa');
OptionParser = require('coffee-script/optparse').OptionParser;
usage = `Usage:
zappa [OPTIONS] path/to/app.coffee`;
switches = [['-h', '--help', 'Displays this wonderful, elucidative help m... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | f06d652ccede2e1272361d3fca9bcd03100efd26 | 943 | https://github.com/mauricemach/zappa/blob/f06d652ccede2e1272361d3fca9bcd03100efd26/bin/zappa.coffee | 1 | 31 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var OptionParser, args, i, options, p, parser, ref, switches, usage, zappa;
zappa = require('zappa');
OptionParser = require('coffee-script/optparse').OptionParser;
usage = `Usage:
zappa [OPTIONS] path/to/app.coffee`;
switches = [['-h',... | #!/usr/bin/env coffee
zappa = require 'zappa'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message']
['-v', '--version', 'Shows zappa version']
['-p', '--por... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | f06d652ccede2e1272361d3fca9bcd03100efd26 | 943 | https://github.com/mauricemach/zappa/blob/f06d652ccede2e1272361d3fca9bcd03100efd26/bin/zappa.coffee | 1 | 31 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | #!/usr/bin/env coffee
zappa = require 'zappa'
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message']
['-v', '--version', 'Shows zappa version']
['-p', '--por... | parser = new OptionParser switches, usage
options = parser.parse process.argv
args = options.arguments
delete options.arguments
if options.port
options.port = if options.port.match /,/ then options.port.split ',' else [options.port]
for i, p of options.port
options.port[i] = parseInt(p)
puts parser.help() if ... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | f06d652ccede2e1272361d3fca9bcd03100efd26 | 943 | https://github.com/mauricemach/zappa/blob/f06d652ccede2e1272361d3fca9bcd03100efd26/bin/zappa.coffee | 1 | 31 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
zappa = require 'zappa'
fs = require 'fs'
exec = require('child_process').exec
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message']
['-... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bebe541834d80a18fe94f536d62c3cae0348f362 | 943 | https://github.com/mauricemach/zappa/blob/bebe541834d80a18fe94f536d62c3cae0348f362/bin/zappa.coffee | 1 | 28 | ||
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'
fs = require 'fs'
exec = require('child_process').exec
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', '... | //!/usr/bin/env coffee
var OptionParser, args, exec, fs, options, parser, switches, usage, zappa;
zappa = require('zappa');
fs = require('fs');
exec = require('child_process').exec;
OptionParser = require('coffee-script/optparse').OptionParser;
usage = `Usage:
zappa [OPTIONS] path/to/app.coffee`;
switches = [['... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | bebe541834d80a18fe94f536d62c3cae0348f362 | 943 | https://github.com/mauricemach/zappa/blob/bebe541834d80a18fe94f536d62c3cae0348f362/bin/zappa.coffee | 1 | 28 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var OptionParser, args, exec, fs, options, parser, switches, usage, zappa;
zappa = require('zappa');
fs = require('fs');
exec = require('child_process').exec;
OptionParser = require('coffee-script/optparse').OptionParser;
usage = `Usage:... | #!/usr/bin/env coffee
zappa = require 'zappa'
fs = require 'fs'
exec = require('child_process').exec
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message']
['-... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bebe541834d80a18fe94f536d62c3cae0348f362 | 943 | https://github.com/mauricemach/zappa/blob/bebe541834d80a18fe94f536d62c3cae0348f362/bin/zappa.coffee | 1 | 28 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | #!/usr/bin/env coffee
zappa = require 'zappa'
fs = require 'fs'
exec = require('child_process').exec
OptionParser = require('coffee-script/optparse').OptionParser
usage = '''
Usage:
zappa [OPTIONS] path/to/app.coffee
'''
switches = [
['-h', '--help', 'Displays this wonderful, elucidative help message'] | ['-v', '--version', 'Shows zappa version']
['-p', '--port [NUMBER]', 'The port(s) for the app(s). Ex.: 8080 or 4567,80,3000']
]
parser = new OptionParser switches, usage
options = parser.parse process.argv
args = options.arguments
delete options.arguments
puts parser.help() if options.help or process.argv.length is... | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | bebe541834d80a18fe94f536d62c3cae0348f362 | 943 | https://github.com/mauricemach/zappa/blob/bebe541834d80a18fe94f536d62c3cae0348f362/bin/zappa.coffee | 1 | 28 |
mauricemach/zappa:bin/zappa.coffee:1:raw_corpus | raw_corpus | #!/usr/bin/env coffee
zappa = require 'zappa'
fs = require 'fs'
exec = require('child_process').exec
usage = '''
Usage:
zappa path/to/app.coffee
Commands:
-h, --help: displays this wonderful, elucidative help message
-v, --version: shows zappa version
'''
args = process.argv
switch args[0]
when ... | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 70a2bd6e59d95b2c49b5f249815204852e9fe0d4 | 943 | https://github.com/mauricemach/zappa/blob/70a2bd6e59d95b2c49b5f249815204852e9fe0d4/bin/zappa.coffee | 1 | 27 | ||
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'
fs = require 'fs'
exec = require('child_process').exec
usage = '''
Usage:
zappa path/to/app.coffee
Commands:
-h, --help: displays this wonderful, elucidative help message
-v, --version: shows zappa... | //!/usr/bin/env coffee
var args, exec, fs, usage, zappa;
zappa = require('zappa');
fs = require('fs');
exec = require('child_process').exec;
usage = `Usage:
zappa path/to/app.coffee
Commands:
-h, --help: displays this wonderful, elucidative help message
-v, --version: shows zappa version`;
args = process.ar... | CoffeeScript | JavaScript | mauricemach/zappa | bin/zappa.coffee | MIT | 70a2bd6e59d95b2c49b5f249815204852e9fe0d4 | 943 | https://github.com/mauricemach/zappa/blob/70a2bd6e59d95b2c49b5f249815204852e9fe0d4/bin/zappa.coffee | 1 | 27 |
mauricemach/zappa:bin/zappa.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
//!/usr/bin/env coffee
var args, exec, fs, usage, zappa;
zappa = require('zappa');
fs = require('fs');
exec = require('child_process').exec;
usage = `Usage:
zappa path/to/app.coffee
Commands:
-h, --help: displays this wonderful, elucidative help message
... | #!/usr/bin/env coffee
zappa = require 'zappa'
fs = require 'fs'
exec = require('child_process').exec
usage = '''
Usage:
zappa path/to/app.coffee
Commands:
-h, --help: displays this wonderful, elucidative help message
-v, --version: shows zappa version
'''
args = process.argv
switch args[0]
when ... | JavaScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 70a2bd6e59d95b2c49b5f249815204852e9fe0d4 | 943 | https://github.com/mauricemach/zappa/blob/70a2bd6e59d95b2c49b5f249815204852e9fe0d4/bin/zappa.coffee | 1 | 27 |
mauricemach/zappa:bin/zappa.coffee:1:completion | completion | #!/usr/bin/env coffee
zappa = require 'zappa'
fs = require 'fs'
exec = require('child_process').exec
usage = '''
Usage:
zappa path/to/app.coffee
Commands:
-h, --help: displays this wonderful, elucidative help message | -v, --version: shows zappa version
'''
args = process.argv
switch args[0]
when undefined, null
puts usage
when '-h', '--help'
puts usage
when '-v', '--version'
puts zappa.version
else
zappa.run(fs.realpathSync args[0]) | CoffeeScript | CoffeeScript | mauricemach/zappa | bin/zappa.coffee | MIT | 70a2bd6e59d95b2c49b5f249815204852e9fe0d4 | 943 | https://github.com/mauricemach/zappa/blob/70a2bd6e59d95b2c49b5f249815204852e9fe0d4/bin/zappa.coffee | 1 | 27 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:completion | completion | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | it 'should return false', ->
expect(_.false()).toBeFalse()
describe 'Unit: _.isNullOrUndefined', ->
it 'should return true for undefined', ->
expect(_.isNullOrUndefined(undefined)).toBeTrue()
it 'should return true for null', ->
expect(_.isNullOrUndefined(null)).toBeTrue()
it 's... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:2:raw_corpus | raw_corpus | it 'should return -1 if the regex cannot be found', ->
expect(_.regexIndexOf('a string', /regex/, 0)).toBe -1
it 'should return the location of a match at the start', ->
expect(_.regexIndexOf('Mr. Smith', /Mr./, 0)).toBe 0
it 'should allow startpos to be optional', ->
expect(_.regexInd... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 41 | 81 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'should return -1 if the regex cannot be found', ->
expect(_.regexIndexOf('a string', /regex/, 0)).toBe -1
it 'should return the location of a match at the start', ->
expect(_.regexIndexOf('Mr. Smith', /Mr./, 0)).toBe 0
it 'should all... | it('should return -1 if the regex cannot be found', function() {
return expect(_.regexIndexOf('a string', /regex/, 0)).toBe(-1);
});
it('should return the location of a match at the start', function() {
return expect(_.regexIndexOf('Mr. Smith', /Mr./, 0)).toBe(0);
});
it('should allow startpos to be optional', fu... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 41 | 81 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should return -1 if the regex cannot be found', function() {
return expect(_.regexIndexOf('a string', /regex/, 0)).toBe(-1);
});
it('should return the location of a match at the start', function() {
return expect(_.regexIndexOf('Mr. Smith', /Mr./, 0)).toBe... | it 'should return -1 if the regex cannot be found', ->
expect(_.regexIndexOf('a string', /regex/, 0)).toBe -1
it 'should return the location of a match at the start', ->
expect(_.regexIndexOf('Mr. Smith', /Mr./, 0)).toBe 0
it 'should allow startpos to be optional', ->
expect(_.regexInd... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 41 | 81 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:2:completion | completion | it 'should return -1 if the regex cannot be found', ->
expect(_.regexIndexOf('a string', /regex/, 0)).toBe -1
it 'should return the location of a match at the start', ->
expect(_.regexIndexOf('Mr. Smith', /Mr./, 0)).toBe 0
it 'should allow startpos to be optional', ->
expect(_.regexInd... | describe 'Unit: _.titleCase', ->
it 'should return null if given null', ->
expect(_.titleCase(null)).toBeNull()
it 'should return undefined if given undefined', ->
expect(_.titleCase(undefined)).toBeUndefined()
it 'should return empty string if given an empty string', ->
expect(_.... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 41 | 81 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:3:raw_corpus | raw_corpus | describe 'Unit: _.fromCamelCase', ->
it 'should return null if given null', ->
expect(_.fromCamelCase(null)).toBeNull()
it 'should return undefined if given undefined', ->
expect(_.fromCamelCase(undefined)).toBeUndefined()
it 'should return empty string if given an empty string', ->
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 83 | 125 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'Unit: _.fromCamelCase', ->
it 'should return null if given null', ->
expect(_.fromCamelCase(null)).toBeNull()
it 'should return undefined if given undefined', ->
expect(_.fromCamelCase(undefined)).toBeUndefined()
it 'shoul... | describe('Unit: _.fromCamelCase', function() {
it('should return null if given null', function() {
return expect(_.fromCamelCase(null)).toBeNull();
});
it('should return undefined if given undefined', function() {
return expect(_.fromCamelCase(void 0)).toBeUndefined();
});
it('should return empty stri... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 83 | 125 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('Unit: _.fromCamelCase', function() {
it('should return null if given null', function() {
return expect(_.fromCamelCase(null)).toBeNull();
});
it('should return undefined if given undefined', function() {
return expect(_.fromCamelCase(void 0)... | describe 'Unit: _.fromCamelCase', ->
it 'should return null if given null', ->
expect(_.fromCamelCase(null)).toBeNull()
it 'should return undefined if given undefined', ->
expect(_.fromCamelCase(undefined)).toBeUndefined()
it 'should return empty string if given an empty string', ->
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 83 | 125 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:3:completion | completion | describe 'Unit: _.fromCamelCase', ->
it 'should return null if given null', ->
expect(_.fromCamelCase(null)).toBeNull()
it 'should return undefined if given undefined', ->
expect(_.fromCamelCase(undefined)).toBeUndefined()
it 'should return empty string if given an empty string', ->
... | it 'should operate on multiple camel-case words', ->
expect(_.fromCamelCase('mochaLatte & gyroSandwich')).toBe 'Mocha Latte & Gyro Sandwich'
describe 'Unit: _.replaceInside', ->
it 'should do nothing if given null', ->
expect(_.replaceInside(null, null)).toEqual null
original = {x: 1}
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 83 | 125 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:4:raw_corpus | raw_corpus | it 'should return the replacement object if original is null', ->
original = null
expect(_.replaceInside(original, {a: 1, b: 2})).toEqual {a: 1, b: 2}
expect(original).toEqual null
it 'should replace all keys of the original', ->
original = {c: 5, d: 6, e: 8}
expect(_.replac... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 127 | 166 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'should return the replacement object if original is null', ->
original = null
expect(_.replaceInside(original, {a: 1, b: 2})).toEqual {a: 1, b: 2}
expect(original).toEqual null
it 'should replace all keys of the original', ->
... | it('should return the replacement object if original is null', function() {
var original;
original = null;
expect(_.replaceInside(original, {
a: 1,
b: 2
})).toEqual({
a: 1,
b: 2
});
return expect(original).toEqual(null);
});
it('should replace all keys of the original', function() {
var o... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 127 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should return the replacement object if original is null', function() {
var original;
original = null;
expect(_.replaceInside(original, {
a: 1,
b: 2
})).toEqual({
a: 1,
b: 2
});
return expect(original).toEqual(null);
});
it('should ... | it 'should return the replacement object if original is null', ->
original = null
expect(_.replaceInside(original, {a: 1, b: 2})).toEqual {a: 1, b: 2}
expect(original).toEqual null
it 'should replace all keys of the original', ->
original = {c: 5, d: 6, e: 8}
expect(_.replac... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 127 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:4:completion | completion | it 'should return the replacement object if original is null', ->
original = null
expect(_.replaceInside(original, {a: 1, b: 2})).toEqual {a: 1, b: 2}
expect(original).toEqual null
it 'should replace all keys of the original', ->
original = {c: 5, d: 6, e: 8}
expect(_.replac... | it 'should return null if given undefined', ->
expect(_.numeralformat('0.0', undefined)).toBeNull()
it 'should return the number if format is null', ->
expect(_.numeralformat(null, 20.20512)).toBe 20.20512
it 'should return the number if format is empty', ->
expect(_.numeralformat('', ... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 127 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:5:raw_corpus | raw_corpus | describe 'Unit: _.ngApply', ->
actual = null
mockScope = {
$apply: (f) ->
actual = f()
return 1
}
mockFunction = -> 2
it 'should call $apply on the scope and pass the function', ->
x = _.ngApply(mockScope, mockFunction)()
expect(x).toBe 1
expe... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 168 | 207 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'Unit: _.ngApply', ->
actual = null
mockScope = {
$apply: (f) ->
actual = f()
return 1
}
mockFunction = -> 2
it 'should call $apply on the scope and pass the function', ->
x = _.ngApply(mockSco... | describe('Unit: _.ngApply', function() {
var actual, mockFunction, mockScope;
actual = null;
mockScope = {
$apply: function(f) {
actual = f();
return 1;
}
};
mockFunction = function() {
return 2;
};
return it('should call $apply on the scope and pass the function', function() {
... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 168 | 207 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('Unit: _.ngApply', function() {
var actual, mockFunction, mockScope;
actual = null;
mockScope = {
$apply: function(f) {
actual = f();
return 1;
}
};
mockFunction = function() {
return 2;
};
return it('should call $appl... | describe 'Unit: _.ngApply', ->
actual = null
mockScope = {
$apply: (f) ->
actual = f()
return 1
}
mockFunction = -> 2
it 'should call $apply on the scope and pass the function', ->
x = _.ngApply(mockScope, mockFunction)()
expect(x).toBe 1
expe... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 168 | 207 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:5:completion | completion | describe 'Unit: _.ngApply', ->
actual = null
mockScope = {
$apply: (f) ->
actual = f()
return 1
}
mockFunction = -> 2
it 'should call $apply on the scope and pass the function', ->
x = _.ngApply(mockScope, mockFunction)()
expect(x).toBe 1
expe... | return 1
}
mockFunctionA = ->
oracle.a = 1
mockFunctionB = ->
oracle.b = 2
return true
mockFunctionC = ->
oracle.c = 3
return 'OK'
it 'should return a function', ->
a = _.ngNonPropagatingHandler(mockScope, mockFunctionA)
expect(a).toBeFunctio... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 168 | 207 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:6:raw_corpus | raw_corpus | it 'should call the function B and return false', ->
b = _.ngNonPropagatingHandler(mockScope, mockFunctionB)()
expect(b).toBeFalse()
expect(oracle.b).toBe 2
it 'should call the function C and return false', ->
c = _.ngNonPropagatingHandler(mockScope, mockFunctionC)()
expect(... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 209 | 217 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:6:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'should call the function B and return false', ->
b = _.ngNonPropagatingHandler(mockScope, mockFunctionB)()
expect(b).toBeFalse()
expect(oracle.b).toBe 2
it 'should call the function C and return false', ->
c = _.ngNonPropa... | it('should call the function B and return false', function() {
var b;
b = _.ngNonPropagatingHandler(mockScope, mockFunctionB)();
expect(b).toBeFalse();
return expect(oracle.b).toBe(2);
});
it('should call the function C and return false', function() {
var c;
c = _.ngNonPropagatingHandler(mockScope, mockFun... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 209 | 217 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:6:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should call the function B and return false', function() {
var b;
b = _.ngNonPropagatingHandler(mockScope, mockFunctionB)();
expect(b).toBeFalse();
return expect(oracle.b).toBe(2);
});
it('should call the function C and return false', function() {
va... | it 'should call the function B and return false', ->
b = _.ngNonPropagatingHandler(mockScope, mockFunctionB)()
expect(b).toBeFalse()
expect(oracle.b).toBe 2
it 'should call the function C and return false', ->
c = _.ngNonPropagatingHandler(mockScope, mockFunctionC)()
expect(... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 209 | 217 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:6:completion | completion | it 'should call the function B and return false', ->
b = _.ngNonPropagatingHandler(mockScope, mockFunctionB)()
expect(b).toBeFalse()
expect(oracle.b).toBe 2 | it 'should call the function C and return false', ->
c = _.ngNonPropagatingHandler(mockScope, mockFunctionC)()
expect(c).toBeFalse()
expect(oracle.c).toBe 3 | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/unit/mixins-spec.coffee | 209 | 217 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 08680403c1ab72b7789517426293681c2224eada | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 08680403c1ab72b7789517426293681c2224eada | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 08680403c1ab72b7789517426293681c2224eada | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 |
ExpediaGroup/cyclotron:cyclotron-site/test/unit/mixins-spec.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | it 'should return false', ->
expect(_.false()).toBeFalse()
describe 'Unit: _.isNullOrUndefined', ->
it 'should return true for undefined', ->
expect(_.isNullOrUndefined(undefined)).toBeTrue()
it 'should return true for null', ->
expect(_.isNullOrUndefined(null)).toBeTrue()
it 's... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/unit/mixins-spec.coffee | MIT | 08680403c1ab72b7789517426293681c2224eada | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/08680403c1ab72b7789517426293681c2224eada/cyclotron-site/test/unit/mixins-spec.coffee | 1 | 39 |
mojotech/pioneer:test/unit/bin.coffee:1:raw_corpus | raw_corpus | chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested()", ->
it "should return true when --version is pas... | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 1 | 50 | ||
mojotech/pioneer:test/unit/bin.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested... | var Pioneer, chai, sinon, sinonChai;
chai = require('chai');
sinon = require("sinon");
sinonChai = require("sinon-chai");
chai.should();
chai.use(sinonChai);
Pioneer = require("../../lib/pioneer.js");
describe("Pioneer Kickoff File", function() {
describe("isVersionRequested()", function() {
it("should ret... | CoffeeScript | JavaScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 1 | 50 |
mojotech/pioneer:test/unit/bin.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Pioneer, chai, sinon, sinonChai;
chai = require('chai');
sinon = require("sinon");
sinonChai = require("sinon-chai");
chai.should();
chai.use(sinonChai);
Pioneer = require("../../lib/pioneer.js");
describe("Pioneer Kickoff File", function() {
describe(... | chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested()", ->
it "should return true when --version is pas... | JavaScript | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 1 | 50 |
mojotech/pioneer:test/unit/bin.coffee:1:completion | completion | chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested()", ->
it "should return true when --version is pas... | describe "When Version is requested", ->
beforeEach ->
@sandbox = sinon.sandbox.create()
@sandbox.stub(Pioneer.prototype, "isVersionRequested", -> true )
@sandbox.stub(Pioneer.prototype, "getSpecifications", -> true )
@consoleSpy = @sandbox.spy(console, 'log')
afterEach ->
@sandbo... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 1 | 50 |
mojotech/pioneer:test/unit/bin.coffee:2:raw_corpus | raw_corpus | it "should treat missing or 'false' value as false", ->
Pioneer::isVerbose({verbose: "false"})
.should.be.false
Pioneer::isVerbose({})
.should.be.false
describe "when only a config value is passed", ->
it "should return true when passed a truthy value", ->
Pioneer::i... | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 51 | 76 | ||
mojotech/pioneer:test/unit/bin.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it "should treat missing or 'false' value as false", ->
Pioneer::isVerbose({verbose: "false"})
.should.be.false
Pioneer::isVerbose({})
.should.be.false
describe "when only a config value is passed", ->
it "should retur... | it("should treat missing or 'false' value as false", function() {
Pioneer.prototype.isVerbose({
verbose: "false"
}).should.be.false;
return Pioneer.prototype.isVerbose({}).should.be.false;
});
describe("when only a config value is passed", function() {
it("should return true when passed a truthy value", fu... | CoffeeScript | JavaScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 51 | 76 |
mojotech/pioneer:test/unit/bin.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it("should treat missing or 'false' value as false", function() {
Pioneer.prototype.isVerbose({
verbose: "false"
}).should.be.false;
return Pioneer.prototype.isVerbose({}).should.be.false;
});
describe("when only a config value is passed", function() {
... | it "should treat missing or 'false' value as false", ->
Pioneer::isVerbose({verbose: "false"})
.should.be.false
Pioneer::isVerbose({})
.should.be.false
describe "when only a config value is passed", ->
it "should return true when passed a truthy value", ->
Pioneer::i... | JavaScript | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 51 | 76 |
mojotech/pioneer:test/unit/bin.coffee:2:completion | completion | it "should treat missing or 'false' value as false", ->
Pioneer::isVerbose({verbose: "false"})
.should.be.false
Pioneer::isVerbose({})
.should.be.false
describe "when only a config value is passed", ->
it "should return true when passed a truthy value", ->
Pioneer::i... | it "should return false when passed a falsey value", ->
Pioneer::isVerbose({}, {verbose: ""})
.should.be.false
describe "when a config and command line value are passed", ->
it "should defer to the command line value", ->
Pioneer::isVerbose({verbose: true}, {verbose: false})
... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 2d3ade85e18e3ea1dfff2545bad4142aa9c496e4 | 523 | https://github.com/mojotech/pioneer/blob/2d3ade85e18e3ea1dfff2545bad4142aa9c496e4/test/unit/bin.coffee | 51 | 76 |
mojotech/pioneer:test/unit/bin.coffee:1:raw_corpus | raw_corpus | chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested()", ->
it "should return true when --version is pas... | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 877c45487bc5cdfa0a4f18a26b7a9557297a351a | 523 | https://github.com/mojotech/pioneer/blob/877c45487bc5cdfa0a4f18a26b7a9557297a351a/test/unit/bin.coffee | 1 | 39 | ||
mojotech/pioneer:test/unit/bin.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested... | var Pioneer, chai, sinon, sinonChai;
chai = require('chai');
sinon = require("sinon");
sinonChai = require("sinon-chai");
chai.should();
chai.use(sinonChai);
Pioneer = require("../../lib/pioneer.js");
describe("Pioneer Kickoff File", function() {
describe("isVersionRequested()", function() {
it("should ret... | CoffeeScript | JavaScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 877c45487bc5cdfa0a4f18a26b7a9557297a351a | 523 | https://github.com/mojotech/pioneer/blob/877c45487bc5cdfa0a4f18a26b7a9557297a351a/test/unit/bin.coffee | 1 | 39 |
mojotech/pioneer:test/unit/bin.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Pioneer, chai, sinon, sinonChai;
chai = require('chai');
sinon = require("sinon");
sinonChai = require("sinon-chai");
chai.should();
chai.use(sinonChai);
Pioneer = require("../../lib/pioneer.js");
describe("Pioneer Kickoff File", function() {
describe(... | chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested()", ->
it "should return true when --version is pas... | JavaScript | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 877c45487bc5cdfa0a4f18a26b7a9557297a351a | 523 | https://github.com/mojotech/pioneer/blob/877c45487bc5cdfa0a4f18a26b7a9557297a351a/test/unit/bin.coffee | 1 | 39 |
mojotech/pioneer:test/unit/bin.coffee:1:completion | completion | chai = require('chai')
sinon = require("sinon")
sinonChai = require("sinon-chai")
chai.should()
chai.use(sinonChai)
Pioneer = require("../../lib/pioneer.js")
describe "Pioneer Kickoff File", ->
describe "isVersionRequested()", ->
it "should return true when --version is pas... | .should.be.true
it "should return null when neither -v or --version is true", ->
# expect(Pioneer::isVersionRequested({}))
# .to.eql(undefined)
describe "When Version is requested", ->
beforeEach ->
@sandbox = sinon.sandbox.create()
@sandbox.stub(Pioneer.prototype, "isVersionRequeste... | CoffeeScript | CoffeeScript | mojotech/pioneer | test/unit/bin.coffee | MIT | 877c45487bc5cdfa0a4f18a26b7a9557297a351a | 523 | https://github.com/mojotech/pioneer/blob/877c45487bc5cdfa0a4f18a26b7a9557297a351a/test/unit/bin.coffee | 1 | 39 |
linemanjs/lineman:config/plugins/images.coffee:1:raw_corpus | raw_corpus | # notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = (lineman) ->
config:
images:
fi... | CoffeeScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/images.coffee | 1 | 15 | ||
linemanjs/lineman:config/plugins/images.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
mod... | // notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
// if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = function(lineman) {
return {
config... | CoffeeScript | JavaScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/images.coffee | 1 | 15 |
linemanjs/lineman:config/plugins/images.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
// if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
mod... | # notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = (lineman) ->
config:
images:
fi... | JavaScript | CoffeeScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/images.coffee | 1 | 15 |
linemanjs/lineman:config/plugins/images.coffee:1:completion | completion | # notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = (lineman) ->
config:
images:
fi... | "vendor/img/": "<%= files.img.vendor %>"
root: "<%= files.img.root %>"
dev:
dest: "generated"
dist:
dest: "dist" | CoffeeScript | CoffeeScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 61d681532d9621e578d319c279006bbb728ece4b | 1,168 | https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/config/plugins/images.coffee | 1 | 15 |
linemanjs/lineman:config/plugins/images.coffee:1:raw_corpus | raw_corpus | # notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = (lineman) ->
config:
files:
"ap... | CoffeeScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/images.coffee | 1 | 14 | ||
linemanjs/lineman:config/plugins/images.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
mod... | // notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
// if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = function(lineman) {
return {
config... | CoffeeScript | JavaScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/images.coffee | 1 | 14 |
linemanjs/lineman:config/plugins/images.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
// if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
mod... | # notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = (lineman) ->
config:
files:
"ap... | JavaScript | CoffeeScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/images.coffee | 1 | 14 |
linemanjs/lineman:config/plugins/images.coffee:1:completion | completion | # notes: due to ../../ paths for images in many css libs we dump images out to the root of dist and generated
# if your lib requires a different structure to counter this, you'll need to nest your img files in vendor/img accordingly, ie: vendor/img/img
module.exports = (lineman) ->
config:
files:
"ap... | root: "<%= files.img.root %>"
dev:
dest: "generated"
dist:
dest: "dist" | CoffeeScript | CoffeeScript | linemanjs/lineman | config/plugins/images.coffee | MIT | 94365fc4e4b804de8672585c254895fbd9cb514e | 1,168 | https://github.com/linemanjs/lineman/blob/94365fc4e4b804de8672585c254895fbd9cb514e/config/plugins/images.coffee | 1 | 14 |
jianliaoim/talk-os:talk-web/client/app/snippet-card.coffee:1:raw_corpus | raw_corpus | React = require 'react'
CodeViewer = React.createFactory require '../module/code-viewer'
snippetUtil = require '../util/snippet'
PureRenderMixin = require 'react-addons-pure-render-mixin'
{ div } = React.DOM
T = React.PropTypes
module.exports = React.createClass
displayName: 'snippet-card'
mixins: [ PureRenderM... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/snippet-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/snippet-card.coffee | 1 | 36 | ||
jianliaoim/talk-os:talk-web/client/app/snippet-card.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
CodeViewer = React.createFactory require '../module/code-viewer'
snippetUtil = require '../util/snippet'
PureRenderMixin = require 'react-addons-pure-render-mixin'
{ div } = React.DOM
T = React.PropTypes
module.exports = React.createCl... | var CodeViewer, PureRenderMixin, React, T, div, snippetUtil;
React = require('react');
CodeViewer = React.createFactory(require('../module/code-viewer'));
snippetUtil = require('../util/snippet');
PureRenderMixin = require('react-addons-pure-render-mixin');
({div} = React.DOM);
T = React.PropTypes;
module.export... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/snippet-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/snippet-card.coffee | 1 | 36 |
jianliaoim/talk-os:talk-web/client/app/snippet-card.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CodeViewer, PureRenderMixin, React, T, div, snippetUtil;
React = require('react');
CodeViewer = React.createFactory(require('../module/code-viewer'));
snippetUtil = require('../util/snippet');
PureRenderMixin = require('react-addons-pure-render-mixin');
({... | React = require 'react'
CodeViewer = React.createFactory require '../module/code-viewer'
snippetUtil = require '../util/snippet'
PureRenderMixin = require 'react-addons-pure-render-mixin'
{ div } = React.DOM
T = React.PropTypes
module.exports = React.createClass
displayName: 'snippet-card'
mixins: [ PureRenderM... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/snippet-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/snippet-card.coffee | 1 | 36 |
jianliaoim/talk-os:talk-web/client/app/snippet-card.coffee:1:completion | completion | React = require 'react'
CodeViewer = React.createFactory require '../module/code-viewer'
snippetUtil = require '../util/snippet'
PureRenderMixin = require 'react-addons-pure-render-mixin'
{ div } = React.DOM
T = React.PropTypes
module.exports = React.createClass
displayName: 'snippet-card'
mixins: [ PureRenderM... | codeType: T.string
getDefaultProps: ->
codeType: 'txt'
text: ''
title: ''
onClick: (event) ->
event.stopPropagation()
@props.onClick? event
render: ->
div className: 'snippet-card', onClick: @onClick,
if @props.title.length then div className: 'title', @props.title else null
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/snippet-card.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/snippet-card.coffee | 1 | 36 |
jashkenas/coffeescript:test/async_iterators.coffee:1:raw_corpus | raw_corpus | # This is always fulfilled.
winLater = (val, ms) ->
new Promise (resolve) -> setTimeout (-> resolve val), ms
# This is always rejected.
failLater = (val, ms) ->
new Promise (resolve, reject) -> setTimeout (-> reject new Error val), ms
createAsyncIterable = (syncIterable) ->
for elem in syncIterable
yield aw... | CoffeeScript | jashkenas/coffeescript | test/async_iterators.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/async_iterators.coffee | 1 | 32 | ||
jashkenas/coffeescript:test/async_iterators.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# This is always fulfilled.
winLater = (val, ms) ->
new Promise (resolve) -> setTimeout (-> resolve val), ms
# This is always rejected.
failLater = (val, ms) ->
new Promise (resolve, reject) -> setTimeout (-> reject new Error val), ms
createAsyncIterable = ... | // This is always fulfilled.
var createAsyncIterable, failLater, winLater;
winLater = function(val, ms) {
return new Promise(function(resolve) {
return setTimeout((function() {
return resolve(val);
}), ms);
});
};
// This is always rejected.
failLater = function(val, ms) {
return new Promise(funct... | CoffeeScript | JavaScript | jashkenas/coffeescript | test/async_iterators.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/async_iterators.coffee | 1 | 32 |
jashkenas/coffeescript:test/async_iterators.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// This is always fulfilled.
var createAsyncIterable, failLater, winLater;
winLater = function(val, ms) {
return new Promise(function(resolve) {
return setTimeout((function() {
return resolve(val);
}), ms);
});
};
// This is always rejected.
fai... | # This is always fulfilled.
winLater = (val, ms) ->
new Promise (resolve) -> setTimeout (-> resolve val), ms
# This is always rejected.
failLater = (val, ms) ->
new Promise (resolve, reject) -> setTimeout (-> reject new Error val), ms
createAsyncIterable = (syncIterable) ->
for elem in syncIterable
yield aw... | JavaScript | CoffeeScript | jashkenas/coffeescript | test/async_iterators.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/async_iterators.coffee | 1 | 32 |
jashkenas/coffeescript:test/async_iterators.coffee:1:completion | completion | # This is always fulfilled.
winLater = (val, ms) ->
new Promise (resolve) -> setTimeout (-> resolve val), ms
# This is always rejected.
failLater = (val, ms) ->
new Promise (resolve, reject) -> setTimeout (-> reject new Error val), ms
createAsyncIterable = (syncIterable) ->
for elem in syncIterable
yield aw... | test "async generator functions", ->
foo = (val) ->
yield await winLater val + 1, 50
bar = (val) ->
yield await failLater val - 1, 50
a = await foo(41).next()
eq a.value, 42
try
b = do -> await bar(41).next()
b.catch (err) ->
eq "40", err.message
catch err
ok no | CoffeeScript | CoffeeScript | jashkenas/coffeescript | test/async_iterators.coffee | MIT | 817c39a13065a900725943c33a79252a69d779e2 | 16,577 | https://github.com/jashkenas/coffeescript/blob/817c39a13065a900725943c33a79252a69d779e2/test/async_iterators.coffee | 1 | 32 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:raw_corpus | raw_corpus | suite 'XPath:', ->
test 'Evaluate', ->
doc = xml('book').ele('title').txt('Harry Potter').doc()
nodes = xpath.evaluate('//title', doc, null, xpath.XPathResult.ANY_TYPE, null).nodes
eq(nodes[0].localName, "title")
eq(nodes[0].firstChild.data, "Harry Potter")
eq(nodes[0].toString(), "<title>Harry P... | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'XPath:', ->
test 'Evaluate', ->
doc = xml('book').ele('title').txt('Harry Potter').doc()
nodes = xpath.evaluate('//title', doc, null, xpath.XPathResult.ANY_TYPE, null).nodes
eq(nodes[0].localName, "title")
eq(nodes[0].firstChild.data, "H... | suite('XPath:', function() {
test('Evaluate', function() {
var doc, nodes;
doc = xml('book').ele('title').txt('Harry Potter').doc();
nodes = xpath.evaluate('//title', doc, null, xpath.XPathResult.ANY_TYPE, null).nodes;
eq(nodes[0].localName, "title");
eq(nodes[0].firstChild.data, "Harry Potter");
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
suite('XPath:', function() {
test('Evaluate', function() {
var doc, nodes;
doc = xml('book').ele('title').txt('Harry Potter').doc();
nodes = xpath.evaluate('//title', doc, null, xpath.XPathResult.ANY_TYPE, null).nodes;
eq(nodes[0].localName, "titl... | suite 'XPath:', ->
test 'Evaluate', ->
doc = xml('book').ele('title').txt('Harry Potter').doc()
nodes = xpath.evaluate('//title', doc, null, xpath.XPathResult.ANY_TYPE, null).nodes
eq(nodes[0].localName, "title")
eq(nodes[0].firstChild.data, "Harry Potter")
eq(nodes[0].toString(), "<title>Harry P... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:completion | completion | suite 'XPath:', ->
test 'Evaluate', ->
doc = xml('book').ele('title').txt('Harry Potter').doc()
nodes = xpath.evaluate('//title', doc, null, xpath.XPathResult.ANY_TYPE, null).nodes
eq(nodes[0].localName, "title")
eq(nodes[0].firstChild.data, "Harry Potter")
eq(nodes[0].toString(), "<title>Harry P... | eq(nodes[0].firstChild.data, 'Harry Potter')
eq(nodes[0].toString(), '<title>Harry Potter</title>')
eq(nodes2.length, 7)
eq(pis.length, 2)
eq(pis[1].data, 'books="7"')
test 'Select single node', ->
doc = xml('book').ele('title').txt('Harry Potter').doc()
eq(xpath.select('//title[1]', doc)[0... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:2:raw_corpus | raw_corpus | test 'Select with multiple predicates', ->
doc = xml('characters')
.ele('character', { name: "Snape", sex: "M", age: "50" }).up()
.ele('character', { name: "McGonnagal", sex: "F", age: "65" }).up()
.doc()
characters = xpath.select('/*/character[@sex = "M"][@age > 40]/@name', doc)
eq(char... | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 51 | 61 | ||
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
test 'Select with multiple predicates', ->
doc = xml('characters')
.ele('character', { name: "Snape", sex: "M", age: "50" }).up()
.ele('character', { name: "McGonnagal", sex: "F", age: "65" }).up()
.doc()
characters = xpath.select('/*/c... | test('Select with multiple predicates', function() {
var characters, doc;
doc = xml('characters').ele('character', {
name: "Snape",
sex: "M",
age: "50"
}).up().ele('character', {
name: "McGonnagal",
sex: "F",
age: "65"
}).up().doc();
characters = xpath.select('/*/character[@sex = "M"][... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 51 | 61 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
test('Select with multiple predicates', function() {
var characters, doc;
doc = xml('characters').ele('character', {
name: "Snape",
sex: "M",
age: "50"
}).up().ele('character', {
name: "McGonnagal",
sex: "F",
age: "65"
}).up().doc();... | test 'Select with multiple predicates', ->
doc = xml('characters')
.ele('character', { name: "Snape", sex: "M", age: "50" }).up()
.ele('character', { name: "McGonnagal", sex: "F", age: "65" }).up()
.doc()
characters = xpath.select('/*/character[@sex = "M"][@age > 40]/@name', doc)
eq(char... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 51 | 61 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:2:completion | completion | test 'Select with multiple predicates', ->
doc = xml('characters')
.ele('character', { name: "Snape", sex: "M", age: "50" }).up()
.ele('character', { name: "McGonnagal", sex: "F", age: "65" }).up()
.doc() | characters = xpath.select('/*/character[@sex = "M"][@age > 40]/@name', doc)
eq(characters.length, 1)
eq(characters[0].textContent, 'Snape') | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/xpath/simple.coffee | 51 | 61 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:raw_corpus | raw_corpus | suite 'XPath:', ->
test 'Simple XPath usage', ->
doc = xml('book', { headless: true }).ele('title').txt('Harry Potter').doc()
nodes = xpath.select("//title", doc)
eq("title", nodes[0].localName)
eq("Harry Potter", nodes[0].firstChild.data)
eq("<title>Harry Potter</title>", nodes[0].toString()) | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/test/xpath/simple.coffee | 1 | 9 | ||
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
suite 'XPath:', ->
test 'Simple XPath usage', ->
doc = xml('book', { headless: true }).ele('title').txt('Harry Potter').doc()
nodes = xpath.select("//title", doc)
eq("title", nodes[0].localName)
eq("Harry Potter", nodes[0].firstChild.data)
... | suite('XPath:', function() {
return test('Simple XPath usage', function() {
var doc, nodes;
doc = xml('book', {
headless: true
}).ele('title').txt('Harry Potter').doc();
nodes = xpath.select("//title", doc);
eq("title", nodes[0].localName);
eq("Harry Potter", nodes[0].firstChild.data);
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/test/xpath/simple.coffee | 1 | 9 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
suite('XPath:', function() {
return test('Simple XPath usage', function() {
var doc, nodes;
doc = xml('book', {
headless: true
}).ele('title').txt('Harry Potter').doc();
nodes = xpath.select("//title", doc);
eq("title", nodes[0].localNam... | suite 'XPath:', ->
test 'Simple XPath usage', ->
doc = xml('book', { headless: true }).ele('title').txt('Harry Potter').doc()
nodes = xpath.select("//title", doc)
eq("title", nodes[0].localName)
eq("Harry Potter", nodes[0].firstChild.data)
eq("<title>Harry Potter</title>", nodes[0].toString()) | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/test/xpath/simple.coffee | 1 | 9 |
oozcitak/xmlbuilder-js:test/xpath/simple.coffee:1:completion | completion | suite 'XPath:', ->
test 'Simple XPath usage', ->
doc = xml('book', { headless: true }).ele('title').txt('Harry Potter').doc() | nodes = xpath.select("//title", doc)
eq("title", nodes[0].localName)
eq("Harry Potter", nodes[0].firstChild.data)
eq("<title>Harry Potter</title>", nodes[0].toString()) | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | test/xpath/simple.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/test/xpath/simple.coffee | 1 | 9 |
jianliaoim/talk-os:talk-web/client/module/light-checkbox.coffee:1:raw_corpus | raw_corpus | React = require 'react'
PureRenderMixin = require 'react-addons-pure-render-mixin'
div = React.createFactory 'div'
span = React.createFactory 'span'
T = React.PropTypes
cx = require 'classnames'
module.exports = React.createClass
displayName: 'light-checkbox'
mixins: [PureRenderMixin]
propTypes:
checked: ... | CoffeeScript | jianliaoim/talk-os | talk-web/client/module/light-checkbox.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/light-checkbox.coffee | 1 | 43 | ||
jianliaoim/talk-os:talk-web/client/module/light-checkbox.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
PureRenderMixin = require 'react-addons-pure-render-mixin'
div = React.createFactory 'div'
span = React.createFactory 'span'
T = React.PropTypes
cx = require 'classnames'
module.exports = React.createClass
displayName: 'light-checkbox... | var PureRenderMixin, React, T, cx, div, span;
React = require('react');
PureRenderMixin = require('react-addons-pure-render-mixin');
div = React.createFactory('div');
span = React.createFactory('span');
T = React.PropTypes;
cx = require('classnames');
module.exports = React.createClass({
displayName: 'light-ch... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/module/light-checkbox.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/module/light-checkbox.coffee | 1 | 43 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.