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
abe33/atom-pigments:spec/pigments-spec.coffee:1:raw_corpus
raw_corpus
Pigments = require '../lib/pigments' PigmentsAPI = require '../lib/pigments-api' {SERIALIZE_VERSION, SERIALIZE_MARKERS_VERSION} = require '../lib/versions' describe "Pigments", -> [workspaceElement, pigments, project] = [] beforeEach -> workspaceElement = atom.views.getView(atom.workspace) jasmine.attach...
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
1
45
abe33/atom-pigments:spec/pigments-spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Pigments = require '../lib/pigments' PigmentsAPI = require '../lib/pigments-api' {SERIALIZE_VERSION, SERIALIZE_MARKERS_VERSION} = require '../lib/versions' describe "Pigments", -> [workspaceElement, pigments, project] = [] beforeEach -> workspaceElemen...
var Pigments, PigmentsAPI, SERIALIZE_MARKERS_VERSION, SERIALIZE_VERSION; Pigments = require('../lib/pigments'); PigmentsAPI = require('../lib/pigments-api'); ({SERIALIZE_VERSION, SERIALIZE_MARKERS_VERSION} = require('../lib/versions')); describe("Pigments", function() { var pigments, project, workspaceElement; ...
CoffeeScript
JavaScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
1
45
abe33/atom-pigments:spec/pigments-spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Pigments, PigmentsAPI, SERIALIZE_MARKERS_VERSION, SERIALIZE_VERSION; Pigments = require('../lib/pigments'); PigmentsAPI = require('../lib/pigments-api'); ({SERIALIZE_VERSION, SERIALIZE_MARKERS_VERSION} = require('../lib/versions')); describe("Pigments", fun...
Pigments = require '../lib/pigments' PigmentsAPI = require '../lib/pigments-api' {SERIALIZE_VERSION, SERIALIZE_MARKERS_VERSION} = require '../lib/versions' describe "Pigments", -> [workspaceElement, pigments, project] = [] beforeEach -> workspaceElement = atom.views.getView(atom.workspace) jasmine.attach...
JavaScript
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
1
45
abe33/atom-pigments:spec/pigments-spec.coffee:1:completion
completion
Pigments = require '../lib/pigments' PigmentsAPI = require '../lib/pigments-api' {SERIALIZE_VERSION, SERIALIZE_MARKERS_VERSION} = require '../lib/versions' describe "Pigments", -> [workspaceElement, pigments, project] = [] beforeEach -> workspaceElement = atom.views.getView(atom.workspace) jasmine.attach...
expect(pigments.getProject()).toBeDefined() it 'serializes the project', -> date = new Date spyOn(pigments.getProject(), 'getTimestamp').andCallFake -> date expect(pigments.serialize()).toEqual({ project: deserializer: 'ColorProject' timestamp: date version: SERIALIZE_VERSIO...
CoffeeScript
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
1
45
abe33/atom-pigments:spec/pigments-spec.coffee:2:raw_corpus
raw_corpus
runs -> service = pigments.provideAPI() waitsForPromise -> project.initialize() it 'returns an object conforming to the API', -> expect(service instanceof PigmentsAPI).toBeTruthy() expect(service.getProject()).toBe(project) expect(service.getPalette()).toEqual(project.getPalette()) ...
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
47
86
abe33/atom-pigments:spec/pigments-spec.coffee:2:completion
completion
runs -> service = pigments.provideAPI() waitsForPromise -> project.initialize() it 'returns an object conforming to the API', -> expect(service instanceof PigmentsAPI).toBeTruthy() expect(service.getProject()).toBe(project) expect(service.getPalette()).toEqual(project.getPalette()) ...
service.observeColorBuffers(spy) it 'calls the callback for every existing color buffer', -> expect(spy).toHaveBeenCalled() expect(spy.calls.length).toEqual(1) it 'calls the callback on every new buffer creation', -> waitsForPromise -> atom.workspace.open('buttons.styl') ...
CoffeeScript
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
47
86
abe33/atom-pigments:spec/pigments-spec.coffee:3:raw_corpus
raw_corpus
waitsFor -> editorElement.shadowRoot.querySelector('pigments-markers') runs -> spyOn(project, 'destroy').andCallThrough() spyOn(colorBuffer, 'destroy').andCallThrough() pigments.deactivate() it 'destroys the pigments project', -> expect(project.destroy).toHaveBeenCalled() ...
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
88
117
abe33/atom-pigments:spec/pigments-spec.coffee:3:completion
completion
waitsFor -> editorElement.shadowRoot.querySelector('pigments-markers') runs -> spyOn(project, 'destroy').andCallThrough() spyOn(colorBuffer, 'destroy').andCallThrough() pigments.deactivate() it 'destroys the pigments project', -> expect(project.destroy).toHaveBeenCalled() ...
it 'destroys the color buffer element that were added to the DOM', -> expect(editorElement.shadowRoot.querySelector('pigments-markers')).not.toExist() describe 'pigments:project-settings', -> item = null beforeEach -> atom.commands.dispatch(workspaceElement, 'pigments:project-settings') wa...
CoffeeScript
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
131f8a5d78c0576294186182916ce2bfcdb56b44
518
https://github.com/abe33/atom-pigments/blob/131f8a5d78c0576294186182916ce2bfcdb56b44/spec/pigments-spec.coffee
88
117
abe33/atom-pigments:spec/pigments-spec.coffee:2:raw_corpus
raw_corpus
runs -> service = pigments.provideAPI() waitsForPromise -> project.initialize() it 'returns an object conforming to the API', -> expect(service instanceof PigmentsAPI).toBeTruthy() expect(service.getProject()).toBe(project) expect(service.getPalette()).toEqual(project.getPalette()) ...
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-spec.coffee
47
86
abe33/atom-pigments:spec/pigments-spec.coffee:2:completion
completion
runs -> service = pigments.provideAPI() waitsForPromise -> project.initialize() it 'returns an object conforming to the API', -> expect(service instanceof PigmentsAPI).toBeTruthy() expect(service.getProject()).toBe(project) expect(service.getPalette()).toEqual(project.getPalette()) ...
service.observeColorBuffers(spy) it 'calls the callback for every existing color buffers', -> expect(spy).toHaveBeenCalled() expect(spy.calls.length).toEqual(1) it 'calls the callback on every new buffer creation', -> waitsForPromise -> atom.workspace.open('buttons.styl')...
CoffeeScript
CoffeeScript
abe33/atom-pigments
spec/pigments-spec.coffee
MIT
6b9b5368e8a617bbb73ccdb1da96350aba9fd444
518
https://github.com/abe33/atom-pigments/blob/6b9b5368e8a617bbb73ccdb1da96350aba9fd444/spec/pigments-spec.coffee
47
86
HubSpot/BuckyClient:lib/buttercream.coffee:1:raw_corpus
raw_corpus
define = -> run = (fn, args=[], ctx) -> if process?.env?.BUTTERCREAM_DEBUG or window?.localStorage?.BUTTERCREAM_DEBUG or window?.BUTTERCREAM_DEBUG return fn.apply (ctx ? @), args else try return fn.apply (ctx ? @), args catch e console?.error "Buttercream frosted over an erro...
CoffeeScript
HubSpot/BuckyClient
lib/buttercream.coffee
MIT
fc0ce8ff207c517964aba7aa5a397e9cb76429e5
1,725
https://github.com/HubSpot/BuckyClient/blob/fc0ce8ff207c517964aba7aa5a397e9cb76429e5/lib/buttercream.coffee
1
45
HubSpot/BuckyClient:lib/buttercream.coffee:1:completion
completion
define = -> run = (fn, args=[], ctx) -> if process?.env?.BUTTERCREAM_DEBUG or window?.localStorage?.BUTTERCREAM_DEBUG or window?.BUTTERCREAM_DEBUG return fn.apply (ctx ? @), args else try return fn.apply (ctx ? @), args catch e console?.error "Buttercream frosted over an erro...
for key, el of obj if typeof el is 'function' out[key] = wrapFunction el else out[key] = el out wrap = (obj) -> if typeof obj is 'function' wrapFunction obj else if obj === Object(obj) wrapObject obj else obj {wrap, run, frost: wrap, wrapFunction, wra...
CoffeeScript
CoffeeScript
HubSpot/BuckyClient
lib/buttercream.coffee
MIT
fc0ce8ff207c517964aba7aa5a397e9cb76429e5
1,725
https://github.com/HubSpot/BuckyClient/blob/fc0ce8ff207c517964aba7aa5a397e9cb76429e5/lib/buttercream.coffee
1
45
jianliaoim/talk-os:talk-api2x/server/schemas/mark.coffee:1:raw_corpus
raw_corpus
###* * db.marks.ensureIndex({team: 1, target: 1, x: 1, y: 1}, {unique: true, background: true}) ### mongoose = require 'mongoose' Err = require 'err1st' {Schema} = mongoose _ = require 'lodash' module.exports = MarkSchema = new Schema team: type: Schema.Types.ObjectId, ref: 'Team' creator: type: Schema.Types.Obj...
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/mark.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/mark.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ###* * db.marks.ensureIndex({team: 1, target: 1, x: 1, y: 1}, {unique: true, background: true}) ### mongoose = require 'mongoose' Err = require 'err1st' {Schema} = mongoose _ = require 'lodash' module.exports = MarkSchema = new Schema team: type: Schema.Type...
/** * db.marks.ensureIndex({team: 1, target: 1, x: 1, y: 1}, {unique: true, background: true}) */ var Err, MarkSchema, Schema, _, mongoose; mongoose = require('mongoose'); Err = require('err1st'); ({Schema} = mongoose); _ = require('lodash'); module.exports = MarkSchema = new Schema({ team: { type: Schema....
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-api2x/server/schemas/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/mark.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/mark.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /** * db.marks.ensureIndex({team: 1, target: 1, x: 1, y: 1}, {unique: true, background: true}) */ var Err, MarkSchema, Schema, _, mongoose; mongoose = require('mongoose'); Err = require('err1st'); ({Schema} = mongoose); _ = require('lodash'); module.exports ...
###* * db.marks.ensureIndex({team: 1, target: 1, x: 1, y: 1}, {unique: true, background: true}) ### mongoose = require 'mongoose' Err = require 'err1st' {Schema} = mongoose _ = require 'lodash' module.exports = MarkSchema = new Schema team: type: Schema.Types.ObjectId, ref: 'Team' creator: type: Schema.Types.Obj...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/mark.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/mark.coffee:1:completion
completion
###* * db.marks.ensureIndex({team: 1, target: 1, x: 1, y: 1}, {unique: true, background: true}) ### mongoose = require 'mongoose' Err = require 'err1st' {Schema} = mongoose _ = require 'lodash' module.exports = MarkSchema = new Schema team: type: Schema.Types.ObjectId, ref: 'Team' creator: type: Schema.Types.Obj...
toJSON: virtuals: true getters: true MarkSchema.virtual '_teamId' .get -> @team?._id or @team .set (_id) -> @team = _id MarkSchema.virtual '_targetId' .get -> @target?._id or @target .set (_id) -> @target = _id MarkSchema.virtual '_creatorId' .get -> @creator?._id or @creator .set (_id) -> @creat...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/mark.coffee
1
50
jianliaoim/talk-os:talk-api2x/server/schemas/mark.coffee:2:raw_corpus
raw_corpus
conditions = _.pick options, 'team', 'target', 'x', 'y' $mark = MarkModel.findOneAsync conditions $mark = $mark.then (mark) -> return mark if mark mark = new MarkModel options mark.$save() $mark.nodeify callback
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/mark.coffee
51
60
jianliaoim/talk-os:talk-api2x/server/schemas/mark.coffee:2:completion
completion
conditions = _.pick options, 'team', 'target', 'x', 'y' $mark = MarkModel.findOneAsync conditions $mark = $mark.then (mark) ->
return mark if mark mark = new MarkModel options mark.$save() $mark.nodeify callback
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-api2x/server/schemas/mark.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/schemas/mark.coffee
51
60
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:raw_corpus
raw_corpus
class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRouteChange(currentRoute.params) if controller.onRout...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/directives/ngController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controlle...
var Controller; Controller = class Controller { constructor($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { var controllerName; controllerName = attrs.ngController.split(' ')[0]; return $rootScope.$on(`${controllerName}$routeChangeSuccess`, function(event,...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/directives/ngController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Controller; Controller = class Controller { constructor($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { var controllerName; controllerName = attrs.ngController.split(' ')[0]; return $rootScope.$on(...
class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRouteChange(currentRoute.params) if controller.onRout...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/directives/ngController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:completion
completion
class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRouteChange(currentRoute.params) if controller.onRout...
return { link require: 'ngController' restrict: 'A' } angular.module('app').directive 'ngController', ['$log', '$rootScope', Controller]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
8706e0902a4ed56a9ae0ca908e4b9a95e47954e9
672
https://github.com/CaryLandholt/AngularFun/blob/8706e0902a4ed56a9ae0ca908e4b9a95e47954e9/src/scripts/directives/ngController.coffee
1
15
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:raw_corpus
raw_corpus
do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRouteChange(curr...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, curren...
(function(angular) { 'use strict'; var Controller; Controller = class Controller { constructor($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { var controllerName; controllerName = attrs.ngController.split(' ')[0]; return $rootScope.$on(`${...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function(angular) { 'use strict'; var Controller; Controller = class Controller { constructor($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { var controllerName; controllerName = attrs.ngCont...
do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRouteChange(curr...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:completion
completion
do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) ->
controller.onRouteChange(currentRoute.params) if controller.onRouteChange return { link require: 'ngController' restrict: 'A' } angular.module('app').directive 'ngController', ['$log', '$rootScope', Controller]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
c8848363eb83958fd323cfdf2442c0831d53d985
672
https://github.com/CaryLandholt/AngularFun/blob/c8848363eb83958fd323cfdf2442c0831d53d985/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:raw_corpus
raw_corpus
do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> Controller::link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRout...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> Controller::link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (e...
(function(angular) { 'use strict'; var Controller; Controller = class Controller { constructor($log, $rootScope) { Controller.prototype.link = function(scope, element, attrs, controller) { var controllerName; controllerName = attrs.ngController.split(' ')[0]; return $rootScope.$o...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript (function(angular) { 'use strict'; var Controller; Controller = class Controller { constructor($log, $rootScope) { Controller.prototype.link = function(scope, element, attrs, controller) { var controllerName; controllerName = attrs.n...
do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> Controller::link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) -> controller.onRout...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:completion
completion
do (angular) -> 'use strict' class Controller constructor: ($log, $rootScope) -> Controller::link = (scope, element, attrs, controller) -> controllerName = attrs.ngController.split(' ')[0] $rootScope.$on "#{controllerName}$routeChangeSuccess", (event, currentRoute, priorRoute) ->
controller.onRouteChange(currentRoute.params) if controller.onRouteChange return { link: Controller::link require: 'ngController' restrict: 'A' } angular.module('app').directive 'ngController', ['$log', '$rootScope', Controller]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
84cd4633279ad391623504698a20ed4b5560dc77
672
https://github.com/CaryLandholt/AngularFun/blob/84cd4633279ad391623504698a20ed4b5560dc77/src/scripts/directives/ngController.coffee
1
18
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:raw_corpus
raw_corpus
angular.module('app').directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) -> link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$routeChangeSuccess", (event, currentRoute, priorRoute) -> scope.onRouteChange(currentRoute.params) if scope.onRouteChange link: link r...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
11f7ec9a2dd166a2f8c3cd0a3fdbd8787e549c6a
672
https://github.com/CaryLandholt/AngularFun/blob/11f7ec9a2dd166a2f8c3cd0a3fdbd8787e549c6a/src/scripts/directives/ngController.coffee
1
8
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript angular.module('app').directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) -> link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$routeChangeSuccess", (event, currentRoute, priorRoute) -> scope.onRouteChange(cu...
angular.module('app').directive('ngController', [ '$log', '$rootScope', function($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { return $rootScope.$on(`${attrs.ngController}$routeChangeSuccess`, function(event, currentRoute, priorRoute) { if (...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
11f7ec9a2dd166a2f8c3cd0a3fdbd8787e549c6a
672
https://github.com/CaryLandholt/AngularFun/blob/11f7ec9a2dd166a2f8c3cd0a3fdbd8787e549c6a/src/scripts/directives/ngController.coffee
1
8
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript angular.module('app').directive('ngController', [ '$log', '$rootScope', function($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { return $rootScope.$on(`${attrs.ngController}$routeChangeSuccess`, funct...
angular.module('app').directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) -> link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$routeChangeSuccess", (event, currentRoute, priorRoute) -> scope.onRouteChange(currentRoute.params) if scope.onRouteChange link: link r...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
11f7ec9a2dd166a2f8c3cd0a3fdbd8787e549c6a
672
https://github.com/CaryLandholt/AngularFun/blob/11f7ec9a2dd166a2f8c3cd0a3fdbd8787e549c6a/src/scripts/directives/ngController.coffee
1
8
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:raw_corpus
raw_corpus
###global define### define ['directives/directives'], (directives) -> 'use strict' directives.directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) -> link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$routeChangeSuccess", (event, currentRoute, priorRoute) -> ...
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/directives/ngController.coffee
1
13
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ###global define### define ['directives/directives'], (directives) -> 'use strict' directives.directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) -> link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$route...
/*global define*/ define(['directives/directives'], function(directives) { 'use strict'; return directives.directive('ngController', [ '$log', '$rootScope', function($log, $rootScope) { var link; link = function(scope, element, attrs, controller) { return $rootScope.$...
CoffeeScript
JavaScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/directives/ngController.coffee
1
13
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /*global define*/ define(['directives/directives'], function(directives) { 'use strict'; return directives.directive('ngController', [ '$log', '$rootScope', function($log, $rootScope) { var link; link = function(scope, element, ...
###global define### define ['directives/directives'], (directives) -> 'use strict' directives.directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) -> link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$routeChangeSuccess", (event, currentRoute, priorRoute) -> ...
JavaScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/directives/ngController.coffee
1
13
CaryLandholt/AngularFun:src/scripts/directives/ngController.coffee:1:completion
completion
###global define### define ['directives/directives'], (directives) -> 'use strict' directives.directive 'ngController', ['$log', '$rootScope', ($log, $rootScope) ->
link = (scope, element, attrs, controller) -> $rootScope.$on "#{attrs.ngController}$routeChangeSuccess", (event, currentRoute, priorRoute) -> scope.onRouteChange(currentRoute.params) if scope.onRouteChange link: link restrict: 'A' ]
CoffeeScript
CoffeeScript
CaryLandholt/AngularFun
src/scripts/directives/ngController.coffee
MIT
6d23f0be02cb2e938565aca7cb881fd70beefb35
672
https://github.com/CaryLandholt/AngularFun/blob/6d23f0be02cb2e938565aca7cb881fd70beefb35/src/scripts/directives/ngController.coffee
1
13
jianliaoim/talk-os:talk-web/client/util/type.coffee:1:raw_corpus
raw_corpus
type = require 'type-of' exports.isString = (x) -> (type x) is 'string' exports.isNumber = (x) -> (type x) is 'number' exports.isArray = (x) -> (type x) is 'array' exports.isObject = (x) -> (type x) is 'object' exports.isBoolean = (x) -> (type x) is 'boolean' exports.isNull = (x) -> (type x) is 'null'...
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/type.coffee
1
28
jianliaoim/talk-os:talk-web/client/util/type.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript type = require 'type-of' exports.isString = (x) -> (type x) is 'string' exports.isNumber = (x) -> (type x) is 'number' exports.isArray = (x) -> (type x) is 'array' exports.isObject = (x) -> (type x) is 'object' exports.isBoolean = (x) -> (type x) i...
var type; type = require('type-of'); exports.isString = function(x) { return (type(x)) === 'string'; }; exports.isNumber = function(x) { return (type(x)) === 'number'; }; exports.isArray = function(x) { return (type(x)) === 'array'; }; exports.isObject = function(x) { return (type(x)) === 'object'; }; exp...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/util/type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/type.coffee
1
28
jianliaoim/talk-os:talk-web/client/util/type.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var type; type = require('type-of'); exports.isString = function(x) { return (type(x)) === 'string'; }; exports.isNumber = function(x) { return (type(x)) === 'number'; }; exports.isArray = function(x) { return (type(x)) === 'array'; }; exports.isObject =...
type = require 'type-of' exports.isString = (x) -> (type x) is 'string' exports.isNumber = (x) -> (type x) is 'number' exports.isArray = (x) -> (type x) is 'array' exports.isObject = (x) -> (type x) is 'object' exports.isBoolean = (x) -> (type x) is 'boolean' exports.isNull = (x) -> (type x) is 'null'...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/type.coffee
1
28
jianliaoim/talk-os:talk-web/client/util/type.coffee:1:completion
completion
type = require 'type-of' exports.isString = (x) -> (type x) is 'string' exports.isNumber = (x) -> (type x) is 'number' exports.isArray = (x) -> (type x) is 'array' exports.isObject = (x) -> (type x) is 'object'
exports.isBoolean = (x) -> (type x) is 'boolean' exports.isNull = (x) -> (type x) is 'null' exports.isUndefined = (x) -> (type x) is 'undefined' exports.isFunction = (x) -> (type x) is 'function' exports.isElement = (x) -> (type x) is 'element'
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/util/type.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/type.coffee
1
28
nicolaskruchten/pivottable:src/c3_renderers.coffee:1:raw_corpus
raw_corpus
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery"), require("c3") else if typeof define is "function" and define.amd # AMD define ["jquery", "c3"], pivotModule # Plain browser env else pivotModule...
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
1
50
nicolaskruchten/pivottable:src/c3_renderers.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery"), require("c3") else if typeof define is "function" and define.amd # AMD define ["jquery", "c3"], pivotMo...
var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery"), require("c3")); } else if (typeof define === "function" && define.amd) { // AMD return define(["jquery", "c3"], pivotModule); } e...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
1
50
nicolaskruchten/pivottable:src/c3_renderers.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var callWithJQuery; callWithJQuery = function(pivotModule) { if (typeof exports === "object" && typeof module === "object") { // CommonJS return pivotModule(require("jquery"), require("c3")); } else if (typeof define === "function" && define.amd) { // AMD ...
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery"), require("c3") else if typeof define is "function" and define.amd # AMD define ["jquery", "c3"], pivotModule # Plain browser env else pivotModule...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
1
50
nicolaskruchten/pivottable:src/c3_renderers.coffee:1:completion
completion
callWithJQuery = (pivotModule) -> if typeof exports is "object" and typeof module is "object" # CommonJS pivotModule require("jquery"), require("c3") else if typeof define is "function" and define.amd # AMD define ["jquery", "c3"], pivotModule # Plain browser env else pivotModule...
rowKeys.push [] if rowKeys.length == 0 colKeys = pivotData.getColKeys() colKeys.push [] if colKeys.length == 0 headers = (h.join("-") for h in colKeys) rotationAngle = 0 fullAggName = pivotData.aggregatorName if pivotData.valAttrs.length fullAggName += "(#{p...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
1
50
nicolaskruchten/pivottable:src/c3_renderers.coffee:2:raw_corpus
raw_corpus
series = vals.slice(2).join("-") if series == "" then series = "series" scatterData.x[series] ?= [] scatterData.y[series] ?= [] scatterData.t[series] ?= [] scatterData.y[series].push vals[0] ? 0 ...
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
51
100
nicolaskruchten/pivottable:src/c3_renderers.coffee:2:completion
completion
series = vals.slice(2).join("-") if series == "" then series = "series" scatterData.x[series] ?= [] scatterData.y[series] ?= [] scatterData.t[series] ?= [] scatterData.y[series].push vals[0] ? 0 ...
columns.push row vAxisTitle = fullAggName if chartOpts.horizontal hAxisTitle = pivotData.rowAttrs.join("-") groupByTitle = pivotData.colAttrs.join("-") else hAxisTitle = pivotData.colAttrs.join("-") groupByTitle = pivo...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
51
100
nicolaskruchten/pivottable:src/c3_renderers.coffee:3:raw_corpus
raw_corpus
x: label: hAxisTitle tick: rotate: rotationAngle multiline: false data: type: chartOpts.type order: null tooltip: grouped: false color: ...
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
101
150
nicolaskruchten/pivottable:src/c3_renderers.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript x: label: hAxisTitle tick: rotate: rotationAngle multiline: false data: type: chartOpts.type order: null tooltip: ...
var base, c, categories, dataColumns, headers, numSeries, params, s, xs; ({ x: { label: hAxisTitle, tick: { rotate: rotationAngle, multiline: false } }, data: { type: chartOpts.type, order: null }, tooltip: { grouped: false }, color: { pattern: ["#3366cc", "#dc3912...
CoffeeScript
JavaScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
101
150
nicolaskruchten/pivottable:src/c3_renderers.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var base, c, categories, dataColumns, headers, numSeries, params, s, xs; ({ x: { label: hAxisTitle, tick: { rotate: rotationAngle, multiline: false } }, data: { type: chartOpts.type, order: null }, tooltip: { grouped: ...
x: label: hAxisTitle tick: rotate: rotationAngle multiline: false data: type: chartOpts.type order: null tooltip: grouped: false color: ...
JavaScript
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
101
150
nicolaskruchten/pivottable:src/c3_renderers.coffee:3:completion
completion
x: label: hAxisTitle tick: rotate: rotationAngle multiline: false data: type: chartOpts.type order: null tooltip: grouped: false color: ...
xs[s] = s+"_x" dataColumns.push [s+"_x"].concat(scatterData.x[s]) dataColumns.push [s].concat(scatterData.y[s]) params.data.xs = xs params.data.columns = dataColumns params.axis.x.tick = fit: false if numSeries == 1 params.l...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
101
150
nicolaskruchten/pivottable:src/c3_renderers.coffee:4:raw_corpus
raw_corpus
params.data.rows = columns else params.axis.x.categories = headers params.data.columns = columns if chartOpts.stacked if chartOpts.horizontal params.data.groups = [x.join("-") for x in colKeys] else params.data...
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
151
178
nicolaskruchten/pivottable:src/c3_renderers.coffee:4:completion
completion
params.data.rows = columns else params.axis.x.categories = headers params.data.columns = columns if chartOpts.stacked if chartOpts.horizontal params.data.groups = [x.join("-") for x in colKeys] else params.data...
params.bindto = result[0] c3.generate params result.detach() renderArea.remove() return $("<div>").append title, result $.pivotUtilities.c3_renderers = "Horizontal Bar Chart": makeC3Chart(type: "bar", horizontal: true) "Horizontal Stacked Bar Chart": makeC3Chart(type...
CoffeeScript
CoffeeScript
nicolaskruchten/pivottable
src/c3_renderers.coffee
MIT
854d821b1727b0b85f65d709fd7d0ab610a4cc06
4,440
https://github.com/nicolaskruchten/pivottable/blob/854d821b1727b0b85f65d709fd7d0ab610a4cc06/src/c3_renderers.coffee
151
178
gss/engine:src/document/commands/Unit.coffee:1:raw_corpus
raw_corpus
Variable = require('../../engine/commands/Variable') class Unit extends Variable signature: [ value: ['Variable', 'Number'] ] # Dynamic lengths getProperty: (operation) -> parent = operation while parent = parent.parent if parent.command.type == 'Assignment' return parent[1] Dep...
CoffeeScript
gss/engine
src/document/commands/Unit.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/commands/Unit.coffee
1
50
gss/engine:src/document/commands/Unit.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Variable = require('../../engine/commands/Variable') class Unit extends Variable signature: [ value: ['Variable', 'Number'] ] # Dynamic lengths getProperty: (operation) -> parent = operation while parent = parent.parent if parent.com...
var Unit, Variable; Variable = require('../../engine/commands/Variable'); Unit = (function() { class Unit extends Variable { // Dynamic lengths getProperty(operation) { var parent; parent = operation; while (parent = parent.parent) { if (parent.command.type === 'Assignment') { ...
CoffeeScript
JavaScript
gss/engine
src/document/commands/Unit.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/commands/Unit.coffee
1
50
gss/engine:src/document/commands/Unit.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Unit, Variable; Variable = require('../../engine/commands/Variable'); Unit = (function() { class Unit extends Variable { // Dynamic lengths getProperty(operation) { var parent; parent = operation; while (parent = parent.parent) { ...
Variable = require('../../engine/commands/Variable') class Unit extends Variable signature: [ value: ['Variable', 'Number'] ] # Dynamic lengths getProperty: (operation) -> parent = operation while parent = parent.parent if parent.command.type == 'Assignment' return parent[1] Dep...
JavaScript
CoffeeScript
gss/engine
src/document/commands/Unit.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/commands/Unit.coffee
1
50
gss/engine:src/document/commands/Unit.coffee:1:completion
completion
Variable = require('../../engine/commands/Variable') class Unit extends Variable signature: [ value: ['Variable', 'Number'] ] # Dynamic lengths getProperty: (operation) -> parent = operation while parent = parent.parent if parent.command.type == 'Assignment' return parent[1] Dep...
'left': 'containing-width' 'right': 'containing-width' 'width': 'containing-width' 'min-width': 'containing-width' 'max-width': 'containing-width' 'text-width': 'containing-width' 'top': 'contai...
CoffeeScript
CoffeeScript
gss/engine
src/document/commands/Unit.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/commands/Unit.coffee
1
50
gss/engine:src/document/commands/Unit.coffee:2:raw_corpus
raw_corpus
path = @engine.getPath(engine.scope._gss_id, 'computed-font-size') return ['*', ['px', value] , ['get', path]] vw: (value, engine, operation, continuation, scope) -> return ['*', ['/', ['px', value], 100] , ['get', '::window[width]']] vh: (value, engine, operation, continuation, scope) -> re...
CoffeeScript
gss/engine
src/document/commands/Unit.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/commands/Unit.coffee
51
66
gss/engine:src/document/commands/Unit.coffee:2:completion
completion
path = @engine.getPath(engine.scope._gss_id, 'computed-font-size') return ['*', ['px', value] , ['get', path]] vw: (value, engine, operation, continuation, scope) -> return ['*', ['/', ['px', value], 100] , ['get', '::window[width]']] vh: (value, engine, operation, continuation, scope) -> re...
vmin: (value, engine, operation, continuation, scope) -> return ['*', ['/', ['px', value], 100] , ['min', ['get', '::window[height]'], ['get', '::window[width]']]] vmax: (value, engine, operation, continuation, scope) -> return ['*', ['/', ['px', value], 100] , ['max', ['get', '::window[height]'], ['ge...
CoffeeScript
CoffeeScript
gss/engine
src/document/commands/Unit.coffee
MIT
be430ea249f8030e11c8e03a8e170dcc8b8cf5fb
2,854
https://github.com/gss/engine/blob/be430ea249f8030e11c8e03a8e170dcc8b8cf5fb/src/document/commands/Unit.coffee
51
66
jianliaoim/talk-os:talk-web/client/mixin/select-emoji.coffee:1:raw_corpus
raw_corpus
React = require 'react' LightPopover = React.createFactory require '../module/light-popover' EmojiTable = React.createFactory require '../app/emoji-table' module.exports = # methods need to implement # getEmojiTableBaseArea: -> # onEmojiSelect: (data) -> getInitialState: -> showEmojiTable: false pos...
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/select-emoji.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/select-emoji.coffee
1
36
jianliaoim/talk-os:talk-web/client/mixin/select-emoji.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript React = require 'react' LightPopover = React.createFactory require '../module/light-popover' EmojiTable = React.createFactory require '../app/emoji-table' module.exports = # methods need to implement # getEmojiTableBaseArea: -> # onEmojiSelect: (data) -...
var EmojiTable, LightPopover, React; React = require('react'); LightPopover = React.createFactory(require('../module/light-popover')); EmojiTable = React.createFactory(require('../app/emoji-table')); module.exports = { // methods need to implement // getEmojiTableBaseArea: -> // onEmojiSelect: (data) -> get...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/mixin/select-emoji.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/select-emoji.coffee
1
36
jianliaoim/talk-os:talk-web/client/mixin/select-emoji.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var EmojiTable, LightPopover, React; React = require('react'); LightPopover = React.createFactory(require('../module/light-popover')); EmojiTable = React.createFactory(require('../app/emoji-table')); module.exports = { // methods need to implement // getEmo...
React = require 'react' LightPopover = React.createFactory require '../module/light-popover' EmojiTable = React.createFactory require '../app/emoji-table' module.exports = # methods need to implement # getEmojiTableBaseArea: -> # onEmojiSelect: (data) -> getInitialState: -> showEmojiTable: false pos...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/select-emoji.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/select-emoji.coffee
1
36
jianliaoim/talk-os:talk-web/client/mixin/select-emoji.coffee:1:completion
completion
React = require 'react' LightPopover = React.createFactory require '../module/light-popover' EmojiTable = React.createFactory require '../app/emoji-table' module.exports = # methods need to implement # getEmojiTableBaseArea: -> # onEmojiSelect: (data) -> getInitialState: -> showEmojiTable: false pos...
onEmojiTableClick: (event) -> event.preventDefault() event.stopPropagation() @setState showEmojiTable: (not @state.showEmojiTable) onEmojiTableClose: -> @setState showEmojiTable: false renderEmojiTable: -> LightPopover name: 'emoji-table' showClose: false baseArea: if @state....
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/mixin/select-emoji.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/mixin/select-emoji.coffee
1
36
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'setting-rookie' mixins: [] getInitialState: -> avatarName: '' avatarUrl: query.user(recorder.getState())?.get('avatarUrl') or '' onNameChange: (event) -> avatarName = event.target.value @setState avatarName: avatarName onRookieComplete:...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
25
74
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'setting-rookie' mixins: [] getInitialState: -> avatarName: '' avatarUrl: query.user(recorder.getState())?.get('avatarUrl') or '' onNameChange: (event) -> avatarName = event.target.value @s...
module.exports = React.createClass({ displayName: 'setting-rookie', mixins: [], getInitialState: function() { var ref; return { avatarName: '', avatarUrl: ((ref = query.user(recorder.getState())) != null ? ref.get('avatarUrl') : void 0) || '' }; }, onNameChange: function(event) { v...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
25
74
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'setting-rookie', mixins: [], getInitialState: function() { var ref; return { avatarName: '', avatarUrl: ((ref = query.user(recorder.getState())) != null ? ref.get('avatarUrl') : void 0) ||...
module.exports = React.createClass displayName: 'setting-rookie' mixins: [] getInitialState: -> avatarName: '' avatarUrl: query.user(recorder.getState())?.get('avatarUrl') or '' onNameChange: (event) -> avatarName = event.target.value @setState avatarName: avatarName onRookieComplete:...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
25
74
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:1:completion
completion
module.exports = React.createClass displayName: 'setting-rookie' mixins: [] getInitialState: -> avatarName: '' avatarUrl: query.user(recorder.getState())?.get('avatarUrl') or '' onNameChange: (event) -> avatarName = event.target.value @setState avatarName: avatarName onRookieComplete:...
if err console.error err else @setState avatarUrl: imageEL.toDataURL() analytics.updateAvatar() onUploaderComplete: ({fileData}) -> _userId = query.userId(recorder.getState()) userActions.userUpdate _userId, avatarUrl: fileData.thumbnailUrl @setState avatarUrl: fileData.thumbnailU...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
25
74
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:2:raw_corpus
raw_corpus
div className: 'data-avatar', style: avatarStyle, onClick: @onFileClick, i className: 'ti ti-camera' render: -> buttonClassName = cx 'button': true 'is-disabled': @state.avatarName.length is 0 div className: 'setting-rookie setting-wrapper', div className: 'header', lang.getText 'set...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
75
93
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript div className: 'data-avatar', style: avatarStyle, onClick: @onFileClick, i className: 'ti ti-camera' render: -> buttonClassName = cx 'button': true 'is-disabled': @state.avatarName.length is 0 div className: 'setting-rookie setting-w...
div({ className: 'data-avatar', style: avatarStyle, onClick: this.onFileClick }, i({ className: 'ti ti-camera' })); ({ render: function() { var buttonClassName; buttonClassName = cx({ 'button': true, 'is-disabled': this.state.avatarName.length === 0 }); return div({ classNam...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
75
93
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript div({ className: 'data-avatar', style: avatarStyle, onClick: this.onFileClick }, i({ className: 'ti ti-camera' })); ({ render: function() { var buttonClassName; buttonClassName = cx({ 'button': true, 'is-disabled': this.state.avatarNa...
div className: 'data-avatar', style: avatarStyle, onClick: @onFileClick, i className: 'ti ti-camera' render: -> buttonClassName = cx 'button': true 'is-disabled': @state.avatarName.length is 0 div className: 'setting-rookie setting-wrapper', div className: 'header', lang.getText 'set...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
75
93
jianliaoim/talk-os:talk-web/client/app/setting-rookie.coffee:2:completion
completion
div className: 'data-avatar', style: avatarStyle, onClick: @onFileClick, i className: 'ti ti-camera' render: -> buttonClassName = cx 'button': true 'is-disabled': @state.avatarName.length is 0 div className: 'setting-rookie setting-wrapper',
div className: 'header', lang.getText 'setting-rookie' div className: 'content', @renderUpload() div className: 'data-name', input className: 'input' placeholder: lang.getText 'enter-your-name' defaultValue: @state.avatarName onChange: @onN...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/setting-rookie.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/setting-rookie.coffee
75
93
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:raw_corpus
raw_corpus
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml('p', { headless: true }).importDocument(emptyDoc) eq( main.end() '<p><b>Hello World</b></p>' )
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml('p', { headless: true }).importDocument(emptyDoc) eq( ...
suite('Tests specific to issues:', function() { return test('Issue #213: importDocument created from begin()', function() { var boldDoc, emptyDoc, main; boldDoc = xml('b').text('Hello World'); emptyDoc = doc().importDocument(boldDoc); main = xml('p', { headless: true }).importDocument(emptyD...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Tests specific to issues:', function() { return test('Issue #213: importDocument created from begin()', function() { var boldDoc, emptyDoc, main; boldDoc = xml('b').text('Hello World'); emptyDoc = doc().importDocument(boldDoc); main = xml('...
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml('p', { headless: true }).importDocument(emptyDoc) eq( main.end() '<p><b>Hello World</b></p>' )
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:completion
completion
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml('p', { headless: true }).importDocument(emptyDoc)
eq( main.end() '<p><b>Hello World</b></p>' )
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:raw_corpus
raw_corpus
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(emptyDoc) eq( main.end() '<p><b>Hello World</b></p>' )
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd
926
https://github.com/oozcitak/xmlbuilder-js/blob/95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(emptyDoc) eq( ...
suite('Tests specific to issues:', function() { return test('Issue #213: importDocument created from begin()', function() { var boldDoc, emptyDoc, main; boldDoc = xml('b').text('Hello World'); emptyDoc = doc().importDocument(boldDoc); main = xml({ headless: true }, 'p').importDocument(emptyD...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd
926
https://github.com/oozcitak/xmlbuilder-js/blob/95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Tests specific to issues:', function() { return test('Issue #213: importDocument created from begin()', function() { var boldDoc, emptyDoc, main; boldDoc = xml('b').text('Hello World'); emptyDoc = doc().importDocument(boldDoc); main = xml({...
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(emptyDoc) eq( main.end() '<p><b>Hello World</b></p>' )
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd
926
https://github.com/oozcitak/xmlbuilder-js/blob/95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:completion
completion
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') emptyDoc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(emptyDoc)
eq( main.end() '<p><b>Hello World</b></p>' )
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd
926
https://github.com/oozcitak/xmlbuilder-js/blob/95ea49d8daa8f257647b0bda55bc02d6fdd4b6cd/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:raw_corpus
raw_corpus
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') doc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(doc) eq( main.end() '<p><b>Hello World</b></p>' )
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
3c926477ed15707918c2950573ffb4f4f1fc1b8a
926
https://github.com/oozcitak/xmlbuilder-js/blob/3c926477ed15707918c2950573ffb4f4f1fc1b8a/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') doc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(doc) eq( main.e...
suite('Tests specific to issues:', function() { return test('Issue #213: importDocument created from begin()', function() { var boldDoc, doc, main; boldDoc = xml('b').text('Hello World'); doc = doc().importDocument(boldDoc); main = xml({ headless: true }, 'p').importDocument(doc); return...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
3c926477ed15707918c2950573ffb4f4f1fc1b8a
926
https://github.com/oozcitak/xmlbuilder-js/blob/3c926477ed15707918c2950573ffb4f4f1fc1b8a/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('Tests specific to issues:', function() { return test('Issue #213: importDocument created from begin()', function() { var boldDoc, doc, main; boldDoc = xml('b').text('Hello World'); doc = doc().importDocument(boldDoc); main = xml({ hea...
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') doc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(doc) eq( main.end() '<p><b>Hello World</b></p>' )
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
3c926477ed15707918c2950573ffb4f4f1fc1b8a
926
https://github.com/oozcitak/xmlbuilder-js/blob/3c926477ed15707918c2950573ffb4f4f1fc1b8a/test/issues/213.coffee
1
10
oozcitak/xmlbuilder-js:test/issues/213.coffee:1:completion
completion
suite 'Tests specific to issues:', -> test 'Issue #213: importDocument created from begin()', -> boldDoc = xml('b').text('Hello World') doc = doc().importDocument(boldDoc) main = xml({ headless: true }, 'p').importDocument(doc)
eq( main.end() '<p><b>Hello World</b></p>' )
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/issues/213.coffee
MIT
3c926477ed15707918c2950573ffb4f4f1fc1b8a
926
https://github.com/oozcitak/xmlbuilder-js/blob/3c926477ed15707918c2950573ffb4f4f1fc1b8a/test/issues/213.coffee
1
10
AriaMinaei/pretty-error:test/parsed-error.spec.coffee:1:raw_corpus
raw_corpus
error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what return null catch e return e else throw Error "bad argument for error" describe "ParsedError", -> describe "constructor()", -> it "should accept Error() instances", -> ...
CoffeeScript
AriaMinaei/pretty-error
test/parsed-error.spec.coffee
MIT
435bd1d5d4def111e174c9cfc756d8aeba09df6a
1,524
https://github.com/AriaMinaei/pretty-error/blob/435bd1d5d4def111e174c9cfc756d8aeba09df6a/test/parsed-error.spec.coffee
6
55
AriaMinaei/pretty-error:test/parsed-error.spec.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what return null catch e return e else throw Error "bad argument for error" describe "ParsedError", -> describe "construc...
var error; error = function(what) { var e; if (typeof what === 'string') { return error(function() { throw Error(what); }); } else if (what instanceof Function) { try { what(); return null; } catch (error1) { e = error1; return e; } } else { throw Error("ba...
CoffeeScript
JavaScript
AriaMinaei/pretty-error
test/parsed-error.spec.coffee
MIT
435bd1d5d4def111e174c9cfc756d8aeba09df6a
1,524
https://github.com/AriaMinaei/pretty-error/blob/435bd1d5d4def111e174c9cfc756d8aeba09df6a/test/parsed-error.spec.coffee
6
55
AriaMinaei/pretty-error:test/parsed-error.spec.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var error; error = function(what) { var e; if (typeof what === 'string') { return error(function() { throw Error(what); }); } else if (what instanceof Function) { try { what(); return null; } catch (error1) { e = error...
error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what return null catch e return e else throw Error "bad argument for error" describe "ParsedError", -> describe "constructor()", -> it "should accept Error() instances", -> ...
JavaScript
CoffeeScript
AriaMinaei/pretty-error
test/parsed-error.spec.coffee
MIT
435bd1d5d4def111e174c9cfc756d8aeba09df6a
1,524
https://github.com/AriaMinaei/pretty-error/blob/435bd1d5d4def111e174c9cfc756d8aeba09df6a/test/parsed-error.spec.coffee
6
55
AriaMinaei/pretty-error:test/parsed-error.spec.coffee:1:completion
completion
error = (what) -> if typeof what is 'string' return error -> throw Error what else if what instanceof Function try do what return null catch e return e else throw Error "bad argument for error" describe "ParsedError", -> describe "constructor()", -> it "should accept Error() instances", -> ...
describe "message", -> it "should return the original error message", -> e = new ParsedError error 'a' e.message.should.equal 'a' describe "kind", -> it "should return 'Error' for normal error", -> e = new ParsedError error 'a' e.kind.should.equal 'Error' it "should recognize 'ReferenceError'", -> ...
CoffeeScript
CoffeeScript
AriaMinaei/pretty-error
test/parsed-error.spec.coffee
MIT
435bd1d5d4def111e174c9cfc756d8aeba09df6a
1,524
https://github.com/AriaMinaei/pretty-error/blob/435bd1d5d4def111e174c9cfc756d8aeba09df6a/test/parsed-error.spec.coffee
6
55
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:1:raw_corpus
raw_corpus
module.exports = React.createClass displayName: 'roster-modal' mixins: [ mixinQuery, mixinSubscribe, mixinUser, PureRenderMixin ] propTypes: _teamId: T.string.isRequired onClose: T.func onSubmit: T.func isRemovable: T.bool selectedContacts: T.instanceOf Immutable.List getDefaultProps: -> ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
21
70
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = React.createClass displayName: 'roster-modal' mixins: [ mixinQuery, mixinSubscribe, mixinUser, PureRenderMixin ] propTypes: _teamId: T.string.isRequired onClose: T.func onSubmit: T.func isRemovable: T.bool selectedConta...
module.exports = React.createClass({ displayName: 'roster-modal', mixins: [mixinQuery, mixinSubscribe, mixinUser, PureRenderMixin], propTypes: { _teamId: T.string.isRequired, onClose: T.func, onSubmit: T.func, isRemovable: T.bool, selectedContacts: T.instanceOf(Immutable.List) }, getDefaul...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
21
70
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript module.exports = React.createClass({ displayName: 'roster-modal', mixins: [mixinQuery, mixinSubscribe, mixinUser, PureRenderMixin], propTypes: { _teamId: T.string.isRequired, onClose: T.func, onSubmit: T.func, isRemovable: T.bool, selected...
module.exports = React.createClass displayName: 'roster-modal' mixins: [ mixinQuery, mixinSubscribe, mixinUser, PureRenderMixin ] propTypes: _teamId: T.string.isRequired onClose: T.func onSubmit: T.func isRemovable: T.bool selectedContacts: T.instanceOf Immutable.List getDefaultProps: -> ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
21
70
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:1:completion
completion
module.exports = React.createClass displayName: 'roster-modal' mixins: [ mixinQuery, mixinSubscribe, mixinUser, PureRenderMixin ] propTypes: _teamId: T.string.isRequired onClose: T.func onSubmit: T.func isRemovable: T.bool selectedContacts: T.instanceOf Immutable.List getDefaultProps: -> ...
componentDidMount: -> @subscribe recorder, => contacts = @filterContacts @getContacts() groups = @filterGroups @getGroups(), contacts @setState groups: groups contacts: contacts filterContacts: (contacts) -> contacts .filterNot refine.byId @getUserId() .sortBy reord...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
21
70
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:2:raw_corpus
raw_corpus
.filterNot refine.isRobot .map (contact) -> contact.get '_id' Immutable.fromJS _id: 'all' _memberIds: _memberIds name: lang.getText 'everybody' handleSelectContact: (contact) -> targetId = contact.get '_id' selectedContacts = @state.selectedContacts if selectedContacts.i...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
71
120
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:2:completion
completion
.filterNot refine.isRobot .map (contact) -> contact.get '_id' Immutable.fromJS _id: 'all' _memberIds: _memberIds name: lang.getText 'everybody' handleSelectContact: (contact) -> targetId = contact.get '_id' selectedContacts = @state.selectedContacts if selectedContacts.i...
selectedGroups = @state.selectedGroups selectedContacts = @state.selectedContacts if selectedGroups.includes targetId selectedGroups = selectedGroups.filterNot (id) -> id is targetId selectedContacts = selectedContacts.filterNot (id) -> targetGroup.get('_memberIds').includes id ...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
71
120
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:3:raw_corpus
raw_corpus
render: -> div className: 'roster-modal', div className: 'column-2', @renderGroups() @renderContacts() @renderSubmit() renderContacts: -> if not @props.isRemovable staticSelects = @props.selectedContacts RosterList _teamId: @props._teamId type: 'contact' ...
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
121
157
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript render: -> div className: 'roster-modal', div className: 'column-2', @renderGroups() @renderContacts() @renderSubmit() renderContacts: -> if not @props.isRemovable staticSelects = @props.selectedContacts RosterLis...
({ render: function() { return div({ className: 'roster-modal' }, div({ className: 'column-2' }, this.renderGroups(), this.renderContacts()), this.renderSubmit()); }, renderContacts: function() { var staticSelects; if (!this.props.isRemovable) { staticSelects = this.props.sel...
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
121
157
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript ({ render: function() { return div({ className: 'roster-modal' }, div({ className: 'column-2' }, this.renderGroups(), this.renderContacts()), this.renderSubmit()); }, renderContacts: function() { var staticSelects; if (!this.pr...
render: -> div className: 'roster-modal', div className: 'column-2', @renderGroups() @renderContacts() @renderSubmit() renderContacts: -> if not @props.isRemovable staticSelects = @props.selectedContacts RosterList _teamId: @props._teamId type: 'contact' ...
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
121
157
jianliaoim/talk-os:talk-web/client/app/roster-modal.coffee:3:completion
completion
render: -> div className: 'roster-modal', div className: 'column-2', @renderGroups() @renderContacts() @renderSubmit() renderContacts: -> if not @props.isRemovable staticSelects = @props.selectedContacts RosterList _teamId: @props._teamId type: 'contact' ...
staticSelects: staticSelects or Immutable.List() renderGroups: -> RosterList _teamId: @props._teamId type: 'group' title: lang.getText 'team-groups' rosters: @state.groups selects: @state.selectedGroups onSelect: @handleSelectGroup className: 'group' showSearch: fa...
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/app/roster-modal.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/roster-modal.coffee
121
157
Atraci/Atraci:coffee/_utils.coffee:1:raw_corpus
raw_corpus
class Utils @filterSymbols: (name) -> return name.replace(/([.*+?^=!:${}()|\[\]\/\\ ])/g, '') @getYoutubePlaylistId: (link) -> re = /// ^.*(youtu.be\/|list=) ([^#\&\?]*).* /// match = link.match(re) if match and match[2] return match[2] else return undefined @crea...
CoffeeScript
Atraci/Atraci
coffee/_utils.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_utils.coffee
1
21
Atraci/Atraci:coffee/_utils.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript class Utils @filterSymbols: (name) -> return name.replace(/([.*+?^=!:${}()|\[\]\/\\ ])/g, '') @getYoutubePlaylistId: (link) -> re = /// ^.*(youtu.be\/|list=) ([^#\&\?]*).* /// match = link.match(re) if match and match[2] ...
var Utils; Utils = class Utils { static filterSymbols(name) { return name.replace(/([.*+?^=!:${}()|\[\]\/\\ ])/g, ''); } static getYoutubePlaylistId(link) { var match, re; re = /^.*(youtu.be\/|list=)([^#\&\?]*).*/; match = link.match(re); if (match && match[2]) { return match[2]; }...
CoffeeScript
JavaScript
Atraci/Atraci
coffee/_utils.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_utils.coffee
1
21
Atraci/Atraci:coffee/_utils.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var Utils; Utils = class Utils { static filterSymbols(name) { return name.replace(/([.*+?^=!:${}()|\[\]\/\\ ])/g, ''); } static getYoutubePlaylistId(link) { var match, re; re = /^.*(youtu.be\/|list=)([^#\&\?]*).*/; match = link.match(re); ...
class Utils @filterSymbols: (name) -> return name.replace(/([.*+?^=!:${}()|\[\]\/\\ ])/g, '') @getYoutubePlaylistId: (link) -> re = /// ^.*(youtu.be\/|list=) ([^#\&\?]*).* /// match = link.match(re) if match and match[2] return match[2] else return undefined @crea...
JavaScript
CoffeeScript
Atraci/Atraci
coffee/_utils.coffee
MIT
d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca
800
https://github.com/Atraci/Atraci/blob/d3fd00622f5f2e6c5d402c7a1ef2cd693f35e9ca/coffee/_utils.coffee
1
21