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
Glavin001/atom-beautify:src/beautifiers/beautysh.coffee:1:completion
completion
"use strict" Beautifier = require('./beautifier') module.exports = class BashBeautify extends Beautifier name: "beautysh" link: "https://github.com/bemeurer/beautysh" options: {
Bash: true } beautify: (text, language, options) -> file = @tempFile("input", text) @run('beautysh', [ file ], help: { link: "https://github.com/bemeurer/beautysh" }) .then(=> @readFile file)
CoffeeScript
CoffeeScript
Glavin001/atom-beautify
src/beautifiers/beautysh.coffee
MIT
df89047046f7f174ae6ebe7226260a3debfc4826
1,503
https://github.com/Glavin001/atom-beautify/blob/df89047046f7f174ae6ebe7226260a3debfc4826/src/beautifiers/beautysh.coffee
1
14
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.utils.coffee
1
36
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Ha...
var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(value); }; Utils.safeString = function(str) { return...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.utils.coffee
1
36
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(...
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.utils.coffee
1
36
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
Utils.isString = (value) -> typeof value is 'string' Utils.result = (value) -> if Utils.isFunc value then value() else value Utils.err = (msg) -> throw new Error msg Utils.verify = (name, fnArg, argTypes = []) -> fnArg = Array.prototype.slice.apply(fnArg).slice(0, argTypes.length) for arg, i in f...
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
e9c8788dfc9f640038c00eaafe33f4137ff5f465
675
https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.utils.coffee
1
36
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
8f164c40e3be7ef8244f5fe00171d36a7e02694d
675
https://github.com/elving/swag/blob/8f164c40e3be7ef8244f5fe00171d36a7e02694d/src/swag.utils.coffee
1
34
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Ha...
var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(value); }; Utils.safeString = function(str) { return...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
8f164c40e3be7ef8244f5fe00171d36a7e02694d
675
https://github.com/elving/swag/blob/8f164c40e3be7ef8244f5fe00171d36a7e02694d/src/swag.utils.coffee
1
34
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(...
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
8f164c40e3be7ef8244f5fe00171d36a7e02694d
675
https://github.com/elving/swag/blob/8f164c40e3be7ef8244f5fe00171d36a7e02694d/src/swag.utils.coffee
1
34
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
typeof value is 'function' Utils.isString = (value) -> typeof value is 'string' Utils.result = (value) -> if Utils.isFunc value then value() else value Utils.err = (msg) -> throw new Error msg Utils.verify = -> args = Array.prototype.slice.apply(arguments) name = args.shift() fnArg = Array.p...
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
8f164c40e3be7ef8244f5fe00171d36a7e02694d
675
https://github.com/elving/swag/blob/8f164c40e3be7ef8244f5fe00171d36a7e02694d/src/swag.utils.coffee
1
34
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
1b72203cbf6166cfd896940350bf5a498c53197f
675
https://github.com/elving/swag/blob/1b72203cbf6166cfd896940350bf5a498c53197f/src/swag.utils.coffee
1
27
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Ha...
var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(value); }; Utils.safeString = function(str) { return...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
1b72203cbf6166cfd896940350bf5a498c53197f
675
https://github.com/elving/swag/blob/1b72203cbf6166cfd896940350bf5a498c53197f/src/swag.utils.coffee
1
27
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(...
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
1b72203cbf6166cfd896940350bf5a498c53197f
675
https://github.com/elving/swag/blob/1b72203cbf6166cfd896940350bf5a498c53197f/src/swag.utils.coffee
1
27
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) ->
trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g str.toString().replace trim, '' Utils.isFunc = (value) -> typeof value is 'function' Utils.isString = (value) -> typeof value is 'string' Utils.result = (value) -> if Utils.isFunc value then value() else value Utils.err = (m...
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
1b72203cbf6166cfd896940350bf5a498c53197f
675
https://github.com/elving/swag/blob/1b72203cbf6166cfd896940350bf5a498c53197f/src/swag.utils.coffee
1
27
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
f3be26ec359ce14eb0a45596c591b7a777e4719c
675
https://github.com/elving/swag/blob/f3be26ec359ce14eb0a45596c591b7a777e4719c/src/swag.utils.coffee
1
24
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Ha...
var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(value); }; Utils.safeString = function(str) { return...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
f3be26ec359ce14eb0a45596c591b7a777e4719c
675
https://github.com/elving/swag/blob/f3be26ec359ce14eb0a45596c591b7a777e4719c/src/swag.utils.coffee
1
24
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.isHandlebarsSpecific = function(value) { return (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.isUndefined = function(value) { return (value === void 0 || value === null) || Utils.isHandlebarsSpecific(...
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim =...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
f3be26ec359ce14eb0a45596c591b7a777e4719c
675
https://github.com/elving/swag/blob/f3be26ec359ce14eb0a45596c591b7a777e4719c/src/swag.utils.coffee
1
24
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.isHandlebarsSpecific = (value) -> (value and value.fn?) or (value and value.hash?) Utils.isUndefined = (value) -> (value is undefined or value is null) or Utils.isHandlebarsSpecific value Utils.safeString = (str) -> new Swag.Handlebars.SafeString str
Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g str.toString().replace trim, '' Utils.isFunc = (value) -> typeof value is 'function' Utils.result = (value) -> if Utils.isFunc value then value() else value Utils.err = (msg) -> throw new Error msg
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
f3be26ec359ce14eb0a45596c591b7a777e4719c
675
https://github.com/elving/swag/blob/f3be26ec359ce14eb0a45596c591b7a777e4719c/src/swag.utils.coffee
1
24
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.isUndefined = (value) -> (value is 'undefined' or value is null) or (value and value.fn?) or (value and value.hash?) Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g st...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1
675
https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.utils.coffee
1
21
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.isUndefined = (value) -> (value is 'undefined' or value is null) or (value and value.fn?) or (value and value.hash?) Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0...
var Utils; Utils = {}; Utils.isUndefined = function(value) { return (value === 'undefined' || value === null) || (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.safeString = function(str) { return new Swag.Handlebars.SafeString(str); }; Utils.trim = function(str) { var trim; trim ...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1
675
https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.utils.coffee
1
21
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.isUndefined = function(value) { return (value === 'undefined' || value === null) || (value && (value.fn != null)) || (value && (value.hash != null)); }; Utils.safeString = function(str) { return new Swag.Handlebars.SafeString(str...
Utils = {} Utils.isUndefined = (value) -> (value is 'undefined' or value is null) or (value and value.fn?) or (value and value.hash?) Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g st...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1
675
https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.utils.coffee
1
21
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.isUndefined = (value) -> (value is 'undefined' or value is null) or (value and value.fn?) or (value and value.hash?) Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) ->
trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g str.toString().replace trim, '' Utils.isFunc = (value) -> typeof value is 'function' Utils.result = (value) -> if Utils.isFunc value then value() else value Utils.err = (msg) -> throw new Error msg
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1
675
https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.utils.coffee
1
21
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash? Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
f17d2de491f4ec174ae77b59461eb8c9f823302c
675
https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash? Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (...
var Utils; Utils = {}; Utils.toString = Object.prototype.toString; Utils.isUndefined = function(value) { return value === 'undefined' || Utils.toString.call(value) === '[object Function]' || (value.hash != null); }; Utils.safeString = function(str) { return new Swag.Handlebars.SafeString(str); }; Utils.trim = ...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
f17d2de491f4ec174ae77b59461eb8c9f823302c
675
https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.toString = Object.prototype.toString; Utils.isUndefined = function(value) { return value === 'undefined' || Utils.toString.call(value) === '[object Function]' || (value.hash != null); }; Utils.safeString = function(str) { return...
Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash? Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
f17d2de491f4ec174ae77b59461eb8c9f823302c
675
https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash?
Utils.safeString = (str) -> new Swag.Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g str.toString().replace trim, ''
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
f17d2de491f4ec174ae77b59461eb8c9f823302c
675
https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:raw_corpus
raw_corpus
Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash? Utils.safeString = (str) -> new Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\x...
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash? Utils.safeString = (str) -> new Handlebars.SafeString str Utils.trim = (str) ...
var Utils; Utils = {}; Utils.toString = Object.prototype.toString; Utils.isUndefined = function(value) { return value === 'undefined' || Utils.toString.call(value) === '[object Function]' || (value.hash != null); }; Utils.safeString = function(str) { return new Handlebars.SafeString(str); }; Utils.trim = funct...
CoffeeScript
JavaScript
elving/swag
src/swag.utils.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = {}; Utils.toString = Object.prototype.toString; Utils.isUndefined = function(value) { return value === 'undefined' || Utils.toString.call(value) === '[object Function]' || (value.hash != null); }; Utils.safeString = function(str) { return...
Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash? Utils.safeString = (str) -> new Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\x...
JavaScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.utils.coffee
1
13
elving/swag:src/swag.utils.coffee:1:completion
completion
Utils = {} Utils.toString = Object.prototype.toString Utils.isUndefined = (value) -> value is 'undefined' or Utils.toString.call(value) is '[object Function]' or value.hash?
Utils.safeString = (str) -> new Handlebars.SafeString str Utils.trim = (str) -> trim = if /\S/.test("\xA0") then /^[\s\xA0]+|[\s\xA0]+$/g else /^\s+|\s+$/g str.toString().replace trim, ''
CoffeeScript
CoffeeScript
elving/swag
src/swag.utils.coffee
MIT
163af3a070eefe79a32c8239884929e0cae1f589
675
https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.utils.coffee
1
13
jianliaoim/talk-os:talk-web/test/pages/message-rich/index.coffee:1:raw_corpus
raw_corpus
React = require 'react' Immutable = require 'immutable' MessageRichFile = React.createFactory require '../../../client/module/message-rich-file' MessageRichImage = React.createFactory require '../../../client/module/message-rich-image' MessageRichQuote = React.createFactory require '../../../client/module/message-rich...
CoffeeScript
jianliaoim/talk-os
talk-web/test/pages/message-rich/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/message-rich/index.coffee
1
40
jianliaoim/talk-os:talk-web/test/pages/message-rich/index.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' Immutable = require 'immutable' MessageRichFile = React.createFactory require '../../../client/module/message-rich-file' MessageRichImage = React.createFactory require '../../../client/module/message-rich-image' MessageRichQuote = React.c...
var DATA, Immutable, MessageRichFile, MessageRichImage, MessageRichQuote, MessageRichRTF, MessageRichSpeech, React, div, fixtures, hr; React = require('react'); Immutable = require('immutable'); MessageRichFile = React.createFactory(require('../../../client/module/message-rich-file')); MessageRichImage = React.crea...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/test/pages/message-rich/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/message-rich/index.coffee
1
40
jianliaoim/talk-os:talk-web/test/pages/message-rich/index.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var DATA, Immutable, MessageRichFile, MessageRichImage, MessageRichQuote, MessageRichRTF, MessageRichSpeech, React, div, fixtures, hr; React = require('react'); Immutable = require('immutable'); MessageRichFile = React.createFactory(require('../../../client/modu...
React = require 'react' Immutable = require 'immutable' MessageRichFile = React.createFactory require '../../../client/module/message-rich-file' MessageRichImage = React.createFactory require '../../../client/module/message-rich-image' MessageRichQuote = React.createFactory require '../../../client/module/message-rich...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/pages/message-rich/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/message-rich/index.coffee
1
40
jianliaoim/talk-os:talk-web/test/pages/message-rich/index.coffee:1:completion
completion
React = require 'react' Immutable = require 'immutable' MessageRichFile = React.createFactory require '../../../client/module/message-rich-file' MessageRichImage = React.createFactory require '../../../client/module/message-rich-image' MessageRichQuote = React.createFactory require '../../../client/module/message-rich...
module.exports = React.createClass renderFixtures: -> fixtures.map (attachment, i) => div key: i, className: 'message-rich flex-horiz flex-vstart', div className: 'container flex-fill flex-vert', div className: 'body flex-vend flex-horiz', DATA[attachment.category] ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/test/pages/message-rich/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/test/pages/message-rich/index.coffee
1
40
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
@run = -> {print} = require 'sys' colors = {red: "\033[31m", redder: "\033[91m", green: "\033[32m", normal: "\033[0m"} printc = (color, str) -> print colors[color] + str + colors.normal [total, passed, failed, errors] = [0, [], [], []] for name, test of tests total++ try test.original_params =...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
7f4558420b0e5dc498b2e3e052b048796c37bf3a
1,245
https://github.com/mauricemach/coffeekup/blob/7f4558420b0e5dc498b2e3e052b048796c37bf3a/test.coffee
146
195
mauricemach/coffeekup:test.coffee:1:completion
completion
@run = -> {print} = require 'sys' colors = {red: "\033[31m", redder: "\033[91m", green: "\033[32m", normal: "\033[0m"} printc = (color, str) -> print colors[color] + str + colors.normal [total, passed, failed, errors] = [0, [], [], []] for name, test of tests total++ try test.original_params =...
test.result = ex errors.push name printc 'redder', "[Error] #{name}\n" print "\n#{total} tests, #{passed.length} passed, #{failed.length} failed, #{errors.length} errors\n\n" if failed.length > 0 printc 'red', "FAILED:\n\n" for name in failed t = tests[name] print "- #{name}:\n" ...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
7f4558420b0e5dc498b2e3e052b048796c37bf3a
1,245
https://github.com/mauricemach/coffeekup/blob/7f4558420b0e5dc498b2e3e052b048796c37bf3a/test.coffee
146
195
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype...
this.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype(); }); }); test('DOCTYPE', function() { re...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype...
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
test 'Self-closing tags', -> '<br />' is render(-> br()) and '<img src="icon.png" alt="Icon" />' is render -> img src: 'icon.png', alt: 'Icon' test 'Common tag', -> '<p>hi</p>' is render -> p 'hi' test 'Attributes', -> '<a href="/" title="Home"></a>' is render -> a href: '/', title: 'H...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
1
50
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
test 'CoffeeScript helper (string)', -> "<script type=\"text/coffeescript\">alert 'hi'</script>" is render -> coffeescript "alert 'hi'" test 'CoffeeScript helper (object)', -> "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" is render -> coffeescript src: 'script.coffee' te...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:completion
completion
test 'CoffeeScript helper (string)', -> "<script type=\"text/coffeescript\">alert 'hi'</script>" is render -> coffeescript "alert 'hi'" test 'CoffeeScript helper (object)', -> "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" is render -> coffeescript src: 'script.coffee' te...
attrs.name = attrs.id attrs.type = 'text' tag 'input', attrs '<input id="foo" name="foo" type="text" />' is render (-> textbox id: 'foo'), hardcode: {textbox: textbox} test 'Local vars', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj} obj.ping = 'pang' '<h1>pang...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
51
100
mauricemach/coffeekup:test.coffee:4:raw_corpus
raw_corpus
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name log "[OK]" else failed.push name log "[Failed]" catch ex errors.push name log "[Error] \"#{ex.message}\""
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
112
124
mauricemach/coffeekup:test.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name log "[OK]" else failed.push name log "[Failed]" catch ex errors.push name log "[Error] \"#{ex.message}\"" ```
var test; test = function(name, code) { var ex; tests.push(name); print(`Testing \"${name}\"... `); try { if (code()) { passed.push(name); return log("[OK]"); } else { failed.push(name); return log("[Failed]"); } } catch (error) { ex = error; errors.push(name); ...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
112
124
mauricemach/coffeekup:test.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test; test = function(name, code) { var ex; tests.push(name); print(`Testing \"${name}\"... `); try { if (code()) { passed.push(name); return log("[OK]"); } else { failed.push(name); return log("[Failed]"); } } cat...
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name log "[OK]" else failed.push name log "[Failed]" catch ex errors.push name log "[Error] \"#{ex.message}\""
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
112
124
mauricemach/coffeekup:test.coffee:4:completion
completion
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name
log "[OK]" else failed.push name log "[Failed]" catch ex errors.push name log "[Error] \"#{ex.message}\""
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e95426d64b3cd066eef78e2aec25c46d1ee71a93
1,245
https://github.com/mauricemach/coffeekup/blob/e95426d64b3cd066eef78e2aec25c46d1ee71a93/test.coffee
112
124
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
c0b14e6a7c167730de4df36b59bcc8a349eaf86c
1,245
https://github.com/mauricemach/coffeekup/blob/c0b14e6a7c167730de4df36b59bcc8a349eaf86c/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype...
this.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype(); }); }); test('DOCTYPE', function() { re...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
c0b14e6a7c167730de4df36b59bcc8a349eaf86c
1,245
https://github.com/mauricemach/coffeekup/blob/c0b14e6a7c167730de4df36b59bcc8a349eaf86c/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype...
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
c0b14e6a7c167730de4df36b59bcc8a349eaf86c
1,245
https://github.com/mauricemach/coffeekup/blob/c0b14e6a7c167730de4df36b59bcc8a349eaf86c/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
test 'Self-closing tags', -> '<br />' is render(-> br()) and '<img src="icon.png" alt="Icon" />' is render -> img src: 'icon.png', alt: 'Icon' test 'Common tag', -> '<p>hi</p>' is render -> p 'hi' test 'Attributes', -> '<a href="/" title="Home"></a>' is render -> a href: '/', title: 'H...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
c0b14e6a7c167730de4df36b59bcc8a349eaf86c
1,245
https://github.com/mauricemach/coffeekup/blob/c0b14e6a7c167730de4df36b59bcc8a349eaf86c/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript @run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype...
this.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype(); }); }); test('DOCTYPE', function() { re...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript this.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype...
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
test 'Self-closing tags', -> '<br />' is render(-> br()) and '<img src="icon.png" alt="Icon" />' is render -> img src: 'icon.png', alt: 'Icon' test 'Common tag', -> '<p>hi</p>' is render -> p 'hi' test 'Attributes', -> '<a href="/" title="Home"></a>' is render -> a href: '/', title: 'H...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
1
50
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
"<script type=\"text/coffeescript\">alert 'hi'</script>" is render -> coffeescript "alert 'hi'" test 'CoffeeScript helper (object)', -> "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" is render -> coffeescript src: 'script.coffee' test 'Context vars', -> '<h1>bar</h1>' is ...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript "<script type=\"text/coffeescript\">alert 'hi'</script>" is render -> coffeescript "alert 'hi'" test 'CoffeeScript helper (object)', -> "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" is render -> coffeescript src: 'script....
"<script type=\"text/coffeescript\">alert 'hi'</script>" === render(function() { return coffeescript("alert 'hi'"); }); test('CoffeeScript helper (object)', function() { return "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" === render(function() { return coffeescript({ src: 'script....
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript "<script type=\"text/coffeescript\">alert 'hi'</script>" === render(function() { return coffeescript("alert 'hi'"); }); test('CoffeeScript helper (object)', function() { return "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" === render(fun...
"<script type=\"text/coffeescript\">alert 'hi'</script>" is render -> coffeescript "alert 'hi'" test 'CoffeeScript helper (object)', -> "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" is render -> coffeescript src: 'script.coffee' test 'Context vars', -> '<h1>bar</h1>' is ...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:completion
completion
"<script type=\"text/coffeescript\">alert 'hi'</script>" is render -> coffeescript "alert 'hi'" test 'CoffeeScript helper (object)', -> "<script src=\"script.coffee\" type=\"text/coffeescript\"></script>" is render -> coffeescript src: 'script.coffee' test 'Context vars', -> '<h1>bar</h1>' is ...
attrs.type = 'text' tag 'input', attrs '<input id="foo" name="foo" type="text" />' is render (-> textbox id: 'foo'), hardcode: {textbox: textbox} test 'Local vars', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj} obj.ping = 'pang' '<h1>pang</h1>' is render (-> h1 obj....
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
81e965904baf61d95c472124556c539ca831fad9
1,245
https://github.com/mauricemach/coffeekup/blob/81e965904baf61d95c472124556c539ca831fad9/test.coffee
51
100
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
4817849cd77626c5197afda4778adfa106b1083e
1,245
https://github.com/mauricemach/coffeekup/blob/4817849cd77626c5197afda4778adfa106b1083e/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
@run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></custom>' i...
test 'Self-closing tags', -> '<br />' is render(-> br()) and '<img src="icon.png" alt="Icon" />' is render -> img src: 'icon.png', alt: 'Icon' test 'Common tag', -> '<p>hi</p>' is render -> p 'hi' test 'Attributes', -> '<a href="/" title="Home"></a>' is render -> a href: '/', title: 'H...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
4817849cd77626c5197afda4778adfa106b1083e
1,245
https://github.com/mauricemach/coffeekup/blob/4817849cd77626c5197afda4778adfa106b1083e/test.coffee
1
50
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), hardcode: {obj: obj} obj....
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
4817849cd77626c5197afda4778adfa106b1083e
1,245
https://github.com/mauricemach/coffeekup/blob/4817849cd77626c5197afda4778adfa106b1083e/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:completion
completion
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), hardcode: {obj: obj} obj....
attrs.type = 'text' tag 'input', attrs '<input id="foo" name="foo" type="text" />' is render (-> textbox id: 'foo'), hardcode: {textbox: textbox} test 'Local vars', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj} obj.ping = 'pang' '<h1>pang</h1>' is render (-> h1 obj....
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
4817849cd77626c5197afda4778adfa106b1083e
1,245
https://github.com/mauricemach/coffeekup/blob/4817849cd77626c5197afda4778adfa106b1083e/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), hardcoded: {obj: obj} obj...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
4a136d230f5dae3c9b87a612b0169609a54d44a5
1,245
https://github.com/mauricemach/coffeekup/blob/4a136d230f5dae3c9b87a612b0169609a54d44a5/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:completion
completion
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), hardcoded: {obj: obj} obj...
attrs.type = 'text' tag 'input', attrs '<input id="foo" name="foo" type="text" />' is render (-> textbox id: 'foo'), hardcoded: {textbox: textbox} test 'Local vars', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj} obj.ping = 'pang' '<h1>pang</h1>' is render (-> h1 obj...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
4a136d230f5dae3c9b87a612b0169609a54d44a5
1,245
https://github.com/mauricemach/coffeekup/blob/4a136d230f5dae3c9b87a612b0169609a54d44a5/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), context: {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), locals: {obj: obj} ...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
fec0a69979a355bac4a50d70c34d847fba10ac96
1,245
https://github.com/mauricemach/coffeekup/blob/fec0a69979a355bac4a50d70c34d847fba10ac96/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:completion
completion
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), context: {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), locals: {obj: obj} ...
tag 'input', attrs '<input id="foo" name="foo" type="text" />' is render (-> textbox id: 'foo'), locals: {textbox: textbox} test 'Local vars, dynamic', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj}, dynamic_locals: yes obj.ping = 'pang' '<h1>pang</h1>' is render (-> h1 obj.pi...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
fec0a69979a355bac4a50d70c34d847fba10ac96
1,245
https://github.com/mauricemach/coffeekup/blob/fec0a69979a355bac4a50d70c34d847fba10ac96/test.coffee
51
100
mauricemach/coffeekup:test.coffee:4:raw_corpus
raw_corpus
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] \"#{ex.message}\""
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
fec0a69979a355bac4a50d70c34d847fba10ac96
1,245
https://github.com/mauricemach/coffeekup/blob/fec0a69979a355bac4a50d70c34d847fba10ac96/test.coffee
109
121
mauricemach/coffeekup:test.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] \"#{ex.message}\"" ```
var test; test = function(name, code) { var ex; tests.push(name); print(`Testing \"${name}\"... `); try { if (code()) { passed.push(name); return puts("[OK]"); } else { failed.push(name); return puts("[Failed]"); } } catch (error) { ex = error; errors.push(name); ...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
fec0a69979a355bac4a50d70c34d847fba10ac96
1,245
https://github.com/mauricemach/coffeekup/blob/fec0a69979a355bac4a50d70c34d847fba10ac96/test.coffee
109
121
mauricemach/coffeekup:test.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test; test = function(name, code) { var ex; tests.push(name); print(`Testing \"${name}\"... `); try { if (code()) { passed.push(name); return puts("[OK]"); } else { failed.push(name); return puts("[Failed]"); } } c...
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] \"#{ex.message}\""
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
fec0a69979a355bac4a50d70c34d847fba10ac96
1,245
https://github.com/mauricemach/coffeekup/blob/fec0a69979a355bac4a50d70c34d847fba10ac96/test.coffee
109
121
mauricemach/coffeekup:test.coffee:4:completion
completion
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name
puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] \"#{ex.message}\""
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
fec0a69979a355bac4a50d70c34d847fba10ac96
1,245
https://github.com/mauricemach/coffeekup/blob/fec0a69979a355bac4a50d70c34d847fba10ac96/test.coffee
109
121
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></cus...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
41674ec9916e62abbd25ee83a2eac67775e02e69
1,245
https://github.com/mauricemach/coffeekup/blob/41674ec9916e62abbd25ee83a2eac67775e02e69/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Custom tag', -> '<custom></cus...
test 'Self-closing tags', -> '<br />' is render(-> br()) and '<img src="icon.png" alt="Icon" />' is render -> img src: 'icon.png', alt: 'Icon' test 'Common tag', -> '<p>hi</p>' is render -> p 'hi' test 'Attributes', -> '<a href="/" title="Home"></a>' is render -> a href: '/', title: 'H...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
41674ec9916e62abbd25ee83a2eac67775e02e69
1,245
https://github.com/mauricemach/coffeekup/blob/41674ec9916e62abbd25ee83a2eac67775e02e69/test.coffee
1
50
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), context: {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), locals: {obj: obj} ...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
c08ef3e7ddf4e8f8c4e7677c7cb5297d2d5cd872
1,245
https://github.com/mauricemach/coffeekup/blob/c08ef3e7ddf4e8f8c4e7677c7cb5297d2d5cd872/test.coffee
51
100
mauricemach/coffeekup:test.coffee:2:completion
completion
}); })();</script>""" is render -> coffeescript -> $(document).ready -> alert 'hi!' test 'Context vars', -> '<h1>bar</h1>' is render (-> h1 @foo), context: {foo: 'bar'} test 'Local vars, hard-coded', -> obj = foo: 'bar' render (-> h1 obj.foo), locals: {obj: obj} ...
tag 'input', attrs '<input id="foo" name="foo" type="text" />' is render (-> textbox id: 'foo'), locals: {textbox: textbox} test 'Local vars, dynamic', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj}, dynamic_locals: yes obj.ping = 'pang' '<h1>pang</h1>' is render (-> h1 obj.pi...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
c08ef3e7ddf4e8f8c4e7677c7cb5297d2d5cd872
1,245
https://github.com/mauricemach/coffeekup/blob/c08ef3e7ddf4e8f8c4e7677c7cb5297d2d5cd872/test.coffee
51
100
mauricemach/coffeekup:test.coffee:4:raw_corpus
raw_corpus
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] (#{ex.message})"
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
5399b605c4bb4d91e6f4ef1c505686e2b8715af6
1,245
https://github.com/mauricemach/coffeekup/blob/5399b605c4bb4d91e6f4ef1c505686e2b8715af6/test.coffee
107
119
mauricemach/coffeekup:test.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] (#{ex.message})" ```
var test; test = function(name, code) { var ex; tests.push(name); print(`Testing \"${name}\"... `); try { if (code()) { passed.push(name); return puts("[OK]"); } else { failed.push(name); return puts("[Failed]"); } } catch (error) { ex = error; errors.push(name); ...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
5399b605c4bb4d91e6f4ef1c505686e2b8715af6
1,245
https://github.com/mauricemach/coffeekup/blob/5399b605c4bb4d91e6f4ef1c505686e2b8715af6/test.coffee
107
119
mauricemach/coffeekup:test.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var test; test = function(name, code) { var ex; tests.push(name); print(`Testing \"${name}\"... `); try { if (code()) { passed.push(name); return puts("[OK]"); } else { failed.push(name); return puts("[Failed]"); } } c...
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] (#{ex.message})"
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
5399b605c4bb4d91e6f4ef1c505686e2b8715af6
1,245
https://github.com/mauricemach/coffeekup/blob/5399b605c4bb4d91e6f4ef1c505686e2b8715af6/test.coffee
107
119
mauricemach/coffeekup:test.coffee:4:completion
completion
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name
puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] (#{ex.message})"
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
5399b605c4bb4d91e6f4ef1c505686e2b8715af6
1,245
https://github.com/mauricemach/coffeekup/blob/5399b605c4bb4d91e6f4ef1c505686e2b8715af6/test.coffee
107
119
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Self-closing tags', -> '<br />...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
1707556810831093fb7e79b37dddd4809fd895ec
1,245
https://github.com/mauricemach/coffeekup/blob/1707556810831093fb7e79b37dddd4809fd895ec/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> ...
exports.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype(); }); }); test('DOCTYPE', function() { ...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
1707556810831093fb7e79b37dddd4809fd895ec
1,245
https://github.com/mauricemach/coffeekup/blob/1707556810831093fb7e79b37dddd4809fd895ec/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doct...
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Self-closing tags', -> '<br />...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
1707556810831093fb7e79b37dddd4809fd895ec
1,245
https://github.com/mauricemach/coffeekup/blob/1707556810831093fb7e79b37dddd4809fd895ec/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Self-closing tags', -> '<br />...
test 'HereDocs', -> "<script>$(document).ready(function(){\n alert('test');\n});</script>" is render -> script """ $(document).ready(function(){ alert('test'); }); """ test 'CoffeeScript', -> """ <script>;(function () { return $(document).ready(fun...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
1707556810831093fb7e79b37dddd4809fd895ec
1,245
https://github.com/mauricemach/coffeekup/blob/1707556810831093fb7e79b37dddd4809fd895ec/test.coffee
1
50
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
obj.foo = 'baz' '<h1>bar</h1>' is render (-> h1 obj.foo), locals: {obj: obj} test 'Local vars, hard-coded (functions)', -> '<h1>The sum is: 3</h1>' is render( -> h1 "The sum is: #{sum 1, 2}" locals: {sum: (a, b) -> a + b} ) test 'Local vars, hard-coded ("helpers")', -> textbox = (attrs...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
1707556810831093fb7e79b37dddd4809fd895ec
1,245
https://github.com/mauricemach/coffeekup/blob/1707556810831093fb7e79b37dddd4809fd895ec/test.coffee
51
93
mauricemach/coffeekup:test.coffee:2:completion
completion
obj.foo = 'baz' '<h1>bar</h1>' is render (-> h1 obj.foo), locals: {obj: obj} test 'Local vars, hard-coded (functions)', -> '<h1>The sum is: 3</h1>' is render( -> h1 "The sum is: #{sum 1, 2}" locals: {sum: (a, b) -> a + b} ) test 'Local vars, hard-coded ("helpers")', -> textbox = (attrs...
'<h1>pang</h1>' is render (-> h1 obj.ping), locals: {obj: obj}, dynamic_locals: yes test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' test 'Escaping', -> "<h1>&lt;script&gt;alert('&quot;pwned&quot; by c&amp;a &copy;')&lt;/script&gt;</h1>" is render -> h1 h("<script>alert('\"p...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
1707556810831093fb7e79b37dddd4809fd895ec
1,245
https://github.com/mauricemach/coffeekup/blob/1707556810831093fb7e79b37dddd4809fd895ec/test.coffee
51
93
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
obj.foo = 'baz' '<h1>bar</h1>' is render (-> h1 obj.foo), locals: {obj: obj} test 'Local vars, hard-coded (functions)', -> '<h1>The sum is: 3</h1>' is render( -> h1 "The sum is: #{sum 1, 2}" locals: {sum: (a, b) -> a + b} ) test 'Local vars, hard-coded ("helpers")', -> textbox = (attrs...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
094ac0e42a3cf6e21084808ff9580e6cf1ac8f45
1,245
https://github.com/mauricemach/coffeekup/blob/094ac0e42a3cf6e21084808ff9580e6cf1ac8f45/test.coffee
51
83
mauricemach/coffeekup:test.coffee:2:completion
completion
obj.foo = 'baz' '<h1>bar</h1>' is render (-> h1 obj.foo), locals: {obj: obj} test 'Local vars, hard-coded (functions)', -> '<h1>The sum is: 3</h1>' is render( -> h1 "The sum is: #{sum 1, 2}" locals: {sum: (a, b) -> a + b} ) test 'Local vars, hard-coded ("helpers")', -> textbox = (attrs...
test 'Local vars, dynamic', -> obj = ping: 'pong' render (-> h1 obj.ping), locals: {obj: obj}, dynamic_locals: yes obj.ping = 'pang' '<h1>pang</h1>' is render (-> h1 obj.ping), locals: {obj: obj}, dynamic_locals: yes test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' put...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
094ac0e42a3cf6e21084808ff9580e6cf1ac8f45
1,245
https://github.com/mauricemach/coffeekup/blob/094ac0e42a3cf6e21084808ff9580e6cf1ac8f45/test.coffee
51
83
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' te...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" en...
var render; render = require('coffeekup').render; exports.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === render(function() { return doctype...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var render; render = require('coffeekup').render; exports.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCT...
render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' te...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:completion
completion
render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' te...
a href: '/', title: 'Home' test 'HereDocs', -> "<script>$(document).ready(function(){\n alert('test');\n});</script>" is render -> script """ $(document).ready(function(){ alert('test'); }); """ test 'CoffeeScript', -> expected = """ <script>;(function () { ...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
1
50
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
tpl = -> h1 @foo ul -> li @ping '<h1>bar</h1><ul><li>pong</li></ul>' is render tpl, context: {foo: 'bar', ping: 'pong'} test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' puts "\nTests: #{tests.length} | Passed: #{passed.length} | Failed: #{failed.length} | Erro...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
51
78
mauricemach/coffeekup:test.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript tpl = -> h1 @foo ul -> li @ping '<h1>bar</h1><ul><li>pong</li></ul>' is render tpl, context: {foo: 'bar', ping: 'pong'} test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' puts "\nTests: #{tests.length} | P...
var errors, failed, passed, test, tests, tpl; tpl = function() { h1(this.foo); return ul(function() { return li(this.ping); }); }; '<h1>bar</h1><ul><li>pong</li></ul>' === render(tpl, { context: { foo: 'bar', ping: 'pong' } }); test('Comments', function() { return '<!--Comment-->' === render(...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
51
78
mauricemach/coffeekup:test.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var errors, failed, passed, test, tests, tpl; tpl = function() { h1(this.foo); return ul(function() { return li(this.ping); }); }; '<h1>bar</h1><ul><li>pong</li></ul>' === render(tpl, { context: { foo: 'bar', ping: 'pong' } }); test('Commen...
tpl = -> h1 @foo ul -> li @ping '<h1>bar</h1><ul><li>pong</li></ul>' is render tpl, context: {foo: 'bar', ping: 'pong'} test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' puts "\nTests: #{tests.length} | Passed: #{passed.length} | Failed: #{failed.length} | Erro...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
51
78
mauricemach/coffeekup:test.coffee:2:completion
completion
tpl = -> h1 @foo ul -> li @ping '<h1>bar</h1><ul><li>pong</li></ul>' is render tpl, context: {foo: 'bar', ping: 'pong'} test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' puts "\nTests: #{tests.length} | Passed: #{passed.length} | Failed: #{failed.length} | Erro...
test = (name, code) -> tests.push name print "Testing \"#{name}\"... " try if code() passed.push name puts "[OK]" else failed.push name puts "[Failed]" catch ex errors.push name puts "[Error] (#{ex.message})"
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39
1,245
https://github.com/mauricemach/coffeekup/blob/b380123baeb5b1f8b7bdfce9a09b8a0c2674cd39/test.coffee
51
78
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Self-closing tags', -> '<br />...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9
1,245
https://github.com/mauricemach/coffeekup/blob/e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9/test.coffee
3
52
mauricemach/coffeekup:test.coffee:1:completion
completion
exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' test 'Self-closing tags', -> '<br />...
test 'HereDocs', -> "<script>$(document).ready(function(){\n alert('test');\n});</script>" is render -> script """ $(document).ready(function(){ alert('test'); }); """ test 'CoffeeScript', -> expected = """ <script>(function () { return $(document)...
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9
1,245
https://github.com/mauricemach/coffeekup/blob/e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9/test.coffee
3
52
mauricemach/coffeekup:test.coffee:2:raw_corpus
raw_corpus
<ul><li>pong</li> </ul> """ tpl = -> h1 @foo ul -> li @ping expected is render tpl, context: {foo: 'bar', ping: 'pong'} test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' puts "\nTests: #{tests.length} | Passed: #{passed.length} | Failed: #{failed....
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9
1,245
https://github.com/mauricemach/coffeekup/blob/e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9/test.coffee
53
69
mauricemach/coffeekup:test.coffee:2:completion
completion
<ul><li>pong</li> </ul> """ tpl = -> h1 @foo ul -> li @ping
expected is render tpl, context: {foo: 'bar', ping: 'pong'} test 'Comments', -> '<!--Comment-->' is render -> comment 'Comment' puts "\nTests: #{tests.length} | Passed: #{passed.length} | Failed: #{failed.length} | Errors: #{errors.length}" [tests, passed, failed, errors] = [[], [], [], []]
CoffeeScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9
1,245
https://github.com/mauricemach/coffeekup/blob/e8c26125ef6fd3012291ce4173dd0ce1ff2c19f9/test.coffee
53
69
mauricemach/coffeekup:test.coffee:1:raw_corpus
raw_corpus
render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' te...
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
503d7d9371e28d42008ad988d36cf76cdc8a46b2
1,245
https://github.com/mauricemach/coffeekup/blob/503d7d9371e28d42008ad988d36cf76cdc8a46b2/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" en...
var errors, failed, passed, render, test, tests; render = require('coffeekup').render; exports.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCTYPE', function() { return '<!DOCTYPE html>' === ren...
CoffeeScript
JavaScript
mauricemach/coffeekup
test.coffee
MIT
503d7d9371e28d42008ad988d36cf76cdc8a46b2
1,245
https://github.com/mauricemach/coffeekup/blob/503d7d9371e28d42008ad988d36cf76cdc8a46b2/test.coffee
1
50
mauricemach/coffeekup:test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var errors, failed, passed, render, test, tests; render = require('coffeekup').render; exports.run = function() { test('Literal text', function() { return 'Just text' === render(function() { return text('Just text'); }); }); test('Default DOCT...
render = require('coffeekup').render exports.run = -> test 'Literal text', -> 'Just text' is render -> text 'Just text' test 'Default DOCTYPE', -> '<!DOCTYPE html>' is render -> doctype() test 'DOCTYPE', -> '<?xml version="1.0" encoding="utf-8" ?>' is render -> doctype 'xml' te...
JavaScript
CoffeeScript
mauricemach/coffeekup
test.coffee
MIT
503d7d9371e28d42008ad988d36cf76cdc8a46b2
1,245
https://github.com/mauricemach/coffeekup/blob/503d7d9371e28d42008ad988d36cf76cdc8a46b2/test.coffee
1
50