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/reads-configuration.coffee:1:raw_corpus
raw_corpus
_ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual grunt.config.init(config) grunt.config.get(propert...
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual ...
var ReadsConfiguration, _, buildsAppConfig, grunt; _ = require("lodash"); buildsAppConfig = require('./builds-app-config'); grunt = require('./requires-grunt').require(); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath, gruntActual) { var config; config = buildsAppConfig...
CoffeeScript
JavaScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ReadsConfiguration, _, buildsAppConfig, grunt; _ = require("lodash"); buildsAppConfig = require('./builds-app-config'); grunt = require('./requires-grunt').require(); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath, grun...
_ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual grunt.config.init(config) grunt.config.get(propert...
JavaScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:completion
completion
_ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual grunt.config.init(config) grunt.config.get(propert...
else @traverse(propertyPath?.split("."), config) traverse: (paths, value) -> if !value? || !paths? || paths.length == 0 value else if _.includes(paths[0], "[") [path, prop, index] = paths[0].match(/(.*)\[(\d+)\]/) @traverse(_.tail(paths), value[prop][index]) else @traverse(_...
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
61d681532d9621e578d319c279006bbb728ece4b
1,168
https://github.com/linemanjs/lineman/blob/61d681532d9621e578d319c279006bbb728ece4b/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:raw_corpus
raw_corpus
_ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual grunt.config.init(config) grunt.config.get(propert...
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
15b5f2936685482c9951141c4fa7dadb8fe648ed
1,168
https://github.com/linemanjs/lineman/blob/15b5f2936685482c9951141c4fa7dadb8fe648ed/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual ...
var ReadsConfiguration, _, buildsAppConfig, grunt; _ = require("lodash"); buildsAppConfig = require('./builds-app-config'); grunt = require('./requires-grunt').require(); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath, gruntActual) { var config; config = buildsAppConfig...
CoffeeScript
JavaScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
15b5f2936685482c9951141c4fa7dadb8fe648ed
1,168
https://github.com/linemanjs/lineman/blob/15b5f2936685482c9951141c4fa7dadb8fe648ed/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ReadsConfiguration, _, buildsAppConfig, grunt; _ = require("lodash"); buildsAppConfig = require('./builds-app-config'); grunt = require('./requires-grunt').require(); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath, grun...
_ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual grunt.config.init(config) grunt.config.get(propert...
JavaScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
15b5f2936685482c9951141c4fa7dadb8fe648ed
1,168
https://github.com/linemanjs/lineman/blob/15b5f2936685482c9951141c4fa7dadb8fe648ed/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:completion
completion
_ = require("lodash") buildsAppConfig = require('./builds-app-config') grunt = require('./requires-grunt').require() module.exports = class ReadsConfiguration read: (propertyPath, gruntActual) -> config = buildsAppConfig.forGrunt() if gruntActual grunt.config.init(config) grunt.config.get(propert...
else @traverse(propertyPath?.split("."), config) traverse: (paths, value) -> if !value? || !paths? || paths.length == 0 value else if _(paths[0]).include("[") [path, prop, index] = paths[0].match(/(.*)\[(\d+)\]/) @traverse(_(paths).rest(), value[prop][index]) else @traverse(...
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
15b5f2936685482c9951141c4fa7dadb8fe648ed
1,168
https://github.com/linemanjs/lineman/blob/15b5f2936685482c9951141c4fa7dadb8fe648ed/lib/reads-configuration.coffee
1
21
linemanjs/lineman:lib/reads-configuration.coffee:1:raw_corpus
raw_corpus
_ = require("lodash") buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config traverse: (paths, value) -> if !value? || pa...
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require("lodash") buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else c...
var ReadsConfiguration, _, buildsAppConfig; _ = require("lodash"); buildsAppConfig = require('./builds-app-config'); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = buildsAppConfig.forGrunt(); return value = propertyPath != null ? this.t...
CoffeeScript
JavaScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ReadsConfiguration, _, buildsAppConfig; _ = require("lodash"); buildsAppConfig = require('./builds-app-config'); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = buildsAppConfig.forGr...
_ = require("lodash") buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config traverse: (paths, value) -> if !value? || pa...
JavaScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:completion
completion
_ = require("lodash") buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config
traverse: (paths, value) -> if !value? || paths.length == 0 value else if _(paths[0]).include("[") [path, prop, index] = paths[0].match(/(.*)\[(\d+)\]/) @traverse(_(paths).rest(), value[prop][index]) else @traverse(_(paths).rest(), value[paths[0]])
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
da7b69982e44220bdd107798d86abc78749dc125
1,168
https://github.com/linemanjs/lineman/blob/da7b69982e44220bdd107798d86abc78749dc125/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:raw_corpus
raw_corpus
_ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config traverse: (paths, value) -> if !value?...
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
9610ff6435b6e325e1c67291fadd807f75d3c05e
1,168
https://github.com/linemanjs/lineman/blob/9610ff6435b6e325e1c67291fadd807f75d3c05e/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) ...
var ReadsConfiguration, _, buildsAppConfig; _ = require('grunt').util._; buildsAppConfig = require('./builds-app-config'); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = buildsAppConfig.forGrunt(); return value = propertyPath != null ? ...
CoffeeScript
JavaScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
9610ff6435b6e325e1c67291fadd807f75d3c05e
1,168
https://github.com/linemanjs/lineman/blob/9610ff6435b6e325e1c67291fadd807f75d3c05e/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ReadsConfiguration, _, buildsAppConfig; _ = require('grunt').util._; buildsAppConfig = require('./builds-app-config'); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = buildsAppConfig...
_ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config traverse: (paths, value) -> if !value?...
JavaScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
9610ff6435b6e325e1c67291fadd807f75d3c05e
1,168
https://github.com/linemanjs/lineman/blob/9610ff6435b6e325e1c67291fadd807f75d3c05e/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:completion
completion
_ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.forGrunt() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config
traverse: (paths, value) -> if !value? || paths.length == 0 value else if _(paths[0]).include("[") [path, prop, index] = paths[0].match(/(.*)\[(\d+)\]/) @traverse(_(paths).rest(), value[prop][index]) else @traverse(_(paths).rest(), value[paths[0]])
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
9610ff6435b6e325e1c67291fadd807f75d3c05e
1,168
https://github.com/linemanjs/lineman/blob/9610ff6435b6e325e1c67291fadd807f75d3c05e/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:raw_corpus
raw_corpus
_ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.withUserOverrides() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config traverse: (paths, value) -> i...
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
6318ce2aa0b785f49abde268edc68cbac20e522c
1,168
https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript _ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.withUserOverrides() value = if propertyPath? then @traverse(propertyPath.split("."),...
var ReadsConfiguration, _, buildsAppConfig; _ = require('grunt').util._; buildsAppConfig = require('./builds-app-config'); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = buildsAppConfig.withUserOverrides(); return value = propertyPath !...
CoffeeScript
JavaScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
6318ce2aa0b785f49abde268edc68cbac20e522c
1,168
https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ReadsConfiguration, _, buildsAppConfig; _ = require('grunt').util._; buildsAppConfig = require('./builds-app-config'); module.exports = ReadsConfiguration = class ReadsConfiguration { read(propertyPath) { var config, value; config = buildsAppConfig...
_ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.withUserOverrides() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config traverse: (paths, value) -> i...
JavaScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
6318ce2aa0b785f49abde268edc68cbac20e522c
1,168
https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/reads-configuration.coffee
1
16
linemanjs/lineman:lib/reads-configuration.coffee:1:completion
completion
_ = require('grunt').util._ buildsAppConfig = require('./builds-app-config') module.exports = class ReadsConfiguration read: (propertyPath) -> config = buildsAppConfig.withUserOverrides() value = if propertyPath? then @traverse(propertyPath.split("."), config) else config
traverse: (paths, value) -> if !value? || paths.length == 0 value else if _(paths[0]).include("[") [path, prop, index] = paths[0].match(/(.*)\[(\d+)\]/) @traverse(_(paths).rest(), value[prop][index]) else @traverse(_(paths).rest(), value[paths[0]])
CoffeeScript
CoffeeScript
linemanjs/lineman
lib/reads-configuration.coffee
MIT
6318ce2aa0b785f49abde268edc68cbac20e522c
1,168
https://github.com/linemanjs/lineman/blob/6318ce2aa0b785f49abde268edc68cbac20e522c/lib/reads-configuration.coffee
1
16
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:2:raw_corpus
raw_corpus
getLocale = (key) -> lang.getText('tour-guide-' + key) KEY = 'v3-0-0-start-guide' tour = null
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
10
14
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript getLocale = (key) -> lang.getText('tour-guide-' + key) KEY = 'v3-0-0-start-guide' tour = null ```
var KEY, getLocale, tour; getLocale = function(key) { return lang.getText('tour-guide-' + key); }; KEY = 'v3-0-0-start-guide'; tour = null;
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
10
14
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var KEY, getLocale, tour; getLocale = function(key) { return lang.getText('tour-guide-' + key); }; KEY = 'v3-0-0-start-guide'; tour = null; ```
getLocale = (key) -> lang.getText('tour-guide-' + key) KEY = 'v3-0-0-start-guide' tour = null
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
10
14
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:2:completion
completion
getLocale = (key) -> lang.getText('tour-guide-' + key)
KEY = 'v3-0-0-start-guide' tour = null
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
10
14
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:3:raw_corpus
raw_corpus
updateWebData = (webData) -> webData[KEY] = (new Date).valueOf() prefActions.prefsUpdate({webData})
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
16
18
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript updateWebData = (webData) -> webData[KEY] = (new Date).valueOf() prefActions.prefsUpdate({webData}) ```
var updateWebData; updateWebData = function(webData) { webData[KEY] = (new Date()).valueOf(); return prefActions.prefsUpdate({webData}); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
16
18
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var updateWebData; updateWebData = function(webData) { webData[KEY] = (new Date()).valueOf(); return prefActions.prefsUpdate({webData}); }; ```
updateWebData = (webData) -> webData[KEY] = (new Date).valueOf() prefActions.prefsUpdate({webData})
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
16
18
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:4:raw_corpus
raw_corpus
initTour = (webData) -> tour = new Shepherd.Tour defaults: classes: 'shepherd-theme-default' showCancelLink: true tour.on 'start', -> shepherdBackdrop = document.createElement 'div' shepherdBackdrop.className = 'shepherd-backdrop' document.body.appendChild(shepherdBackdrop) tour.on ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
20
69
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:4:completion
completion
initTour = (webData) -> tour = new Shepherd.Tour defaults: classes: 'shepherd-theme-default' showCancelLink: true tour.on 'start', -> shepherdBackdrop = document.createElement 'div' shepherdBackdrop.className = 'shepherd-backdrop' document.body.appendChild(shepherdBackdrop) tour.on ...
<img class=\"image\" src=\"#{ require '../images/tour/3.0-guide@2x.jpg' }\" /> <p class=\"title\">#{ getLocale 'start-title' }</p> </div> """ showCancelLink: false buttons: [ { text: getLocale 'cancel-button' action: tour.cancel classes: 'cancel' } { ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
20
69
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:5:raw_corpus
raw_corpus
<p class=\"text\">#{ getLocale 'team-sidebar-text' }</p> </div> """ attachTo: '.team-sidebar right' showCancelLink: false buttons: [ { text: '<span class="active"></span><span></span><span></span>' classes: 'step' } { text: getLocale 'next-button' ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
70
119
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:5:completion
completion
<p class=\"text\">#{ getLocale 'team-sidebar-text' }</p> </div> """ attachTo: '.team-sidebar right' showCancelLink: false buttons: [ { text: '<span class="active"></span><span></span><span></span>' classes: 'step' } { text: getLocale 'next-button' ...
</div> """ attachTo: '.message-editor top' showCancelLink: false buttons: [ { text: '<span></span><span class="active"></span><span></span>' classes: 'step' } { text: getLocale 'next-button' action: tour.next classes: 'next' } ] tour...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
70
119
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:7:raw_corpus
raw_corpus
module.exports.start = (webData = {}) -> if not webData[KEY] initTour(webData).start()
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
137
139
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports.start = (webData = {}) -> if not webData[KEY] initTour(webData).start() ```
module.exports.start = function(webData = {}) { if (!webData[KEY]) { return initTour(webData).start(); } };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
137
139
jianliaoim/talk-os:talk-web/client/tour-guide/index.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports.start = function(webData = {}) { if (!webData[KEY]) { return initTour(webData).start(); } }; ```
module.exports.start = (webData = {}) -> if not webData[KEY] initTour(webData).start()
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/tour-guide/index.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/tour-guide/index.coffee
137
139
snd/url-pattern:test/stringify-fixtures.coffee:1:raw_corpus
raw_corpus
test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new Ur...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
1
40
snd/url-pattern:test/stringify-fixtures.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.string...
var UrlPattern, test; test = require('tape'); UrlPattern = require('../lib/url-pattern'); test('stringify', function(t) { var pattern; pattern = new UrlPattern('/foo'); t.equal('/foo', pattern.stringify()); pattern = new UrlPattern('/user/:userId/task/:taskId'); t.equal('/user/10/task/52', pattern.stringif...
CoffeeScript
JavaScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
1
40
snd/url-pattern:test/stringify-fixtures.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var UrlPattern, test; test = require('tape'); UrlPattern = require('../lib/url-pattern'); test('stringify', function(t) { var pattern; pattern = new UrlPattern('/foo'); t.equal('/foo', pattern.stringify()); pattern = new UrlPattern('/user/:userId/task/:t...
test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new Ur...
JavaScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
1
40
snd/url-pattern:test/stringify-fixtures.coffee:1:completion
completion
test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new Ur...
userId: '10' taskId: '52' pattern = new UrlPattern '*/user/:userId' t.equal '/school/10/user/10', pattern.stringify _: '/school/10', userId: '10' pattern = new UrlPattern '*-user-:userId' t.equal '-school-10-user-10', pattern.stringify _: '-school-10' userId: '10' pattern = new UrlPatte...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
1
40
snd/url-pattern:test/stringify-fixtures.coffee:3:raw_corpus
raw_corpus
pattern = new UrlPattern '((((a)b)c)d)' t.equal '', pattern.stringify() pattern = new UrlPattern '(:a-)1-:b(-2-:c-3-:d(-4-*-:a))' t.equal '1-B', pattern.stringify b: 'B' t.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' t.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' t.equal 'A-1-B-2-C-...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
91
140
snd/url-pattern:test/stringify-fixtures.coffee:3:completion
completion
pattern = new UrlPattern '((((a)b)c)d)' t.equal '', pattern.stringify() pattern = new UrlPattern '(:a-)1-:b(-2-:c-3-:d(-4-*-:a))' t.equal '1-B', pattern.stringify b: 'B' t.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' t.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' t.equal 'A-1-B-2-C-...
t.equal '/user/10-20', pattern.stringify range: '10-20' t.end() test 'stringify errors', (t) -> t.plan 5 pattern = new UrlPattern '(:a-)1-:b(-2-:c-3-:d(-4-*-:a))' try pattern.stringify() catch e t.equal e.message, "no values provided for key `b`" try pattern.stringify a: 'A' ...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
91
140
snd/url-pattern:test/stringify-fixtures.coffee:4:raw_corpus
raw_corpus
d: 'D' catch e t.equal e.message, "no values provided for key `c`" try pattern.stringify a: 'A' b: 'B' c: 'C' d: 'D' _: 'E' catch e t.equal e.message, "too few values provided for key `a`" try pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: ...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
141
160
snd/url-pattern:test/stringify-fixtures.coffee:4:completion
completion
d: 'D' catch e t.equal e.message, "no values provided for key `c`" try pattern.stringify a: 'A' b: 'B' c: 'C' d: 'D' _: 'E'
catch e t.equal e.message, "too few values provided for key `a`" try pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' catch e t.equal e.message, "no values provided for key `_`"
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
845881ae23ee8dd2a2b106dfbadabe1d91b532a8
588
https://github.com/snd/url-pattern/blob/845881ae23ee8dd2a2b106dfbadabe1d91b532a8/test/stringify-fixtures.coffee
141
160
snd/url-pattern:test/stringify-fixtures.coffee:1:raw_corpus
raw_corpus
test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new Ur...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
6ca28fc8c90a28b97bf15fa045a066f75a8b0d97
588
https://github.com/snd/url-pattern/blob/6ca28fc8c90a28b97bf15fa045a066f75a8b0d97/test/stringify-fixtures.coffee
1
39
snd/url-pattern:test/stringify-fixtures.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.string...
var UrlPattern, test; test = require('tape'); UrlPattern = require('../lib/url-pattern'); test('stringify', function(t) { var pattern; pattern = new UrlPattern('/foo'); t.equal('/foo', pattern.stringify()); pattern = new UrlPattern('/user/:userId/task/:taskId'); t.equal('/user/10/task/52', pattern.stringif...
CoffeeScript
JavaScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
6ca28fc8c90a28b97bf15fa045a066f75a8b0d97
588
https://github.com/snd/url-pattern/blob/6ca28fc8c90a28b97bf15fa045a066f75a8b0d97/test/stringify-fixtures.coffee
1
39
snd/url-pattern:test/stringify-fixtures.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var UrlPattern, test; test = require('tape'); UrlPattern = require('../lib/url-pattern'); test('stringify', function(t) { var pattern; pattern = new UrlPattern('/foo'); t.equal('/foo', pattern.stringify()); pattern = new UrlPattern('/user/:userId/task/:t...
test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new Ur...
JavaScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
6ca28fc8c90a28b97bf15fa045a066f75a8b0d97
588
https://github.com/snd/url-pattern/blob/6ca28fc8c90a28b97bf15fa045a066f75a8b0d97/test/stringify-fixtures.coffee
1
39
snd/url-pattern:test/stringify-fixtures.coffee:1:completion
completion
test = require 'tape' UrlPattern = require '../lib/url-pattern' test 'stringify', (t) -> pattern = new UrlPattern '/foo' t.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' t.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new Ur...
_: '/school/10', userId: '10' pattern = new UrlPattern '*-user-:userId' t.equal '-school-10-user-10', pattern.stringify _: '-school-10' userId: '10' pattern = new UrlPattern '/admin*' t.equal '/admin/school/10/user/10', pattern.stringify _: '/school/10/user/10' pattern = new UrlPattern '/ad...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
6ca28fc8c90a28b97bf15fa045a066f75a8b0d97
588
https://github.com/snd/url-pattern/blob/6ca28fc8c90a28b97bf15fa045a066f75a8b0d97/test/stringify-fixtures.coffee
1
39
snd/url-pattern:test/stringify-fixtures.coffee:1:raw_corpus
raw_corpus
module.exports = 'stringify': (test) -> pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' test.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new UrlPattern '.user.:userId.tas...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = 'stringify': (test) -> pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' test.equal '/user/10/task/52', pattern.stringify userId: '10' task...
module.exports = { 'stringify': function(test) { var pattern; pattern = new UrlPattern('/foo'); test.equal('/foo', pattern.stringify()); pattern = new UrlPattern('/user/:userId/task/:taskId'); test.equal('/user/10/task/52', pattern.stringify({ userId: '10', taskId: '52' })); pa...
CoffeeScript
JavaScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { 'stringify': function(test) { var pattern; pattern = new UrlPattern('/foo'); test.equal('/foo', pattern.stringify()); pattern = new UrlPattern('/user/:userId/task/:taskId'); test.equal('/user/10/task/52', pattern.stringify({...
module.exports = 'stringify': (test) -> pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' test.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new UrlPattern '.user.:userId.tas...
JavaScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:1:completion
completion
module.exports = 'stringify': (test) -> pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() pattern = new UrlPattern '/user/:userId/task/:taskId' test.equal '/user/10/task/52', pattern.stringify userId: '10' taskId: '52' pattern = new UrlPattern '.user.:userId.tas...
pattern = new UrlPattern '/admin*' test.equal '/admin/school/10/user/10', pattern.stringify _: '/school/10/user/10' pattern = new UrlPattern '/admin/*/user/*/tail' test.equal '/admin/school/10/user/10/12/tail', pattern.stringify _: ['school/10', '10/12'] pattern = new UrlPattern '/admin/*/...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:3:raw_corpus
raw_corpus
test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPattern '/user/:range' test.equal '/user/10-20', pattern.stringify range: '10-20' test.done() 'stringify errors': (test) -> test.expect 5 pattern =...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPattern '/user/:range' test.equal '/user/10-20', pattern.stringify range: '10-20' test.done() 'stri...
var pattern; test.equal('A-1-B-2-C-3-D-4-E-F', pattern.stringify({ a: ['A', 'F'], b: 'B', c: 'C', d: 'D', _: 'E' })); pattern = new UrlPattern('/user/:range'); test.equal('/user/10-20', pattern.stringify({ range: '10-20' })); test.done(); ({ 'stringify errors': function(test) { var e; test.ex...
CoffeeScript
JavaScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var pattern; test.equal('A-1-B-2-C-3-D-4-E-F', pattern.stringify({ a: ['A', 'F'], b: 'B', c: 'C', d: 'D', _: 'E' })); pattern = new UrlPattern('/user/:range'); test.equal('/user/10-20', pattern.stringify({ range: '10-20' })); test.done(); ({ 'str...
test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPattern '/user/:range' test.equal '/user/10-20', pattern.stringify range: '10-20' test.done() 'stringify errors': (test) -> test.expect 5 pattern =...
JavaScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:3:completion
completion
test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPattern '/user/:range' test.equal '/user/10-20', pattern.stringify range: '10-20' test.done() 'stringify errors': (test) -> test.expect 5 pattern =...
b: 'B' c: 'C' catch e test.equal e.message, "no values provided for key `d`" try pattern.stringify a: 'A' b: 'B' d: 'D' catch e test.equal e.message, "no values provided for key `c`" try pattern.stringify a: 'A' b: 'B' c: 'C...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:4:raw_corpus
raw_corpus
d: 'D' catch e test.equal e.message, "no values provided for key `_`" test.done()
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
d9843a09ca2171908c18198f7906eae6a58086e6
588
https://github.com/snd/url-pattern/blob/d9843a09ca2171908c18198f7906eae6a58086e6/test/stringify-fixtures.coffee
153
157
snd/url-pattern:test/stringify-fixtures.coffee:1:raw_corpus
raw_corpus
module.exports = 'stringify': (test) -> # TODO simplify these tests with a helper function pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() # TODO regex should fail # pattern = new UrlPattern /foo/ # test.deepEqual pattern.match('foo'), [] pattern = new UrlPattern...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = 'stringify': (test) -> # TODO simplify these tests with a helper function pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() # TODO regex should fail # pattern = new UrlPattern /foo/ # test.deepEqua...
module.exports = { 'stringify': function(test) { var pattern; // TODO simplify these tests with a helper function pattern = new UrlPattern('/foo'); test.equal('/foo', pattern.stringify()); // TODO regex should fail // pattern = new UrlPattern /foo/ // test.deepEqual pattern.match('...
CoffeeScript
JavaScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = { 'stringify': function(test) { var pattern; // TODO simplify these tests with a helper function pattern = new UrlPattern('/foo'); test.equal('/foo', pattern.stringify()); // TODO regex should fail // pattern = new Url...
module.exports = 'stringify': (test) -> # TODO simplify these tests with a helper function pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() # TODO regex should fail # pattern = new UrlPattern /foo/ # test.deepEqual pattern.match('foo'), [] pattern = new UrlPattern...
JavaScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:1:completion
completion
module.exports = 'stringify': (test) -> # TODO simplify these tests with a helper function pattern = new UrlPattern '/foo' test.equal '/foo', pattern.stringify() # TODO regex should fail # pattern = new UrlPattern /foo/ # test.deepEqual pattern.match('foo'), [] pattern = new UrlPattern...
test.equal '/school/10/user/10', pattern.stringify _: '/school/10', userId: '10' pattern = new UrlPattern '*-user-:userId' test.equal '-school-10-user-10', pattern.stringify _: '-school-10' userId: '10' pattern = new UrlPattern '/admin*' test.equal '/admin/school/10/user/10', p...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
3
52
snd/url-pattern:test/stringify-fixtures.coffee:3:raw_corpus
raw_corpus
test.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' test.equal 'A-1-B-2-C-3-D', pattern.stringify a: 'A' b: 'B' c: 'C' d: 'D' test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPatt...
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript test.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' test.equal 'A-1-B-2-C-3-D', pattern.stringify a: 'A' b: 'B' c: 'C' d: 'D' test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c:...
var pattern; test.equal('A-1-B', pattern.stringify({ a: 'A', b: 'B' })); test.equal('A-1-B-2-C-3-D', pattern.stringify({ a: 'A', b: 'B', c: 'C', d: 'D' })); test.equal('A-1-B-2-C-3-D-4-E-F', pattern.stringify({ a: ['A', 'F'], b: 'B', c: 'C', d: 'D', _: 'E' })); pattern = new UrlPattern('/user/...
CoffeeScript
JavaScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var pattern; test.equal('A-1-B', pattern.stringify({ a: 'A', b: 'B' })); test.equal('A-1-B-2-C-3-D', pattern.stringify({ a: 'A', b: 'B', c: 'C', d: 'D' })); test.equal('A-1-B-2-C-3-D-4-E-F', pattern.stringify({ a: ['A', 'F'], b: 'B', c: 'C', ...
test.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' test.equal 'A-1-B-2-C-3-D', pattern.stringify a: 'A' b: 'B' c: 'C' d: 'D' test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPatt...
JavaScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:3:completion
completion
test.equal 'A-1-B', pattern.stringify a: 'A' b: 'B' test.equal 'A-1-B-2-C-3-D', pattern.stringify a: 'A' b: 'B' c: 'C' d: 'D' test.equal 'A-1-B-2-C-3-D-4-E-F', pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' _: 'E' pattern = new UrlPatt...
try pattern.stringify() catch e test.equal e.message, "no values provided for key `b`" try pattern.stringify a: 'A' b: 'B' c: 'C' catch e test.equal e.message, "no values provided for key `d`" try pattern.stringify a: 'A' b: 'B' ...
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
103
152
snd/url-pattern:test/stringify-fixtures.coffee:4:raw_corpus
raw_corpus
_: 'E' catch e test.equal e.message, "too few values provided for key `a`" try pattern.stringify a: ['A', 'F'] b: 'B' c: 'C' d: 'D' catch e test.equal e.message, "no values provided for key `_`" test.done()
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
153
165
snd/url-pattern:test/stringify-fixtures.coffee:4:completion
completion
_: 'E' catch e test.equal e.message, "too few values provided for key `a`" try pattern.stringify a: ['A', 'F']
b: 'B' c: 'C' d: 'D' catch e test.equal e.message, "no values provided for key `_`" test.done()
CoffeeScript
CoffeeScript
snd/url-pattern
test/stringify-fixtures.coffee
MIT
3b09b117badb41f3fb0b9fc1ba1dce43d150b40a
588
https://github.com/snd/url-pattern/blob/3b09b117badb41f3fb0b9fc1ba1dce43d150b40a/test/stringify-fixtures.coffee
153
165
jianliaoim/talk-os:talk-web/client/util/schedule.coffee:1:raw_corpus
raw_corpus
isTrue = (x) -> x is true exports.all = (calls, success) -> calls = calls.filter (task) -> task? if calls.length is 0 success(calls) else results = calls.map -> null doneList = calls.map -> false calls.forEach (call, index) -> resolve = (result) -> results[index] = result do...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/schedule.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/schedule.coffee
1
23
jianliaoim/talk-os:talk-web/client/util/schedule.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript isTrue = (x) -> x is true exports.all = (calls, success) -> calls = calls.filter (task) -> task? if calls.length is 0 success(calls) else results = calls.map -> null doneList = calls.map -> false calls.forEach (call, index) -> resolve...
var isTrue; isTrue = function(x) { return x === true; }; exports.all = function(calls, success) { var doneList, results; calls = calls.filter(function(task) { return task != null; }); if (calls.length === 0) { return success(calls); } else { results = calls.map(function() { return null; ...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/schedule.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/schedule.coffee
1
23
jianliaoim/talk-os:talk-web/client/util/schedule.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var isTrue; isTrue = function(x) { return x === true; }; exports.all = function(calls, success) { var doneList, results; calls = calls.filter(function(task) { return task != null; }); if (calls.length === 0) { return success(calls); } else { ...
isTrue = (x) -> x is true exports.all = (calls, success) -> calls = calls.filter (task) -> task? if calls.length is 0 success(calls) else results = calls.map -> null doneList = calls.map -> false calls.forEach (call, index) -> resolve = (result) -> results[index] = result do...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/schedule.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/schedule.coffee
1
23
jianliaoim/talk-os:talk-web/client/util/schedule.coffee:1:completion
completion
isTrue = (x) -> x is true exports.all = (calls, success) -> calls = calls.filter (task) -> task? if calls.length is 0 success(calls) else results = calls.map -> null doneList = calls.map -> false calls.forEach (call, index) -> resolve = (result) ->
results[index] = result doneList[index] = true check() reject = (error) -> results[index] = error doneList[index] = true check() check = -> if doneList.every(isTrue) success results call resolve, reject return true
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/schedule.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/schedule.coffee
1
23
maxwells/bootstrap-tags:src/templates/shared/tags_suggestion.coffee:1:raw_corpus
raw_corpus
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.shared ||= {} Tags.Templates.shared.tags_suggestion = (options = {}) -> "<li class='tags-suggestion'>#{options.suggestion}</li>"
CoffeeScript
maxwells/bootstrap-tags
src/templates/shared/tags_suggestion.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/tags_suggestion.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/tags_suggestion.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.shared ||= {} Tags.Templates.shared.tags_suggestion = (options = {}) -> "<li class='tags-suggestion'>#{options.suggestion}</li>" ```
var base; window.Tags || (window.Tags = {}); Tags.Templates || (Tags.Templates = {}); (base = Tags.Templates).shared || (base.shared = {}); Tags.Templates.shared.tags_suggestion = function(options = {}) { return `<li class='tags-suggestion'>${options.suggestion}</li>`; };
CoffeeScript
JavaScript
maxwells/bootstrap-tags
src/templates/shared/tags_suggestion.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/tags_suggestion.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/tags_suggestion.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var base; window.Tags || (window.Tags = {}); Tags.Templates || (Tags.Templates = {}); (base = Tags.Templates).shared || (base.shared = {}); Tags.Templates.shared.tags_suggestion = function(options = {}) { return `<li class='tags-suggestion'>${options.suggesti...
window.Tags ||= {} Tags.Templates ||= {} Tags.Templates.shared ||= {} Tags.Templates.shared.tags_suggestion = (options = {}) -> "<li class='tags-suggestion'>#{options.suggestion}</li>"
JavaScript
CoffeeScript
maxwells/bootstrap-tags
src/templates/shared/tags_suggestion.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/tags_suggestion.coffee
1
5
maxwells/bootstrap-tags:src/templates/shared/tags_suggestion.coffee:1:completion
completion
window.Tags ||= {} Tags.Templates ||= {}
Tags.Templates.shared ||= {} Tags.Templates.shared.tags_suggestion = (options = {}) -> "<li class='tags-suggestion'>#{options.suggestion}</li>"
CoffeeScript
CoffeeScript
maxwells/bootstrap-tags
src/templates/shared/tags_suggestion.coffee
MIT
9fcc5f6c1cada03cbf284e4b78162fd47a882384
543
https://github.com/maxwells/bootstrap-tags/blob/9fcc5f6c1cada03cbf284e4b78162fd47a882384/src/templates/shared/tags_suggestion.coffee
1
5
ichord/At.js:src/model.coffee:1:raw_corpus
raw_corpus
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
CoffeeScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetc...
// Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } destroy() { return this.storage.data(this.at, null)...
CoffeeScript
JavaScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } ...
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
JavaScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:completion
completion
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
callback data else _remoteFilter.call(@context, query, callback) # get or set current data which would be shown on the list view. # # @param data [Array] set data # @return [Array|undefined] current data that are showing on the list view. fetch: -> @storage.data(@at) || [] # save special fla...
CoffeeScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
1
50
ichord/At.js:src/model.coffee:2:raw_corpus
raw_corpus
# load data from local or remote with callback # # @param data [Array|String] data to load. _load: (data) -> if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data
CoffeeScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
51
59
ichord/At.js:src/model.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # load data from local or remote with callback # # @param data [Array|String] data to load. _load: (data) -> if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data ```
// load data from local or remote with callback // @param data [Array|String] data to load. ({ _load: function(data) { if (typeof data === "string") { return $.ajax(data, { dataType: "json" }).done((data) => { return this.save(data); }); } else { return this.save(data)...
CoffeeScript
JavaScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
51
59
ichord/At.js:src/model.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // load data from local or remote with callback // @param data [Array|String] data to load. ({ _load: function(data) { if (typeof data === "string") { return $.ajax(data, { dataType: "json" }).done((data) => { return this.save(dat...
# load data from local or remote with callback # # @param data [Array|String] data to load. _load: (data) -> if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data
JavaScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
51
59
ichord/At.js:src/model.coffee:2:completion
completion
# load data from local or remote with callback # # @param data [Array|String] data to load. _load: (data) ->
if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data
CoffeeScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
a627b5fcac22c35d52b7fb6d8a93181d2546f3c0
5,250
https://github.com/ichord/At.js/blob/a627b5fcac22c35d52b7fb6d8a93181d2546f3c0/src/model.coffee
51
59
ichord/At.js:src/model.coffee:1:raw_corpus
raw_corpus
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
CoffeeScript
ichord/At.js
src/model.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetc...
// Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } destroy() { return this.storage.data(this.at, null)...
CoffeeScript
JavaScript
ichord/At.js
src/model.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } ...
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
JavaScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:completion
completion
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
callback data else _remoteFilter.call(@context, query, callback) # get or set current data which would be shown on the list view. # # @param data [Array] set data # @return [Array|undefined] current data that are showing on the list view. fetch: -> @storage.data(@at) || [] # save special fla...
CoffeeScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
dea7f905a54abd351d68c768fd3d6bd4fc281e9c
5,250
https://github.com/ichord/At.js/blob/dea7f905a54abd351d68c768fd3d6bd4fc281e9c/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:raw_corpus
raw_corpus
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
CoffeeScript
ichord/At.js
src/model.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetc...
// Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } destroy() { return this.storage.data(this.at, null)...
CoffeeScript
JavaScript
ichord/At.js
src/model.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } ...
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
JavaScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:completion
completion
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor destroy: -> @storage.data(@at, null) saved: -> this.fetch() > 0 # fetch data from storage by query. # will i...
callback data else _remote_filter.call(@context, query, callback) # get or set current data which would be shown on the list view. # # @param data [Array] set data # @return [Array|undefined] current data that are showing on the list view. fetch: -> @storage.data(@at) || [] # save special fl...
CoffeeScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
f3e706542de650f6dd1f103d9826c37f032a6ed4
5,250
https://github.com/ichord/At.js/blob/f3e706542de650f6dd1f103d9826c37f032a6ed4/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:raw_corpus
raw_corpus
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor saved: -> this.fetch() > 0 # fetch data from storage by query. # will invoke `callback` to return data # # @par...
CoffeeScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor saved: -> this.fetch() > 0 # fetch data from storage by quer...
// Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } saved() { return this.fetch() > 0; } // fetch ...
CoffeeScript
JavaScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Class to process data var Model; Model = class Model { constructor(context) { this.context = context; this.at = this.context.at; // NOTE: bind data storage to inputor maybe App class can handle it. this.storage = this.context.$inputor; } ...
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor saved: -> this.fetch() > 0 # fetch data from storage by query. # will invoke `callback` to return data # # @par...
JavaScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
1
50
ichord/At.js:src/model.coffee:1:completion
completion
# Class to process data class Model constructor: (@context) -> @at = @context.at # NOTE: bind data storage to inputor maybe App class can handle it. @storage = @context.$inputor saved: -> this.fetch() > 0 # fetch data from storage by query. # will invoke `callback` to return data # # @par...
# get or set current data which would be shown on the list view. # # @param data [Array] set data # @return [Array|undefined] current data that are showing on the list view. fetch: -> @storage.data(@at) || [] # save special flag's data to storage # # @param data [Array] data to save save: (data) ->...
CoffeeScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
1
50
ichord/At.js:src/model.coffee:2:raw_corpus
raw_corpus
# @param data [Array|String] data to load. _load: (data) -> if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data
CoffeeScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
51
56
ichord/At.js:src/model.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # @param data [Array|String] data to load. _load: (data) -> if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data ```
// @param data [Array|String] data to load. ({ _load: function(data) { if (typeof data === "string") { return $.ajax(data, { dataType: "json" }).done((data) => { return this.save(data); }); } else { return this.save(data); } } });
CoffeeScript
JavaScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
51
56
ichord/At.js:src/model.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // @param data [Array|String] data to load. ({ _load: function(data) { if (typeof data === "string") { return $.ajax(data, { dataType: "json" }).done((data) => { return this.save(data); }); } else { return this.save...
# @param data [Array|String] data to load. _load: (data) -> if typeof data is "string" $.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data
JavaScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
51
56
ichord/At.js:src/model.coffee:2:completion
completion
# @param data [Array|String] data to load. _load: (data) -> if typeof data is "string"
$.ajax(data, dataType: "json").done (data) => this.save(data) else this.save data
CoffeeScript
CoffeeScript
ichord/At.js
src/model.coffee
MIT
7569078e80d186c7f530356e57cf3339202efcd8
5,250
https://github.com/ichord/At.js/blob/7569078e80d186c7f530356e57cf3339202efcd8/src/model.coffee
51
56
outsideris/popularconvention:test/parser/parser.test.coffee:1:raw_corpus
raw_corpus
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' fs = require 'fs' path = require 'path' parser = require '../../src/parser/parser' describe 'parser >', -> commitFixture = '' before -...
CoffeeScript
outsideris/popularconvention
test/parser/parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/parser.test.coffee
1
47
outsideris/popularconvention:test/parser/parser.test.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' fs = require 'fs' path = require 'path' parser = require '../../src/parser/parser' ...
// Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> // Licensed under the MIT license. // <http://outsider.mit-license.org/> var fs, parser, path, should; should = require('should'); fs = require('fs'); path = require('path'); parser = require('../../src/parser/parser'); describe('pa...
CoffeeScript
JavaScript
outsideris/popularconvention
test/parser/parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/parser.test.coffee
1
47
outsideris/popularconvention:test/parser/parser.test.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> // Licensed under the MIT license. // <http://outsider.mit-license.org/> var fs, parser, path, should; should = require('should'); fs = require('fs'); path = require('path'); par...
# Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> # Licensed under the MIT license. # <http://outsider.mit-license.org/> should = require 'should' fs = require 'fs' path = require 'path' parser = require '../../src/parser/parser' describe 'parser >', -> commitFixture = '' before -...
JavaScript
CoffeeScript
outsideris/popularconvention
test/parser/parser.test.coffee
MIT
4e14df19a1d7fd3747c73620648df56853902087
730
https://github.com/outsideris/popularconvention/blob/4e14df19a1d7fd3747c73620648df56853902087/test/parser/parser.test.coffee
1
47