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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:raw_corpus | raw_corpus | _ = require("lodash")
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies(dir))... | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/finds-plugin-modules.coffee | 1 | 50 | ||
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require("lodash")
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.ex... | var _, descendantPluginCollector, fs, isLinemanPlugin, knownPluginFinder, packageDependencies, pluginObjectBuilder, plugins, prune, resolvesQuietly, semver, shallowestDepthAndHighestVersion;
_ = require("lodash");
resolvesQuietly = require('./../lib/resolves-quietly');
semver = require('semver');
fs = require('fs')... | CoffeeScript | JavaScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, descendantPluginCollector, fs, isLinemanPlugin, knownPluginFinder, packageDependencies, pluginObjectBuilder, plugins, prune, resolvesQuietly, semver, shallowestDepthAndHighestVersion;
_ = require("lodash");
resolvesQuietly = require('./../lib/resolves-quie... | _ = require("lodash")
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies(dir))... | JavaScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:completion | completion | _ = require("lodash")
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies(dir))... | pluginObjectBuilder = (dir, depth) ->
(name) ->
dir = resolvesQuietly.resolve(name, basedir: dir)
version = require("#{dir}/package").version
{name, version, dir, depth}
descendantPluginCollector = (depth, knownPlugins) ->
(deps, dep) ->
allDeps = knownPlugins.concat(deps)
known = _(allDeps).an... | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:2:raw_corpus | raw_corpus | .selectMin("depth")
.reduce (highest, plugin) ->
if semver.gt(plugin.version, highest.version) then plugin else highest
.value()
tidyUnion = (array, moreArrays...) ->
_(array).chain().union(moreArrays...).compact().value()
_.mixin
selectMin: (items, property) ->
min = _(items).chain().pluck(prop... | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/finds-plugin-modules.coffee | 51 | 62 | ||
linemanjs/lineman:lib/finds-plugin-modules.coffee:2:completion | completion | .selectMin("depth")
.reduce (highest, plugin) ->
if semver.gt(plugin.version, highest.version) then plugin else highest
.value()
tidyUnion = (array, moreArrays...) -> | _(array).chain().union(moreArrays...).compact().value()
_.mixin
selectMin: (items, property) ->
min = _(items).chain().pluck(property).min((val) -> val).value()
_(items).select (item) -> item[property] == min | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | da7b69982e44220bdd107798d86abc78749dc125 | 1,168 | https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/finds-plugin-modules.coffee | 51 | 62 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:raw_corpus | raw_corpus | _ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies... | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 2dad6f3ad4a84b1274114f617556b325bf0a0028 | 1,168 | https://github.com/linemanjs/lineman/blob/2dad6f3ad4a84b1274114f617556b325bf0a0028/lib/finds-plugin-modules.coffee | 1 | 50 | ||
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless... | var _, descendantPluginCollector, fs, isLinemanPlugin, knownPluginFinder, packageDependencies, pluginObjectBuilder, plugins, prune, resolvesQuietly, semver, shallowestDepthAndHighestVersion;
_ = require('grunt').util._;
resolvesQuietly = require('./../lib/resolves-quietly');
semver = require('semver');
fs = require... | CoffeeScript | JavaScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 2dad6f3ad4a84b1274114f617556b325bf0a0028 | 1,168 | https://github.com/linemanjs/lineman/blob/2dad6f3ad4a84b1274114f617556b325bf0a0028/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, descendantPluginCollector, fs, isLinemanPlugin, knownPluginFinder, packageDependencies, pluginObjectBuilder, plugins, prune, resolvesQuietly, semver, shallowestDepthAndHighestVersion;
_ = require('grunt').util._;
resolvesQuietly = require('./../lib/resolve... | _ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies... | JavaScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 2dad6f3ad4a84b1274114f617556b325bf0a0028 | 1,168 | https://github.com/linemanjs/lineman/blob/2dad6f3ad4a84b1274114f617556b325bf0a0028/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:completion | completion | _ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies... | pluginObjectBuilder = (dir, depth) ->
(name) ->
dir = resolvesQuietly.resolve(name, basedir: dir)
version = require("#{dir}/package").version
{name, version, dir, depth}
descendantPluginCollector = (depth, knownPlugins) ->
(deps, dep) ->
allDeps = knownPlugins.concat(deps)
known = _(allDeps).an... | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 2dad6f3ad4a84b1274114f617556b325bf0a0028 | 1,168 | https://github.com/linemanjs/lineman/blob/2dad6f3ad4a84b1274114f617556b325bf0a0028/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:raw_corpus | raw_corpus | _ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies... | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 33f0d060d207ab07e032da98f88fc6a478b3bcd6 | 1,168 | https://github.com/linemanjs/lineman/blob/33f0d060d207ab07e032da98f88fc6a478b3bcd6/lib/finds-plugin-modules.coffee | 1 | 50 | ||
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless... | var _, descendantPluginCollector, fs, isLinemanPlugin, knownPluginFinder, packageDependencies, pluginObjectBuilder, plugins, prune, resolvesQuietly, semver, shallowestDepthAndHighestVersion;
_ = require('grunt').util._;
resolvesQuietly = require('./../lib/resolves-quietly');
semver = require('semver');
fs = require... | CoffeeScript | JavaScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 33f0d060d207ab07e032da98f88fc6a478b3bcd6 | 1,168 | https://github.com/linemanjs/lineman/blob/33f0d060d207ab07e032da98f88fc6a478b3bcd6/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _, descendantPluginCollector, fs, isLinemanPlugin, knownPluginFinder, packageDependencies, pluginObjectBuilder, plugins, prune, resolvesQuietly, semver, shallowestDepthAndHighestVersion;
_ = require('grunt').util._;
resolvesQuietly = require('./../lib/resolve... | _ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies... | JavaScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 33f0d060d207ab07e032da98f88fc6a478b3bcd6 | 1,168 | https://github.com/linemanjs/lineman/blob/33f0d060d207ab07e032da98f88fc6a478b3bcd6/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:completion | completion | _ = require('grunt').util._
resolvesQuietly = require('./../lib/resolves-quietly')
semver = require('semver')
fs = require('fs')
module.exports =
find: ->
prune(plugins())
plugins = (dir = process.cwd(), depth = 0, knownPlugins = []) ->
return [] unless fs.existsSync(dir)
moduleNames = _(packageDependencies... | pluginObjectBuilder = (dir, depth) ->
(name) ->
dir = resolvesQuietly.resolve(name, basedir: dir)
version = require("#{dir}/package").version
{name, version, dir, depth}
descendantPluginCollector = (depth, knownPlugins) ->
(deps, dep) ->
allDeps = knownPlugins.concat(deps)
known = _(allDeps).fi... | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | 33f0d060d207ab07e032da98f88fc6a478b3bcd6 | 1,168 | https://github.com/linemanjs/lineman/blob/33f0d060d207ab07e032da98f88fc6a478b3bcd6/lib/finds-plugin-modules.coffee | 1 | 50 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:raw_corpus | raw_corpus | _ = require('grunt').util._
module.exports =
find: ->
packageJson = require("#{process.cwd()}/package.json")
moduleNames = _({}).
chain().
extend(packageJson.optionalDependencies, packageJson.devDependencies, packageJson.dependencies).
keys().
select (dep) ->
_.str.startsWith(... | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | c0d891164420dae9cddbd0d5e6cfc9ce0df3d618 | 1,168 | https://github.com/linemanjs/lineman/blob/c0d891164420dae9cddbd0d5e6cfc9ce0df3d618/lib/finds-plugin-modules.coffee | 1 | 12 | ||
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require('grunt').util._
module.exports =
find: ->
packageJson = require("#{process.cwd()}/package.json")
moduleNames = _({}).
chain().
extend(packageJson.optionalDependencies, packageJson.devDependencies, packageJson.dependencies).
... | var _;
_ = require('grunt').util._;
module.exports = {
find: function() {
var moduleNames, packageJson;
packageJson = require(`${process.cwd()}/package.json`);
return moduleNames = _({}).chain().extend(packageJson.optionalDependencies, packageJson.devDependencies, packageJson.dependencies).keys().select... | CoffeeScript | JavaScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | c0d891164420dae9cddbd0d5e6cfc9ce0df3d618 | 1,168 | https://github.com/linemanjs/lineman/blob/c0d891164420dae9cddbd0d5e6cfc9ce0df3d618/lib/finds-plugin-modules.coffee | 1 | 12 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('grunt').util._;
module.exports = {
find: function() {
var moduleNames, packageJson;
packageJson = require(`${process.cwd()}/package.json`);
return moduleNames = _({}).chain().extend(packageJson.optionalDependencies, packageJson.d... | _ = require('grunt').util._
module.exports =
find: ->
packageJson = require("#{process.cwd()}/package.json")
moduleNames = _({}).
chain().
extend(packageJson.optionalDependencies, packageJson.devDependencies, packageJson.dependencies).
keys().
select (dep) ->
_.str.startsWith(... | JavaScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | c0d891164420dae9cddbd0d5e6cfc9ce0df3d618 | 1,168 | https://github.com/linemanjs/lineman/blob/c0d891164420dae9cddbd0d5e6cfc9ce0df3d618/lib/finds-plugin-modules.coffee | 1 | 12 |
linemanjs/lineman:lib/finds-plugin-modules.coffee:1:completion | completion | _ = require('grunt').util._
module.exports =
find: ->
packageJson = require("#{process.cwd()}/package.json")
moduleNames = _({}). | chain().
extend(packageJson.optionalDependencies, packageJson.devDependencies, packageJson.dependencies).
keys().
select (dep) ->
_.str.startsWith(dep, "lineman-")
.value() | CoffeeScript | CoffeeScript | linemanjs/lineman | lib/finds-plugin-modules.coffee | MIT | c0d891164420dae9cddbd0d5e6cfc9ce0df3d618 | 1,168 | https://github.com/linemanjs/lineman/blob/c0d891164420dae9cddbd0d5e6cfc9ce0df3d618/lib/finds-plugin-modules.coffee | 1 | 12 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:1:raw_corpus | raw_corpus | $ ->
$demo = $("#demo")
duration = 5000
remaining = duration
tour = new Tour(
onStart: -> $demo.addClass "disabled", true
onEnd: -> $demo.removeClass "disabled", true
debug: true
steps: [
path: "/"
element: "#navbar"
placement: "bottom"
title: "Welcome to Bootstrap Tour!"... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:1:completion | completion | $ ->
$demo = $("#demo")
duration = 5000
remaining = duration
tour = new Tour(
onStart: -> $demo.addClass "disabled", true
onEnd: -> $demo.removeClass "disabled", true
debug: true
steps: [
path: "/"
element: "#navbar"
placement: "bottom"
title: "Welcome to Bootstrap Tour!"... | element: "#license"
placement: "top"
title: "Best of all, it's free!"
content: "Yeah! Free as in beer... or speech. Use and abuse, but don't forget to contribute!"
,
path: "/api"
element: "#options .page-header"
placement: "top"
title: "Flexibilty and expressiveness"
... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 1 | 50 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:2:raw_corpus | raw_corpus | path: "/api"
element: "#methods table"
placement: "top"
title: "A new shiny Backdrop option"
content: """
If you need to highlight the current step's element, activate the backdrop and you won't lose
focus anymore!
"""
backdrop: true
backdropPadding: 5
,
p... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 51 | 79 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:2:completion | completion | path: "/api"
element: "#methods table"
placement: "top"
title: "A new shiny Backdrop option"
content: """
If you need to highlight the current step's element, activate the backdrop and you won't lose
focus anymore!
"""
backdrop: true
backdropPadding: 5
,
p... | title: "Reflex mode"
content: "Reflex mode is enabled, click on the text in the cell to continue!"
reflex: true
,
path: "/api"
title: "And support for orphan steps"
content: """
If you activate the orphan property, the step(s) are shown centered in the page, and you can
for... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 51 | 79 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:raw_corpus | raw_corpus | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(document).on "click", "[data-demo]", (e) ->
e.preventD... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 81 | 93 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(d... | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert()(tour.ended() ? ($(document).on("click", "[data-demo]", function(e) {
e.preven... | CoffeeScript | JavaScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 81 | 93 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert()(tour.ended() ? ($(docume... | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(document).on "click", "[data-demo]", (e) ->
e.preventD... | JavaScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 81 | 93 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:completion | completion | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(document).on "click", "[data-demo]", (e) ->
e.preventD... | $(".alert").alert "close"
$(".gravatar").each ->
$this = $(@)
email = md5 $this.data "email"
$(@).attr "src", "http://www.gravatar.com/avatar/#{email}?s=60" | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | c501ce7ad1728050b0882bb9316f5c33df87f6a2 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/c501ce7ad1728050b0882bb9316f5c33df87f6a2/src/coffee/bootstrap-tour.docs.coffee | 81 | 93 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:1:raw_corpus | raw_corpus | $ ->
$demo = $("#demo")
duration = 5000
remaining = duration
tour = new Tour(
onStart: -> $demo.addClass "disabled", true
onEnd: -> $demo.removeClass "disabled", true
debug: true
steps: [
path: "/"
element: "#navbar"
placement: "bottom"
title: "Welcome to Bootstrap Tour!"... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | 555c4190bd21d313a2a6668ea31f2be4ea2e5d5e | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/555c4190bd21d313a2a6668ea31f2be4ea2e5d5e/src/coffee/bootstrap-tour.docs.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:1:completion | completion | $ ->
$demo = $("#demo")
duration = 5000
remaining = duration
tour = new Tour(
onStart: -> $demo.addClass "disabled", true
onEnd: -> $demo.removeClass "disabled", true
debug: true
steps: [
path: "/"
element: "#navbar"
placement: "bottom"
title: "Welcome to Bootstrap Tour!"... | element: "#license"
placement: "top"
title: "Best of all, it's free!"
content: "Yeah! Free as in beer... or speech. Use and abuse, but don't forget to contribute!"
,
path: "/api"
element: "#options"
placement: "top"
title: "Flexibilty and expressiveness"
content: """
... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | 555c4190bd21d313a2a6668ea31f2be4ea2e5d5e | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/555c4190bd21d313a2a6668ea31f2be4ea2e5d5e/src/coffee/bootstrap-tour.docs.coffee | 1 | 50 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:raw_corpus | raw_corpus | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(document).on "click", "[data-demo]", (e) ->
e.preventD... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | 555c4190bd21d313a2a6668ea31f2be4ea2e5d5e | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/555c4190bd21d313a2a6668ea31f2be4ea2e5d5e/src/coffee/bootstrap-tour.docs.coffee | 81 | 95 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(d... | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert()(tour.ended() ? ($(document).on("click", "[data-demo]", function(e) {
e.preven... | CoffeeScript | JavaScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | 555c4190bd21d313a2a6668ea31f2be4ea2e5d5e | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/555c4190bd21d313a2a6668ea31f2be4ea2e5d5e/src/coffee/bootstrap-tour.docs.coffee | 81 | 95 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert()(tour.ended() ? ($(docume... | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(document).on "click", "[data-demo]", (e) ->
e.preventD... | JavaScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | 555c4190bd21d313a2a6668ea31f2be4ea2e5d5e | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/555c4190bd21d313a2a6668ea31f2be4ea2e5d5e/src/coffee/bootstrap-tour.docs.coffee | 81 | 95 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:3:completion | completion | $('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert() if tour.ended()
$(document).on "click", "[data-demo]", (e) ->
e.preventD... | $("html").smoothScroll()
$(".gravatar").each ->
$this = $(@)
email = md5 $this.data "email"
$(@).attr "src", "http://www.gravatar.com/avatar/#{email}?s=60" | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | 555c4190bd21d313a2a6668ea31f2be4ea2e5d5e | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/555c4190bd21d313a2a6668ea31f2be4ea2e5d5e/src/coffee/bootstrap-tour.docs.coffee | 81 | 95 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:1:raw_corpus | raw_corpus | $ ->
$demo = $("#demo")
duration = 5000
remaining = duration
tour = new Tour(
onStart: -> $demo.addClass "disabled", true
onEnd: -> $demo.removeClass "disabled", true
debug: true
steps: [
path: "/"
element: "#demo"
placement: "bottom"
title: "Welcome to Bootstrap Tour!"
... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | b286bac4bdb597f6dcedc19f4571ad0450cfd737 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b286bac4bdb597f6dcedc19f4571ad0450cfd737/src/coffee/bootstrap-tour.docs.coffee | 1 | 50 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:1:completion | completion | $ ->
$demo = $("#demo")
duration = 5000
remaining = duration
tour = new Tour(
onStart: -> $demo.addClass "disabled", true
onEnd: -> $demo.removeClass "disabled", true
debug: true
steps: [
path: "/"
element: "#demo"
placement: "bottom"
title: "Welcome to Bootstrap Tour!"
... | element: "#license"
placement: "top"
title: "Best of all, it's free!"
content: "Yeah! Free as in beer... or speech. Use and abuse, but don't forget to contribute!"
,
path: "/api"
element: "#options"
placement: "top"
title: "Flexibilty and expressiveness"
content: """
... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | b286bac4bdb597f6dcedc19f4571ad0450cfd737 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b286bac4bdb597f6dcedc19f4571ad0450cfd737/src/coffee/bootstrap-tour.docs.coffee | 1 | 50 |
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:2:raw_corpus | raw_corpus | path: "/api"
element: "#methods table"
placement: "top"
title: "A new shiny Backdrop option"
content: """
If you need to highlight the current step's element, activate the backdrop and you won't lose
the focus anymore!
"""
backdrop: true
backdropPadding: 5
,
... | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | b286bac4bdb597f6dcedc19f4571ad0450cfd737 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b286bac4bdb597f6dcedc19f4571ad0450cfd737/src/coffee/bootstrap-tour.docs.coffee | 51 | 79 | ||
sorich87/bootstrap-tour:src/coffee/bootstrap-tour.docs.coffee:2:completion | completion | path: "/api"
element: "#methods table"
placement: "top"
title: "A new shiny Backdrop option"
content: """
If you need to highlight the current step's element, activate the backdrop and you won't lose
the focus anymore!
"""
backdrop: true
backdropPadding: 5
,
... | title: "Reflex mode"
content: "Reflex mode is enabled, click on the text in the cell to continue!"
reflex: true
,
path: "/api"
title: "And support for orphan steps"
content: """
If you activate the orphan property, the step(s) are shown centered in the page, and you can
for... | CoffeeScript | CoffeeScript | sorich87/bootstrap-tour | src/coffee/bootstrap-tour.docs.coffee | MIT | b286bac4bdb597f6dcedc19f4571ad0450cfd737 | 4,416 | https://github.com/sorich87/bootstrap-tour/blob/b286bac4bdb597f6dcedc19f4571ad0450cfd737/src/coffee/bootstrap-tour.docs.coffee | 51 | 79 |
elving/swag:test/strings_test.coffee:1:raw_corpus | raw_corpus | require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
Swag.registerHelpers Handlebars
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALLOWED ON TV"}}'
... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 1 | 44 | ||
elving/swag:test/strings_test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
Swag.registerHelpers Handlebars
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lo... | var Handlebars, Swag;
require('should');
Handlebars = require('handlebars');
Swag = require('../lib/swag');
Swag.registerHelpers(Handlebars);
describe('lowercase', function() {
return describe('{{lowercase string}}', function() {
return it('should return the string in lowercase', function() {
var sourc... | CoffeeScript | JavaScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 1 | 44 |
elving/swag:test/strings_test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Handlebars, Swag;
require('should');
Handlebars = require('handlebars');
Swag = require('../lib/swag');
Swag.registerHelpers(Handlebars);
describe('lowercase', function() {
return describe('{{lowercase string}}', function() {
return it('should return... | require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
Swag.registerHelpers Handlebars
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALLOWED ON TV"}}'
... | JavaScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 1 | 44 |
elving/swag:test/strings_test.coffee:1:completion | completion | require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
Swag.registerHelpers Handlebars
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALLOWED ON TV"}}'
... | describe 'capitalizeFirst', ->
describe '{{capitalizeFirst string}}', ->
it 'should return the string with the first word capitalized.', ->
source = '{{capitalizeFirst "bender should not be allowed on tv"}}'
template = Handlebars.compile(source)
template().should.equal... | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 1 | 44 |
elving/swag:test/strings_test.coffee:2:raw_corpus | raw_corpus | template().should.equal 'Bender Should Not Be Allowed On Tv'
it 'should return empty string when string contains no words.', ->
source = '{{titleize "..."}}'
template = Handlebars.compile(source)
template().should.equal ''
describe 'sentence', ->
describe '{{sentence... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 46 | 89 | ||
elving/swag:test/strings_test.coffee:2:completion | completion | template().should.equal 'Bender Should Not Be Allowed On Tv'
it 'should return empty string when string contains no words.', ->
source = '{{titleize "..."}}'
template = Handlebars.compile(source)
template().should.equal ''
describe 'sentence', ->
describe '{{sentence... | template().should.equal '.VT no dewolla eb TON dluohs redneb'
describe 'truncate', ->
describe '{{truncate string 31}}', ->
it 'should return then string truncated by a specified length.', ->
source = '{{truncate "Bender should not be allowed on tv." 31}}'
template = Handlebars.co... | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 46 | 89 |
elving/swag:test/strings_test.coffee:3:raw_corpus | raw_corpus | template().should.equal '&nbsp;&nbsp;Bender should not be allowed on tv.&nbsp;&nbsp;'
describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n no... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 91 | 114 | ||
elving/swag:test/strings_test.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
template().should.equal '&nbsp;&nbsp;Bender should not be allowed on tv.&nbsp;&nbsp;'
describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
... | template().should.equal('&nbsp;&nbsp;Bender should not be allowed on tv.&nbsp;&nbsp;');
describe('newLineToBr', function() {
return describe('{{newLineToBr string}}', function() {
return it('should return the string with new line characters converted to <br>.', function() {
var source, temp... | CoffeeScript | JavaScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 91 | 114 |
elving/swag:test/strings_test.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
template().should.equal('&nbsp;&nbsp;Bender should not be allowed on tv.&nbsp;&nbsp;');
describe('newLineToBr', function() {
return describe('{{newLineToBr string}}', function() {
return it('should return the string with new line characters c... | template().should.equal '&nbsp;&nbsp;Bender should not be allowed on tv.&nbsp;&nbsp;'
describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n no... | JavaScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 91 | 114 |
elving/swag:test/strings_test.coffee:3:completion | completion | template().should.equal '&nbsp;&nbsp;Bender should not be allowed on tv.&nbsp;&nbsp;'
describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n no... | it 'should sanitize the string for safe use in urls and file names', ->
source = '{{sanitize "Sex & The City 2"}}'
template = Handlebars.compile(source)
template().should.equal 'Sex---The-City-2'
describe '{{sanitize string \'#\'}}', ->
it 'should sanitize the string ... | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/test/strings_test.coffee | 91 | 114 |
elving/swag:test/strings_test.coffee:2:raw_corpus | raw_corpus | template().should.equal 'Bender Should Not Be Allowed On Tv'
describe 'sentence', ->
describe '{{sentence string}}', ->
it 'should capitalize the first word of each sentence in a string and convert the rest of the sentence to lowercase.', ->
source = '{{sentence "bender should NOT be allowed ... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 46 | 85 | ||
elving/swag:test/strings_test.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
template().should.equal 'Bender Should Not Be Allowed On Tv'
describe 'sentence', ->
describe '{{sentence string}}', ->
it 'should capitalize the first word of each sentence in a string and convert the rest of the sentence to lowercase.', ->
... | template().should.equal('Bender Should Not Be Allowed On Tv');
describe('sentence', function() {
return describe('{{sentence string}}', function() {
return it('should capitalize the first word of each sentence in a string and convert the rest of the sentence to lowercase.', function() {
var source, templat... | CoffeeScript | JavaScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 46 | 85 |
elving/swag:test/strings_test.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
template().should.equal('Bender Should Not Be Allowed On Tv');
describe('sentence', function() {
return describe('{{sentence string}}', function() {
return it('should capitalize the first word of each sentence in a string and convert the rest of the sentence... | template().should.equal 'Bender Should Not Be Allowed On Tv'
describe 'sentence', ->
describe '{{sentence string}}', ->
it 'should capitalize the first word of each sentence in a string and convert the rest of the sentence to lowercase.', ->
source = '{{sentence "bender should NOT be allowed ... | JavaScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 46 | 85 |
elving/swag:test/strings_test.coffee:2:completion | completion | template().should.equal 'Bender Should Not Be Allowed On Tv'
describe 'sentence', ->
describe '{{sentence string}}', ->
it 'should capitalize the first word of each sentence in a string and convert the rest of the sentence to lowercase.', ->
source = '{{sentence "bender should NOT be allowed ... | it 'should return then string truncated by a specified length.', ->
source = '{{truncate "Bender should not be allowed on tv." 31}}'
template = Handlebars.compile(source)
template().should.equal 'Bender should not be allowed on'
describe '{{truncate string 31 "..."}}', ->
... | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 46 | 85 |
elving/swag:test/strings_test.coffee:3:raw_corpus | raw_corpus | describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
template = Handlebars.compile(source)
template().s... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 87 | 108 | ||
elving/swag:test/strings_test.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
templa... | describe('newLineToBr', function() {
return describe('{{newLineToBr string}}', function() {
return it('should return the string with new line characters converted to <br>.', function() {
var source, template;
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}';
template =... | CoffeeScript | JavaScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 87 | 108 |
elving/swag:test/strings_test.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('newLineToBr', function() {
return describe('{{newLineToBr string}}', function() {
return it('should return the string with new line characters converted to <br>.', function() {
var source, template;
source = '{{{newLineToBr "Bender \n sh... | describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
template = Handlebars.compile(source)
template().s... | JavaScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 87 | 108 |
elving/swag:test/strings_test.coffee:3:completion | completion | describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
template = Handlebars.compile(source)
template().s... | source = '{{sanitize "Sex & The City 2"}}'
template = Handlebars.compile(source)
template().should.equal 'Sex---The-City-2'
describe '{{sanitize string \'#\'}}', ->
it 'should sanitize the string for safe use in urls and file names', ->
source = '{{sanitize "Sex & T... | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | a6db80b90ed909077882eec0c614fdf120f7d96c | 675 | https://github.com/elving/swag/blob/a6db80b90ed909077882eec0c614fdf120f7d96c/test/strings_test.coffee | 87 | 108 |
elving/swag:test/strings_test.coffee:3:raw_corpus | raw_corpus | describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
template = Handlebars.compile(source)
template().s... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/test/strings_test.coffee | 87 | 93 | ||
elving/swag:test/strings_test.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
templa... | describe('newLineToBr', function() {
return describe('{{newLineToBr string}}', function() {
return it('should return the string with new line characters converted to <br>.', function() {
var source, template;
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}';
template =... | CoffeeScript | JavaScript | elving/swag | test/strings_test.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/test/strings_test.coffee | 87 | 93 |
elving/swag:test/strings_test.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('newLineToBr', function() {
return describe('{{newLineToBr string}}', function() {
return it('should return the string with new line characters converted to <br>.', function() {
var source, template;
source = '{{{newLineToBr "Bender \n sh... | describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', ->
source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
template = Handlebars.compile(source)
template().s... | JavaScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/test/strings_test.coffee | 87 | 93 |
elving/swag:test/strings_test.coffee:3:completion | completion | describe 'newLineToBr', ->
describe '{{newLineToBr string}}', ->
it 'should return the string with new line characters converted to <br>.', -> | source = '{{{newLineToBr "Bender \n should \n not \n be allowed on tv."}}}'
template = Handlebars.compile(source)
template().should.equal 'Bender <br> should <br> not <br> be allowed on tv.' | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/test/strings_test.coffee | 87 | 93 |
elving/swag:test/strings_test.coffee:1:raw_corpus | raw_corpus | require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALLOWED ON TV"}}'
template = Handlebars.compile(... | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | 7a54eca2cf759afeea28d5357526391d54d3b5e6 | 675 | https://github.com/elving/swag/blob/7a54eca2cf759afeea28d5357526391d54d3b5e6/test/strings_test.coffee | 1 | 42 | ||
elving/swag:test/strings_test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALL... | var Handlebars, Swag;
require('should');
Handlebars = require('handlebars');
Swag = require('../lib/swag');
describe('lowercase', function() {
return describe('{{lowercase string}}', function() {
return it('should return the string in lowercase', function() {
var source, template;
source = '{{lowe... | CoffeeScript | JavaScript | elving/swag | test/strings_test.coffee | MIT | 7a54eca2cf759afeea28d5357526391d54d3b5e6 | 675 | https://github.com/elving/swag/blob/7a54eca2cf759afeea28d5357526391d54d3b5e6/test/strings_test.coffee | 1 | 42 |
elving/swag:test/strings_test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Handlebars, Swag;
require('should');
Handlebars = require('handlebars');
Swag = require('../lib/swag');
describe('lowercase', function() {
return describe('{{lowercase string}}', function() {
return it('should return the string in lowercase', function... | require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALLOWED ON TV"}}'
template = Handlebars.compile(... | JavaScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | 7a54eca2cf759afeea28d5357526391d54d3b5e6 | 675 | https://github.com/elving/swag/blob/7a54eca2cf759afeea28d5357526391d54d3b5e6/test/strings_test.coffee | 1 | 42 |
elving/swag:test/strings_test.coffee:1:completion | completion | require 'should'
Handlebars = require 'handlebars'
Swag = require '../lib/swag'
describe 'lowercase', ->
describe '{{lowercase string}}', ->
it 'should return the string in lowercase', ->
source = '{{lowercase "BENDER SHOULD NOT BE ALLOWED ON TV"}}'
template = Handlebars.compile(... | describe 'capitalizeFirst', ->
describe '{{capitalizeFirst string}}', ->
it 'should return the string with the first word capitalized.', ->
source = '{{capitalizeFirst "bender should not be allowed on tv"}}'
template = Handlebars.compile(source)
template().should.equal... | CoffeeScript | CoffeeScript | elving/swag | test/strings_test.coffee | MIT | 7a54eca2cf759afeea28d5357526391d54d3b5e6 | 675 | https://github.com/elving/swag/blob/7a54eca2cf759afeea28d5357526391d54d3b5e6/test/strings_test.coffee | 1 | 42 |
JoelBesada/activate-power-mode:lib/screen-flash.coffee:1:raw_corpus | raw_corpus | module.exports =
flash: (editorElement) ->
normalBG = editorElement.style.background
c = @getConfig "color"
editorElement.style.background = "rgb(#{c.red},#{c.green},#{c.blue})"
setTimeout ->
editorElement.style.background = normalBG
, @getConfig "duration"
getConfig: (config) ->
atom... | CoffeeScript | JoelBesada/activate-power-mode | lib/screen-flash.coffee | MIT | 67dba5d3011bc0b712d65ba4c430d31e6443716a | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/67dba5d3011bc0b712d65ba4c430d31e6443716a/lib/screen-flash.coffee | 1 | 11 | ||
JoelBesada/activate-power-mode:lib/screen-flash.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports =
flash: (editorElement) ->
normalBG = editorElement.style.background
c = @getConfig "color"
editorElement.style.background = "rgb(#{c.red},#{c.green},#{c.blue})"
setTimeout ->
editorElement.style.background = normalBG
,... | module.exports = {
flash: function(editorElement) {
var c, normalBG;
normalBG = editorElement.style.background;
c = this.getConfig("color");
editorElement.style.background = `rgb(${c.red},${c.green},${c.blue})`;
return setTimeout(function() {
return editorElement.style.background = normalBG;... | CoffeeScript | JavaScript | JoelBesada/activate-power-mode | lib/screen-flash.coffee | MIT | 67dba5d3011bc0b712d65ba4c430d31e6443716a | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/67dba5d3011bc0b712d65ba4c430d31e6443716a/lib/screen-flash.coffee | 1 | 11 |
JoelBesada/activate-power-mode:lib/screen-flash.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = {
flash: function(editorElement) {
var c, normalBG;
normalBG = editorElement.style.background;
c = this.getConfig("color");
editorElement.style.background = `rgb(${c.red},${c.green},${c.blue})`;
return setTimeout(function() {
... | module.exports =
flash: (editorElement) ->
normalBG = editorElement.style.background
c = @getConfig "color"
editorElement.style.background = "rgb(#{c.red},#{c.green},#{c.blue})"
setTimeout ->
editorElement.style.background = normalBG
, @getConfig "duration"
getConfig: (config) ->
atom... | JavaScript | CoffeeScript | JoelBesada/activate-power-mode | lib/screen-flash.coffee | MIT | 67dba5d3011bc0b712d65ba4c430d31e6443716a | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/67dba5d3011bc0b712d65ba4c430d31e6443716a/lib/screen-flash.coffee | 1 | 11 |
JoelBesada/activate-power-mode:lib/screen-flash.coffee:1:completion | completion | module.exports =
flash: (editorElement) ->
normalBG = editorElement.style.background
c = @getConfig "color"
editorElement.style.background = "rgb(#{c.red},#{c.green},#{c.blue})" | setTimeout ->
editorElement.style.background = normalBG
, @getConfig "duration"
getConfig: (config) ->
atom.config.get "activate-power-mode.screenFlash.#{config}" | CoffeeScript | CoffeeScript | JoelBesada/activate-power-mode | lib/screen-flash.coffee | MIT | 67dba5d3011bc0b712d65ba4c430d31e6443716a | 3,570 | https://github.com/JoelBesada/activate-power-mode/blob/67dba5d3011bc0b712d65ba4c430d31e6443716a/lib/screen-flash.coffee | 1 | 11 |
abe33/atom-pigments:spec/helpers/events.coffee:1:raw_corpus | raw_corpus | event = (type, properties={}) -> new Event type, properties
mouseEvent = (type, properties) ->
defaults = {
bubbles: true
cancelable: (type isnt "mousemove")
view: window
detail: 0
pageX: 0
pageY: 0
clientX: 0
clientY: 0
ctrlKey: false
altKey: false
shiftKey: false
met... | CoffeeScript | abe33/atom-pigments | spec/helpers/events.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/events.coffee | 1 | 45 | ||
abe33/atom-pigments:spec/helpers/events.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
event = (type, properties={}) -> new Event type, properties
mouseEvent = (type, properties) ->
defaults = {
bubbles: true
cancelable: (type isnt "mousemove")
view: window
detail: 0
pageX: 0
pageY: 0
clientX: 0
clientY: 0
ctr... | var event, mouseEvent, objectCenterCoordinates;
event = function(type, properties = {}) {
return new Event(type, properties);
};
mouseEvent = function(type, properties) {
var defaults, k, v;
defaults = {
bubbles: true,
cancelable: type !== "mousemove",
view: window,
detail: 0,
pageX: 0,
... | CoffeeScript | JavaScript | abe33/atom-pigments | spec/helpers/events.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/events.coffee | 1 | 45 |
abe33/atom-pigments:spec/helpers/events.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var event, mouseEvent, objectCenterCoordinates;
event = function(type, properties = {}) {
return new Event(type, properties);
};
mouseEvent = function(type, properties) {
var defaults, k, v;
defaults = {
bubbles: true,
cancelable: type !== "mousemov... | event = (type, properties={}) -> new Event type, properties
mouseEvent = (type, properties) ->
defaults = {
bubbles: true
cancelable: (type isnt "mousemove")
view: window
detail: 0
pageX: 0
pageY: 0
clientX: 0
clientY: 0
ctrlKey: false
altKey: false
shiftKey: false
met... | JavaScript | CoffeeScript | abe33/atom-pigments | spec/helpers/events.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/events.coffee | 1 | 45 |
abe33/atom-pigments:spec/helpers/events.coffee:1:completion | completion | event = (type, properties={}) -> new Event type, properties
mouseEvent = (type, properties) ->
defaults = {
bubbles: true
cancelable: (type isnt "mousemove")
view: window
detail: 0
pageX: 0
pageY: 0
clientX: 0
clientY: 0
ctrlKey: false
altKey: false
shiftKey: false
met... | new MouseEvent type, properties
objectCenterCoordinates = (target) ->
{top, left, width, height} = target.getBoundingClientRect()
{x: left + width / 2, y: top + height / 2}
module.exports = {objectCenterCoordinates, mouseEvent, event}
['mousedown', 'mousemove', 'mouseup', 'click'].forEach (key) ->
module.expor... | CoffeeScript | CoffeeScript | abe33/atom-pigments | spec/helpers/events.coffee | MIT | 4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4 | 518 | https://github.com/abe33/atom-pigments/blob/4bdef2e1ebeaa492a6c353c2fd9e7adecdebadf4/spec/helpers/events.coffee | 1 | 45 |
xhan/qqbot:plugins/api.coffee:2:raw_corpus | raw_corpus | class APIServer
constructor:(@qqbot)->
config = @qqbot.config
@http_server = null
[@port, @token] = [config.api_port, config.api_token]
start: ->
@http_server = @create_server(@port)
stop: ->
@http_server.close() if @http_server
@http_server = null
create_server: (port)->
server = ... | CoffeeScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 58 | 107 | ||
xhan/qqbot:plugins/api.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
class APIServer
constructor:(@qqbot)->
config = @qqbot.config
@http_server = null
[@port, @token] = [config.api_port, config.api_token]
start: ->
@http_server = @create_server(@port)
stop: ->
@http_server.close() if @http_server
@ht... | var APIServer;
APIServer = class APIServer {
constructor(qqbot) {
var config;
this.qqbot = qqbot;
config = this.qqbot.config;
this.http_server = null;
[this.port, this.token] = [config.api_port, config.api_token];
}
start() {
return this.http_server = this.create_server(this.port);
}
... | CoffeeScript | JavaScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 58 | 107 |
xhan/qqbot:plugins/api.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var APIServer;
APIServer = class APIServer {
constructor(qqbot) {
var config;
this.qqbot = qqbot;
config = this.qqbot.config;
this.http_server = null;
[this.port, this.token] = [config.api_port, config.api_token];
}
start() {
return ... | class APIServer
constructor:(@qqbot)->
config = @qqbot.config
@http_server = null
[@port, @token] = [config.api_port, config.api_token]
start: ->
@http_server = @create_server(@port)
stop: ->
@http_server.close() if @http_server
@http_server = null
create_server: (port)->
server = ... | JavaScript | CoffeeScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 58 | 107 |
xhan/qqbot:plugins/api.coffee:2:completion | completion | class APIServer
constructor:(@qqbot)->
config = @qqbot.config
@http_server = null
[@port, @token] = [config.api_port, config.api_token]
start: ->
@http_server = @create_server(@port)
stop: ->
@http_server.close() if @http_server
@http_server = null
create_server: (port)->
server = ... | server.listen port
log.info 'api server started at port',port
return server
handle_request: (req,res,path,params)->
res.endjson = (dict={})->
ret_dict =
err: 0
msg: 'ok'
for key,value of dict
ret_dict[key] = value
res.writeHead 200
res.end jsons ret_dict
... | CoffeeScript | CoffeeScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 58 | 107 |
xhan/qqbot:plugins/api.coffee:3:raw_corpus | raw_corpus | on_stdin : (req,res,params)->
value = params.value.trim()
log.info 'stdin value',value
process.emit 'data', value
res.endjson()
on_reload_plugin : (req,res,params)->
res.endjson {err:1, msg:"method unimplemented"}
on_sendmsg : (req,res,params)->
log.info "will send #{params.type} #{params.... | CoffeeScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 108 | 154 | ||
xhan/qqbot:plugins/api.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
on_stdin : (req,res,params)->
value = params.value.trim()
log.info 'stdin value',value
process.emit 'data', value
res.endjson()
on_reload_plugin : (req,res,params)->
res.endjson {err:1, msg:"method unimplemented"}
on_sendmsg : (req,res,p... | ({
on_stdin: function(req, res, params) {
var value;
value = params.value.trim();
log.info('stdin value', value);
process.emit('data', value);
return res.endjson();
},
on_reload_plugin: function(req, res, params) {
return res.endjson({
err: 1,
msg: "method unimplemented"
})... | CoffeeScript | JavaScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 108 | 154 |
xhan/qqbot:plugins/api.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
on_stdin: function(req, res, params) {
var value;
value = params.value.trim();
log.info('stdin value', value);
process.emit('data', value);
return res.endjson();
},
on_reload_plugin: function(req, res, params) {
return res.endjson({... | on_stdin : (req,res,params)->
value = params.value.trim()
log.info 'stdin value',value
process.emit 'data', value
res.endjson()
on_reload_plugin : (req,res,params)->
res.endjson {err:1, msg:"method unimplemented"}
on_sendmsg : (req,res,params)->
log.info "will send #{params.type} #{params.... | JavaScript | CoffeeScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 108 | 154 |
xhan/qqbot:plugins/api.coffee:3:completion | completion | on_stdin : (req,res,params)->
value = params.value.trim()
log.info 'stdin value',value
process.emit 'data', value
res.endjson()
on_reload_plugin : (req,res,params)->
res.endjson {err:1, msg:"method unimplemented"}
on_sendmsg : (req,res,params)->
log.info "will send #{params.type} #{params.... | res.endjson resp_ret
else if params.type == 'discuss'
discuss_group = @qqbot.get_dgroup {name:params.to}
unless discuss_group
res.endjson {err:501, msg:"can't find discuss by name #{params.to}"}
return
@qqbot.send_message_to_discuss discuss_group.did, params.msg, (ret,e)->
... | CoffeeScript | CoffeeScript | xhan/qqbot | plugins/api.coffee | MIT | 9247a1c7d98c89603f75a0234bd72d685554d5f3 | 1,435 | https://github.com/xhan/qqbot/blob/9247a1c7d98c89603f75a0234bd72d685554d5f3/plugins/api.coffee | 108 | 154 |
elving/swag:src/swag.html.coffee:1:raw_corpus | raw_corpus | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</u... | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.html.coffee | 1 | 28 | ||
elving/swag:src/swag.html.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{opt... | var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.addHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.hash)}>` + context.map(function(item) {
return `<li>$... | CoffeeScript | JavaScript | elving/swag | src/swag.html.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.addHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.ha... | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</u... | JavaScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:completion | completion | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</u... | "<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</ol>"
Swag.addHelper 'br', (count, options) ->
br = '<br>'
unless Utils.isUndefined count
i = 0
while i < (parseFloat count) - 1
br += '<br>'
i++
Utils.safeString br | CoffeeScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | e9c8788dfc9f640038c00eaafe33f4137ff5f465 | 675 | https://github.com/elving/swag/blob/e9c8788dfc9f640038c00eaafe33f4137ff5f465/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:raw_corpus | raw_corpus | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</u... | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1 | 675 | https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.html.coffee | 1 | 29 | ||
elving/swag:src/swag.html.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{opt... | var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.addHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.hash)}>` + context.map(function(item) {
return `<li>$... | CoffeeScript | JavaScript | elving/swag | src/swag.html.coffee | MIT | 3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1 | 675 | https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.html.coffee | 1 | 29 |
elving/swag:src/swag.html.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.addHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.ha... | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</u... | JavaScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1 | 675 | https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.html.coffee | 1 | 29 |
elving/swag:src/swag.html.coffee:1:completion | completion | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</u... | "<li>#{options.fn(Utils.result item)}</li>"
).join('\n') + "</ol>"
Swag.addHelper 'br', (count, options) ->
br = '<br>'
unless Utils.isUndefined count
i = 0
count = Utils.result count
while i < (parseFloat count) - 1
br += '<br>'
i++
Utils.safeString b... | CoffeeScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1 | 675 | https://github.com/elving/swag/blob/3a5249a04c2d7c27acb8834dc3e31ae0f56ccfd1/src/swag.html.coffee | 1 | 29 |
elving/swag:src/swag.html.coffee:1:raw_corpus | raw_corpus | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>"
Swag.add... | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.html.coffee | 1 | 28 | ||
elving/swag:src/swag.html.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{opt... | var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.addHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.hash)}>` + context.map(function(item) {
return `<li>$... | CoffeeScript | JavaScript | elving/swag | src/swag.html.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.addHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.ha... | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>"
Swag.add... | JavaScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:completion | completion | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.addHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>"
Swag.add... | "<li>#{options.fn(item)}</li>"
).join('\n') + "</ol>"
Swag.addHelper 'br', (count, options) ->
br = '<br>'
unless Utils.isUndefined count
i = 0
while i < count - 1
br += '<br>'
i++
Utils.safeString br | CoffeeScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | f17d2de491f4ec174ae77b59461eb8c9f823302c | 675 | https://github.com/elving/swag/blob/f17d2de491f4ec174ae77b59461eb8c9f823302c/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:raw_corpus | raw_corpus | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>"
Swa... | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17 | 675 | https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.html.coffee | 1 | 28 | ||
elving/swag:src/swag.html.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>... | var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.registerHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.hash)}>` + context.map(function(item) {
return `... | CoffeeScript | JavaScript | elving/swag | src/swag.html.coffee | MIT | 65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17 | 675 | https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Swag.registerHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(optio... | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>"
Swa... | JavaScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17 | 675 | https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:completion | completion | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Swag.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>"
Swa... | "<li>#{options.fn(item)}</li>"
).join('\n') + "</ol>"
Swag.registerHelper 'br', (count, options) ->
br = '<br>'
unless Utils.isUndefined count
i = 0
while i < count - 1
br += '<br>'
i++
Utils.safeString br | CoffeeScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17 | 675 | https://github.com/elving/swag/blob/65fa361b1dbaa9c28ca8dbf5cad24d741f96ff17/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:raw_corpus | raw_corpus | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Handlebars.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>... | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 163af3a070eefe79a32c8239884929e0cae1f589 | 675 | https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.html.coffee | 1 | 28 | ||
elving/swag:src/swag.html.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Handlebars.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
... | var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Handlebars.registerHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes(options.hash)}>` + context.map(function(item) {
re... | CoffeeScript | JavaScript | elving/swag | src/swag.html.coffee | MIT | 163af3a070eefe79a32c8239884929e0cae1f589 | 675 | https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var HTML;
HTML = {};
HTML.parseAttributes = function(hash) {
return Object.keys(hash).map(function(key) {
return `${key}=\"${hash[key]}\"`;
}).join(' ');
};
Handlebars.registerHelper('ul', function(context, options) {
return `<ul ${HTML.parseAttributes... | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Handlebars.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>... | JavaScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 163af3a070eefe79a32c8239884929e0cae1f589 | 675 | https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.html.coffee | 1 | 28 |
elving/swag:src/swag.html.coffee:1:completion | completion | HTML = {}
HTML.parseAttributes = (hash) ->
Object.keys(hash).map((key) ->
"#{key}=\"#{hash[key]}\""
).join ' '
Handlebars.registerHelper 'ul', (context, options) ->
"<ul #{HTML.parseAttributes(options.hash)}>" + context.map((item) ->
"<li>#{options.fn(item)}</li>"
).join('\n') + "</ul>... | "<li>#{options.fn(item)}</li>"
).join('\n') + "</ol>"
Handlebars.registerHelper 'br', (count, options) ->
br = '<br>'
unless Utils.isUndefined count
i = 0
while i < count - 1
br += '<br>'
i++
Utils.safeString br | CoffeeScript | CoffeeScript | elving/swag | src/swag.html.coffee | MIT | 163af3a070eefe79a32c8239884929e0cae1f589 | 675 | https://github.com/elving/swag/blob/163af3a070eefe79a32c8239884929e0cae1f589/src/swag.html.coffee | 1 | 28 |
ichord/At.js:spec/javascripts/view.spec.coffee:1:raw_corpus | raw_corpus | describe "views", ->
$inputor = null
app = null
$ = jQuery
beforeEach ->
loadFixtures "inputors.html"
$inputor = $ "#inputor"
.atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
afterEach ->
$inputor.atwho 'destroy'
describe "issues", ->
controller = null
callback... | CoffeeScript | ichord/At.js | spec/javascripts/view.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/view.spec.coffee | 1 | 37 | ||
ichord/At.js:spec/javascripts/view.spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe "views", ->
$inputor = null
app = null
$ = jQuery
beforeEach ->
loadFixtures "inputors.html"
$inputor = $ "#inputor"
.atwho at: "@", data: fixtures["names"]
app = getAppOf $inputor
afterEach ->
$inputor.atwho 'destroy'
... | describe("views", function() {
var $, $inputor, app;
$inputor = null;
app = null;
$ = jQuery;
beforeEach(function() {
loadFixtures("inputors.html");
$inputor = $("#inputor").atwho({
at: "@",
data: fixtures["names"]
});
return app = getAppOf($inputor);
});
afterEach(function() {... | CoffeeScript | JavaScript | ichord/At.js | spec/javascripts/view.spec.coffee | MIT | a627b5fcac22c35d52b7fb6d8a93181d2546f3c0 | 5,250 | https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/spec/javascripts/view.spec.coffee | 1 | 37 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.