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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail
expect($scope.$$childHead.form).toBe $builder.forms.default... | it('compile fb-form', function() {
var $formObject, view;
$scope.input = [];
view = $compile(template)($scope);
$scope.$digest();
expect($scope.$$childHead).toBe($scope.$$childTail);
expect($scope.$$childHead.form).toBe($builder.forms.default);
$formObject = $(view).find('.fb-form-object');
expect($form... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 521099b060370087e587945e9c29eeb79023bfee | 600 | https://github.com/kelp404/angular-form-builder/blob/521099b060370087e587945e9c29eeb79023bfee/test/specs/directiveSpec.coffee | 139 | 148 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('compile fb-form', function() {
var $formObject, view;
$scope.input = [];
view = $compile(template)($scope);
$scope.$digest();
expect($scope.$$childHead).toBe($scope.$$childTail);
expect($scope.$$childHead.form).toBe($builder.forms.default);
$formO... | it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail
expect($scope.$$childHead.form).toBe $builder.forms.default
$formObject = $(view).find '.fb-form-object'... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 521099b060370087e587945e9c29eeb79023bfee | 600 | https://github.com/kelp404/angular-form-builder/blob/521099b060370087e587945e9c29eeb79023bfee/test/specs/directiveSpec.coffee | 139 | 148 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:completion | completion | it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail | expect($scope.$$childHead.form).toBe $builder.forms.default
$formObject = $(view).find '.fb-form-object'
expect($formObject.length).toBe 1
expect($formObject.attr('ng-repeat')).toEqual 'object in form'
expect($formObject.attr('fb-form-object')).toEqual 'object' | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 521099b060370087e587945e9c29eeb79023bfee | 600 | https://github.com/kelp404/angular-form-builder/blob/521099b060370087e587945e9c29eeb79023bfee/test/specs/directiveSpec.coffee | 139 | 148 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:3:raw_corpus | raw_corpus | it 'compile fb-component and called `$drag.draggable()`', inject ($drag) ->
componentName = Object.keys($builder.components)[0]
spyOn($drag, 'draggable').andCallFake ($element, object) ->
expect($element.length).toBe 1
expect($element.hasClass('fb-component')).toB... | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 108a1c8a8866c5e3cecb17b52a95e0e0a52bd343 | 600 | https://github.com/kelp404/angular-form-builder/blob/108a1c8a8866c5e3cecb17b52a95e0e0a52bd343/test/specs/directiveSpec.coffee | 83 | 132 | ||
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:3:completion | completion | it 'compile fb-component and called `$drag.draggable()`', inject ($drag) ->
componentName = Object.keys($builder.components)[0]
spyOn($drag, 'draggable').andCallFake ($element, object) ->
expect($element.length).toBe 1
expect($element.hasClass('fb-component')).toB... | describe 'fb-form', ->
$scope = null
$compile = null
$builder = null
template = """<div ng-model="input" fb-form="default"></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
$compile = $injector.get '$compile'
$b... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 108a1c8a8866c5e3cecb17b52a95e0e0a52bd343 | 600 | https://github.com/kelp404/angular-form-builder/blob/108a1c8a8866c5e3cecb17b52a95e0e0a52bd343/test/specs/directiveSpec.coffee | 83 | 132 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:2:raw_corpus | raw_corpus | describe 'fb-component', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
$compile = $injector.get '$compile'
$builder = $inject... | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 2d33585d96ef887b60d68d189c36c1fc17bb352f | 600 | https://github.com/kelp404/angular-form-builder/blob/2d33585d96ef887b60d68d189c36c1fc17bb352f/test/specs/directiveSpec.coffee | 43 | 80 | ||
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'fb-component', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
$compile ... | describe('fb-component', function() {
var $builder, $compile, $scope, template;
$scope = null;
$compile = null;
$builder = null;
template = `<div fb-components></div>`;
beforeEach(inject(function($rootScope, $injector) {
$scope = $rootScope.$new();
$compile = $injector.get('$compile');
$builder ... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 2d33585d96ef887b60d68d189c36c1fc17bb352f | 600 | https://github.com/kelp404/angular-form-builder/blob/2d33585d96ef887b60d68d189c36c1fc17bb352f/test/specs/directiveSpec.coffee | 43 | 80 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('fb-component', function() {
var $builder, $compile, $scope, template;
$scope = null;
$compile = null;
$builder = null;
template = `<div fb-components></div>`;
beforeEach(inject(function($rootScope, $injector) {
$scope = $rootScope.$new();
... | describe 'fb-component', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
$compile = $injector.get '$compile'
$builder = $inject... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 2d33585d96ef887b60d68d189c36c1fc17bb352f | 600 | https://github.com/kelp404/angular-form-builder/blob/2d33585d96ef887b60d68d189c36c1fc17bb352f/test/specs/directiveSpec.coffee | 43 | 80 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:2:completion | completion | describe 'fb-component', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
$compile = $injector.get '$compile'
$builder = $inject... | <div class="form-group">
<label for="{{name+index}}" class="col-md-4 control-label" ng-class="{'fb-required':required}">{{label}}</label>
<div class="col-md-8">
<input type="text" ng-model="inputText" validator-required="{{required}}" id="{{nam... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 2d33585d96ef887b60d68d189c36c1fc17bb352f | 600 | https://github.com/kelp404/angular-form-builder/blob/2d33585d96ef887b60d68d189c36c1fc17bb352f/test/specs/directiveSpec.coffee | 43 | 80 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:raw_corpus | raw_corpus | it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail
expect($scope.$$childHead.formName).toEqual 'default'
expect($scope.$$childHead.form).toBe $builder.form... | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | ef326559d274fa121ba2dc9ef55bff0c2b876547 | 600 | https://github.com/kelp404/angular-form-builder/blob/ef326559d274fa121ba2dc9ef55bff0c2b876547/test/specs/directiveSpec.coffee | 139 | 149 | ||
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail
expect($scope.$$childHead.formName).toEqual 'default'
... | it('compile fb-form', function() {
var $formObject, view;
$scope.input = [];
view = $compile(template)($scope);
$scope.$digest();
expect($scope.$$childHead).toBe($scope.$$childTail);
expect($scope.$$childHead.formName).toEqual('default');
expect($scope.$$childHead.form).toBe($builder.forms.default);
$fo... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | ef326559d274fa121ba2dc9ef55bff0c2b876547 | 600 | https://github.com/kelp404/angular-form-builder/blob/ef326559d274fa121ba2dc9ef55bff0c2b876547/test/specs/directiveSpec.coffee | 139 | 149 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('compile fb-form', function() {
var $formObject, view;
$scope.input = [];
view = $compile(template)($scope);
$scope.$digest();
expect($scope.$$childHead).toBe($scope.$$childTail);
expect($scope.$$childHead.formName).toEqual('default');
expect($scop... | it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail
expect($scope.$$childHead.formName).toEqual 'default'
expect($scope.$$childHead.form).toBe $builder.form... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | ef326559d274fa121ba2dc9ef55bff0c2b876547 | 600 | https://github.com/kelp404/angular-form-builder/blob/ef326559d274fa121ba2dc9ef55bff0c2b876547/test/specs/directiveSpec.coffee | 139 | 149 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:5:completion | completion | it 'compile fb-form', ->
$scope.input = []
view = $compile(template) $scope
$scope.$digest()
expect($scope.$$childHead).toBe $scope.$$childTail | expect($scope.$$childHead.formName).toEqual 'default'
expect($scope.$$childHead.form).toBe $builder.forms.default
$formObject = $(view).find '.fb-form-object'
expect($formObject.length).toBe 1
expect($formObject.attr('ng-repeat')).toEqual 'object in form'
expe... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | ef326559d274fa121ba2dc9ef55bff0c2b876547 | 600 | https://github.com/kelp404/angular-form-builder/blob/ef326559d274fa121ba2dc9ef55bff0c2b876547/test/specs/directiveSpec.coffee | 139 | 149 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:3:raw_corpus | raw_corpus | it 'compile fb-component and called `$drag.draggable()`', inject ($drag) ->
componentName = Object.keys($builder.components)[0]
spyOn($drag, 'draggable').andCallFake ($element, object) ->
expect($element.length).toBe 1
expect($element.hasClass('fb-component')).toB... | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e | 600 | https://github.com/kelp404/angular-form-builder/blob/6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e/test/specs/directiveSpec.coffee | 83 | 97 | ||
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'compile fb-component and called `$drag.draggable()`', inject ($drag) ->
componentName = Object.keys($builder.components)[0]
spyOn($drag, 'draggable').andCallFake ($element, object) ->
expect($element.length).toBe 1
... | it('compile fb-component and called `$drag.draggable()`', inject(function($drag) {
var componentName;
componentName = Object.keys($builder.components)[0];
spyOn($drag, 'draggable').andCallFake(function($element, object) {
expect($element.length).toBe(1);
expect($element.hasClass('fb-component')).toBe(true... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e | 600 | https://github.com/kelp404/angular-form-builder/blob/6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e/test/specs/directiveSpec.coffee | 83 | 97 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('compile fb-component and called `$drag.draggable()`', inject(function($drag) {
var componentName;
componentName = Object.keys($builder.components)[0];
spyOn($drag, 'draggable').andCallFake(function($element, object) {
expect($element.length).toBe(1);
... | it 'compile fb-component and called `$drag.draggable()`', inject ($drag) ->
componentName = Object.keys($builder.components)[0]
spyOn($drag, 'draggable').andCallFake ($element, object) ->
expect($element.length).toBe 1
expect($element.hasClass('fb-component')).toB... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e | 600 | https://github.com/kelp404/angular-form-builder/blob/6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e/test/specs/directiveSpec.coffee | 83 | 97 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:3:completion | completion | it 'compile fb-component and called `$drag.draggable()`', inject ($drag) ->
componentName = Object.keys($builder.components)[0]
spyOn($drag, 'draggable').andCallFake ($element, object) ->
expect($element.length).toBe 1
expect($element.hasClass('fb-component')).toB... | defer: no
object:
componentName: componentName
.toEqual object
$compile(template) $scope
$scope.$digest()
expect($drag.draggable).toHaveBeenCalled() | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e | 600 | https://github.com/kelp404/angular-form-builder/blob/6e1c6f46dd74f2e8d97a31c7821ce0ca550e959e/test/specs/directiveSpec.coffee | 83 | 97 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:1:raw_corpus | raw_corpus | describe 'builder.directive', ->
beforeEach module('builder')
describe 'fb-components', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
... | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 73c16b45b7362bc7dbaf32ba841b06d9e67a33ac | 600 | https://github.com/kelp404/angular-form-builder/blob/73c16b45b7362bc7dbaf32ba841b06d9e67a33ac/test/specs/directiveSpec.coffee | 1 | 41 | ||
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'builder.directive', ->
beforeEach module('builder')
describe 'fb-components', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $... | describe('builder.directive', function() {
beforeEach(module('builder'));
return describe('fb-components', function() {
var $builder, $compile, $scope, template;
$scope = null;
$compile = null;
$builder = null;
template = `<div fb-components></div>`;
beforeEach(inject(function($rootScope, $i... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 73c16b45b7362bc7dbaf32ba841b06d9e67a33ac | 600 | https://github.com/kelp404/angular-form-builder/blob/73c16b45b7362bc7dbaf32ba841b06d9e67a33ac/test/specs/directiveSpec.coffee | 1 | 41 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('builder.directive', function() {
beforeEach(module('builder'));
return describe('fb-components', function() {
var $builder, $compile, $scope, template;
$scope = null;
$compile = null;
$builder = null;
template = `<div fb-components... | describe 'builder.directive', ->
beforeEach module('builder')
describe 'fb-components', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 73c16b45b7362bc7dbaf32ba841b06d9e67a33ac | 600 | https://github.com/kelp404/angular-form-builder/blob/73c16b45b7362bc7dbaf32ba841b06d9e67a33ac/test/specs/directiveSpec.coffee | 1 | 41 |
kelp404/angular-form-builder:test/specs/directiveSpec.coffee:1:completion | completion | describe 'builder.directive', ->
beforeEach module('builder')
describe 'fb-components', ->
$scope = null
$compile = null
$builder = null
template = """<div fb-components></div>"""
beforeEach inject ($rootScope, $injector) ->
$scope = $rootScope.$new()
... | required: no
template:
"""
<div class="form-group">
<label for="{{name+index}}" class="col-md-4 control-label" ng-class="{'fb-required':required}">{{label}}</label>
<div class="col-md-8">
... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/directiveSpec.coffee | MIT | 73c16b45b7362bc7dbaf32ba841b06d9e67a33ac | 600 | https://github.com/kelp404/angular-form-builder/blob/73c16b45b7362bc7dbaf32ba841b06d9e67a33ac/test/specs/directiveSpec.coffee | 1 | 41 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/autopep8.coffee | 1 | 50 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | }
}
docker: {
image: "unibeautify/autopep8"
}
}
{
name: "isort"
cmd: "isort"
optional: true
homepage: "https://github.com/timothycrosley/isort"
installation: "https://github.com/timothycrosley/isort#installing-isort"
version: {
parse: (text) ... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:raw_corpus | raw_corpus | "-i"
["--max-line-length", "#{options.max_line_length}"] if options.max_line_length?
["--indent-size","#{options.indent_size}"] if options.indent_size?
["--ignore","#{options.ignore.join(',')}"] if options.ignore?
])
.then(=>
if options.sort_imports
filePath = conte... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/autopep8.coffee | 51 | 62 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:completion | completion | "-i"
["--max-line-length", "#{options.max_line_length}"] if options.max_line_length?
["--indent-size","#{options.indent_size}"] if options.indent_size?
["--ignore","#{options.ignore.join(',')}"] if options.ignore?
])
.then(=> | if options.sort_imports
filePath = context.filePath
projectPath = atom?.project.relativizePath(filePath)[0]
@exe("isort").run(["-sp", projectPath, tempFile])
)
.then(=> @readFile(tempFile)) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 41d5051b399f7fe11efd149504a232df16179d60 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/41d5051b399f7fe11efd149504a232df16179d60/src/beautifiers/autopep8.coffee | 51 | 62 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | b83fdd5fe67274f64b8443bcfc352107f2dae3bf | 1,503 | https://github.com/Glavin001/atom-beautify/blob/b83fdd5fe67274f64b8443bcfc352107f2dae3bf/src/beautifiers/autopep8.coffee | 1 | 50 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | }
}
{
name: "isort"
cmd: "isort"
optional: true
homepage: "https://github.com/timothycrosley/isort"
installation: "https://github.com/timothycrosley/isort#installing-isort"
version: {
parse: (text) -> text.match(/VERSION (\d+\.\d+\.\d+)/)[1]
}
}
]
optio... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | b83fdd5fe67274f64b8443bcfc352107f2dae3bf | 1,503 | https://github.com/Glavin001/atom-beautify/blob/b83fdd5fe67274f64b8443bcfc352107f2dae3bf/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:raw_corpus | raw_corpus | ])
.then(=>
if options.sort_imports
filePath = context.filePath
projectPath = atom?.project.relativizePath(filePath)[0]
@exe("isort").run(["-sp", projectPath, tempFile])
)
.then(=> @readFile(tempFile)) | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | b83fdd5fe67274f64b8443bcfc352107f2dae3bf | 1,503 | https://github.com/Glavin001/atom-beautify/blob/b83fdd5fe67274f64b8443bcfc352107f2dae3bf/src/beautifiers/autopep8.coffee | 51 | 58 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:completion | completion | ])
.then(=>
if options.sort_imports
filePath = context.filePath | projectPath = atom?.project.relativizePath(filePath)[0]
@exe("isort").run(["-sp", projectPath, tempFile])
)
.then(=> @readFile(tempFile)) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | b83fdd5fe67274f64b8443bcfc352107f2dae3bf | 1,503 | https://github.com/Glavin001/atom-beautify/blob/b83fdd5fe67274f64b8443bcfc352107f2dae3bf/src/beautifiers/autopep8.coffee | 51 | 58 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 4203fb72da2c71a9c3c3e0d7af50e38ae7139580 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/4203fb72da2c71a9c3c3e0d7af50e38ae7139580/src/beautifiers/autopep8.coffee | 1 | 50 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | }
}
{
name: "isort"
cmd: "isort"
optional: true
homepage: "https://github.com/timothycrosley/isort"
installation: "https://github.com/timothycrosley/isort#installing-isort"
version: {
parse: (text) -> text.match(/VERSION (\d+\.\d+\.\d+)/)[1]
}
}
]
optio... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 4203fb72da2c71a9c3c3e0d7af50e38ae7139580 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/4203fb72da2c71a9c3c3e0d7af50e38ae7139580/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:raw_corpus | raw_corpus | ])
.then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@exe("isort")
.run(
["-sp", projectPath, tempFile],
)
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 4203fb72da2c71a9c3c3e0d7af50e38ae7139580 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/4203fb72da2c71a9c3c3e0d7af50e38ae7139580/src/beautifiers/autopep8.coffee | 51 | 67 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:completion | completion | ])
.then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@exe("isort") | .run(
["-sp", projectPath, tempFile],
)
.then(=>
@readFile(tempFile)
)
else
@readFile(tempFile)
) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 4203fb72da2c71a9c3c3e0d7af50e38ae7139580 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/4203fb72da2c71a9c3c3e0d7af50e38ae7139580/src/beautifiers/autopep8.coffee | 51 | 67 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed | 1,503 | https://github.com/Glavin001/atom-beautify/blob/02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed/src/beautifiers/autopep8.coffee | 1 | 50 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | name: "isort"
cmd: "isort"
optional: true
homepage: "https://github.com/timothycrosley/isort"
installation: "https://github.com/timothycrosley/isort#installing-isort"
version: {
parse: (text) -> text.match(/VERSION (\d+\.\d+\.\d+)/)[1]
}
}
]
options: {
Python: tr... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed | 1,503 | https://github.com/Glavin001/atom-beautify/blob/02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:raw_corpus | raw_corpus | editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@exe("isort")
.run(
["-sp", projectPath, tempFile],
)
.then(=>
@readFile(tempFile)
)... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed | 1,503 | https://github.com/Glavin001/atom-beautify/blob/02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed/src/beautifiers/autopep8.coffee | 51 | 64 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:completion | completion | editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@exe("isort")
.run(
["-sp", projectPath, tempFile], | )
.then(=>
@readFile(tempFile)
)
else
@readFile(tempFile)
) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed | 1,503 | https://github.com/Glavin001/atom-beautify/blob/02d4c8f4048b9aeb85aec1b64625e3fadd8f31ed/src/beautifiers/autopep8.coffee | 51 | 64 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | a9553fd51e3ca98fa7f314343f635d78af81848a | 1,503 | https://github.com/Glavin001/atom-beautify/blob/a9553fd51e3ca98fa7f314343f635d78af81848a/src/beautifiers/autopep8.coffee | 1 | 50 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep... | /*
Requires https://github.com/hhatto/autopep8
*/
"use strict";
var Autopep8, Beautifier;
Beautifier = require('./beautifier');
module.exports = Autopep8 = (function() {
class Autopep8 extends Beautifier {
beautify(text, language, options) {
var tempFile;
return this.exe("autopep8").run([tempFile = ... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | a9553fd51e3ca98fa7f314343f635d78af81848a | 1,503 | https://github.com/Glavin001/atom-beautify/blob/a9553fd51e3ca98fa7f314343f635d78af81848a/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Requires https://github.com/hhatto/autopep8
*/
"use strict";
var Autopep8, Beautifier;
Beautifier = require('./beautifier');
module.exports = Autopep8 = (function() {
class Autopep8 extends Beautifier {
beautify(text, language, options) {
var tempF... | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | a9553fd51e3ca98fa7f314343f635d78af81848a | 1,503 | https://github.com/Glavin001/atom-beautify/blob/a9553fd51e3ca98fa7f314343f635d78af81848a/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
executables: [
{
name: "autopep8"
cmd: "autopep8"
homepage: "https://github.... | name: "isort"
cmd: "isort"
optional: true
homepage: "https://github.com/timothycrosley/isort"
installation: "https://github.com/timothycrosley/isort#installing-isort"
version: {
parse: (text) -> text.match(/VERSION (\d+\.\d+\.\d+)/)[1]
}
}
]
options: {
Python: tr... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | a9553fd51e3ca98fa7f314343f635d78af81848a | 1,503 | https://github.com/Glavin001/atom-beautify/blob/a9553fd51e3ca98fa7f314343f635d78af81848a/src/beautifiers/autopep8.coffee | 1 | 50 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:raw_corpus | raw_corpus | .then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@exe("isort")
.run(
["-sp", projectPath, tempFile],
help: {
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | a9553fd51e3ca98fa7f314343f635d78af81848a | 1,503 | https://github.com/Glavin001/atom-beautify/blob/a9553fd51e3ca98fa7f314343f635d78af81848a/src/beautifiers/autopep8.coffee | 51 | 68 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:2:completion | completion | .then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
filePath = editor.getPath()
projectPath = atom.project.relativizePath(filePath)[0]
@exe("isort")
.run(
["-sp", projectPath, tempFile], | help: {
link: "https://github.com/timothycrosley/isort"
})
.then(=>
@readFile(tempFile)
)
else
@readFile(tempFile)
) | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | a9553fd51e3ca98fa7f314343f635d78af81848a | 1,503 | https://github.com/Glavin001/atom-beautify/blob/a9553fd51e3ca98fa7f314343f635d78af81848a/src/beautifiers/autopep8.coffee | 51 | 68 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
isPreInstalled: false
options: {
Python: true
}
beautify: (text, language, options) ->... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | ba2198675cbcc1ecd05f18e28e97133cdd2d5319 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/autopep8.coffee | 1 | 40 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
isPreInstalled: false
options: {
P... | /*
Requires https://github.com/hhatto/autopep8
*/
"use strict";
var Autopep8, Beautifier;
Beautifier = require('./beautifier');
module.exports = Autopep8 = (function() {
class Autopep8 extends Beautifier {
beautify(text, language, options) {
var tempFile;
return this.run("autopep8", [tempFile = this... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | ba2198675cbcc1ecd05f18e28e97133cdd2d5319 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/autopep8.coffee | 1 | 40 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Requires https://github.com/hhatto/autopep8
*/
"use strict";
var Autopep8, Beautifier;
Beautifier = require('./beautifier');
module.exports = Autopep8 = (function() {
class Autopep8 extends Beautifier {
beautify(text, language, options) {
var tempF... | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
isPreInstalled: false
options: {
Python: true
}
beautify: (text, language, options) ->... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | ba2198675cbcc1ecd05f18e28e97133cdd2d5319 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/autopep8.coffee | 1 | 40 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
isPreInstalled: false
options: {
Python: true
}
beautify: (text, language, options) ->... | "-i"
["--max-line-length", "#{options.max_line_length}"] if options.max_line_length?
["--indent-size","#{options.indent_size}"] if options.indent_size?
["--ignore","#{options.ignore.join(',')}"] if options.ignore?
], help: {
link: "https://github.com/hhatto/autopep8"
})
.then... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | ba2198675cbcc1ecd05f18e28e97133cdd2d5319 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/ba2198675cbcc1ecd05f18e28e97133cdd2d5319/src/beautifiers/autopep8.coffee | 1 | 40 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:raw_corpus | raw_corpus | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
options: {
Python: true
}
beautify: (text, language, options) ->
@run("autopep8", [
... | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 2285525c641592ff84db30975f9bee0461dd9ee3 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/2285525c641592ff84db30975f9bee0461dd9ee3/src/beautifiers/autopep8.coffee | 1 | 43 | ||
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
options: {
Python: true
}
beaut... | /*
Requires https://github.com/hhatto/autopep8
*/
"use strict";
var Autopep8, Beautifier;
Beautifier = require('./beautifier');
module.exports = Autopep8 = (function() {
class Autopep8 extends Beautifier {
beautify(text, language, options) {
var tempFile;
return this.run("autopep8", [tempFile = this... | CoffeeScript | JavaScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 2285525c641592ff84db30975f9bee0461dd9ee3 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/2285525c641592ff84db30975f9bee0461dd9ee3/src/beautifiers/autopep8.coffee | 1 | 43 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Requires https://github.com/hhatto/autopep8
*/
"use strict";
var Autopep8, Beautifier;
Beautifier = require('./beautifier');
module.exports = Autopep8 = (function() {
class Autopep8 extends Beautifier {
beautify(text, language, options) {
var tempF... | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
options: {
Python: true
}
beautify: (text, language, options) ->
@run("autopep8", [
... | JavaScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 2285525c641592ff84db30975f9bee0461dd9ee3 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/2285525c641592ff84db30975f9bee0461dd9ee3/src/beautifiers/autopep8.coffee | 1 | 43 |
Glavin001/atom-beautify:src/beautifiers/autopep8.coffee:1:completion | completion | ###
Requires https://github.com/hhatto/autopep8
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Autopep8 extends Beautifier
name: "autopep8"
link: "https://github.com/hhatto/autopep8"
options: {
Python: true
}
beautify: (text, language, options) ->
@run("autopep8", [
... | ["--indent-size","#{options.indent_size}"] if options.indent_size?
["--ignore","#{options.ignore.join(',')}"] if options.ignore?
], help: {
link: "https://github.com/hhatto/autopep8"
})
.then(=>
if options.sort_imports
editor = atom.workspace.getActiveTextEditor()
... | CoffeeScript | CoffeeScript | Glavin001/atom-beautify | src/beautifiers/autopep8.coffee | MIT | 2285525c641592ff84db30975f9bee0461dd9ee3 | 1,503 | https://github.com/Glavin001/atom-beautify/blob/2285525c641592ff84db30975f9bee0461dd9ee3/src/beautifiers/autopep8.coffee | 1 | 43 |
mauricemach/zappa:tests/routes.coffee:1:raw_corpus | raw_corpus | zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
@get '/string': 'string'
@get '/return': -> 'return'
@get '/send': -> @send 'send'
@get /\/regex$/, 'regex'
@get /\/regex_function$/, -> 'regex func... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 725e0103755c9a92fe84de06cee82db00e51a1f8 | 943 | https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/routes.coffee | 1 | 50 | ||
mauricemach/zappa:tests/routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
@get '/string': 'string'
@get '/return': -> 'return'
@get '/send': -> @send 'send'
@get /\/regex$... | var port, zappa;
zappa = require('../src/zappa');
port = 15000;
this.tests = {
hello: function(t) {
var c, zapp;
t.expect(1, 2, 3, 4, 5);
t.wait(3000);
zapp = zappa(port++, function() {
this.get({
'/string': 'string'
});
this.get({
'/return': function() {
... | CoffeeScript | JavaScript | mauricemach/zappa | tests/routes.coffee | MIT | 725e0103755c9a92fe84de06cee82db00e51a1f8 | 943 | https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/routes.coffee | 1 | 50 |
mauricemach/zappa:tests/routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var port, zappa;
zappa = require('../src/zappa');
port = 15000;
this.tests = {
hello: function(t) {
var c, zapp;
t.expect(1, 2, 3, 4, 5);
t.wait(3000);
zapp = zappa(port++, function() {
this.get({
'/string': 'string'
});
... | zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
@get '/string': 'string'
@get '/return': -> 'return'
@get '/send': -> @send 'send'
@get /\/regex$/, 'regex'
@get /\/regex_function$/, -> 'regex func... | JavaScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 725e0103755c9a92fe84de06cee82db00e51a1f8 | 943 | https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/routes.coffee | 1 | 50 |
mauricemach/zappa:tests/routes.coffee:1:completion | completion | zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
@get '/string': 'string'
@get '/return': -> 'return'
@get '/send': -> @send 'send'
@get /\/regex$/, 'regex'
@get /\/regex_function$/, -> 'regex func... | zapp = zappa port++, ->
@post '/': -> 'post'
@put '/': -> 'put'
@del '/': -> 'del'
c = t.client(zapp.app)
c.post '/', (err, res) -> t.equal 1, res.body, 'post'
c.put '/', (err, res) -> t.equal 2, res.body, 'put'
c.del '/', (err, res) -> t.equal 3, res.body, 'del'
redirect: (t) ->
... | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 725e0103755c9a92fe84de06cee82db00e51a1f8 | 943 | https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/routes.coffee | 1 | 50 |
mauricemach/zappa:tests/routes.coffee:2:raw_corpus | raw_corpus | t.wait 3000
zapp = zappa port++, ->
@use 'bodyParser'
@get '/:foo': -> @params.foo + @query.ping
@post '/:foo': -> @params.foo + @query.ping + @body.zig
c = t.client(zapp.app)
c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'appl... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 725e0103755c9a92fe84de06cee82db00e51a1f8 | 943 | https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/routes.coffee | 51 | 66 | ||
mauricemach/zappa:tests/routes.coffee:2:completion | completion | t.wait 3000
zapp = zappa port++, ->
@use 'bodyParser'
@get '/:foo': -> @params.foo + @query.ping
@post '/:foo': -> @params.foo + @query.ping + @body.zig
c = t.client(zapp.app) | c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'application/x-www-form-urlencoded'
json = {zig: 'zag'}
c.post '/bar?ping=pong', {headers, json}, (err, res) ->
t.equal 2, res.body, 'barpongzag' | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 725e0103755c9a92fe84de06cee82db00e51a1f8 | 943 | https://github.com/mauricemach/zappa/blob/725e0103755c9a92fe84de06cee82db00e51a1f8/tests/routes.coffee | 51 | 66 |
mauricemach/zappa:tests/routes.coffee:2:raw_corpus | raw_corpus | t.wait 3000
zapp = zappa port++, ->
@use 'bodyParser'
@get '/:foo': -> @foo + @ping
@post '/:foo': -> @foo + @ping + @zig
c = t.client(zapp.app)
c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'application/x-www-form-urlencoded'
... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a316ab7682d513fca53c7a07686b15e1c0157f2 | 943 | https://github.com/mauricemach/zappa/blob/6a316ab7682d513fca53c7a07686b15e1c0157f2/tests/routes.coffee | 51 | 66 | ||
mauricemach/zappa:tests/routes.coffee:2:completion | completion | t.wait 3000
zapp = zappa port++, ->
@use 'bodyParser'
@get '/:foo': -> @foo + @ping
@post '/:foo': -> @foo + @ping + @zig
c = t.client(zapp.app) | c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'application/x-www-form-urlencoded'
json = {zig: 'zag'}
c.post '/bar?ping=pong', {headers, json}, (err, res) ->
t.equal 2, res.body, 'barpongzag' | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a316ab7682d513fca53c7a07686b15e1c0157f2 | 943 | https://github.com/mauricemach/zappa/blob/6a316ab7682d513fca53c7a07686b15e1c0157f2/tests/routes.coffee | 51 | 66 |
mauricemach/zappa:tests/routes.coffee:2:raw_corpus | raw_corpus | t.wait 3000
zapp = zappa port++, ->
@use 'bodyParser'
@get '/:foo': -> @data.foo + @data.ping
@post '/:foo': -> @data.foo + @data.ping + @data.zig
c = t.client(zapp.app)
c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'applicatio... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | a62a122802b516d4195b60a741cef044d2ef59bb | 943 | https://github.com/mauricemach/zappa/blob/a62a122802b516d4195b60a741cef044d2ef59bb/tests/routes.coffee | 51 | 66 | ||
mauricemach/zappa:tests/routes.coffee:2:completion | completion | t.wait 3000
zapp = zappa port++, ->
@use 'bodyParser'
@get '/:foo': -> @data.foo + @data.ping
@post '/:foo': -> @data.foo + @data.ping + @data.zig
c = t.client(zapp.app) | c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'application/x-www-form-urlencoded'
json = {zig: 'zag'}
c.post '/bar?ping=pong', {headers, json}, (err, res) ->
t.equal 2, res.body, 'barpongzag' | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | a62a122802b516d4195b60a741cef044d2ef59bb | 943 | https://github.com/mauricemach/zappa/blob/a62a122802b516d4195b60a741cef044d2ef59bb/tests/routes.coffee | 51 | 66 |
mauricemach/zappa:tests/routes.coffee:1:raw_corpus | raw_corpus | zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/, -> 'regex function'
... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/routes.coffee | 1 | 50 | ||
mauricemach/zappa:tests/routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'r... | var port, zappa;
zappa = require('../src/zappa');
port = 15000;
this.tests = {
hello: function(t) {
var c, zapp;
t.expect(1, 2, 3, 4, 5);
t.wait(3000);
zapp = zappa(port++, function() {
get({
'/string': 'string'
});
get({
'/return': function() {
return 'r... | CoffeeScript | JavaScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/routes.coffee | 1 | 50 |
mauricemach/zappa:tests/routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var port, zappa;
zappa = require('../src/zappa');
port = 15000;
this.tests = {
hello: function(t) {
var c, zapp;
t.expect(1, 2, 3, 4, 5);
t.wait(3000);
zapp = zappa(port++, function() {
get({
'/string': 'string'
});
ge... | zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/, -> 'regex function'
... | JavaScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/routes.coffee | 1 | 50 |
mauricemach/zappa:tests/routes.coffee:1:completion | completion | zappa = require '../src/zappa'
port = 15000
@tests =
hello: (t) ->
t.expect 1, 2, 3, 4, 5
t.wait 3000
zapp = zappa port++, ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/, -> 'regex function'
... | zapp = zappa port++, ->
post '/': -> 'post'
put '/': -> 'put'
del '/': -> 'del'
c = t.client(zapp.app)
c.post '/', (err, res) -> t.equal 1, res.body, 'post'
c.put '/', (err, res) -> t.equal 2, res.body, 'put'
c.del '/', (err, res) -> t.equal 3, res.body, 'del'
redirect: (t) ->
... | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/routes.coffee | 1 | 50 |
mauricemach/zappa:tests/routes.coffee:2:raw_corpus | raw_corpus | t.wait 3000
zapp = zappa port++, ->
use 'bodyParser'
get '/:foo': -> @foo + @ping
post '/:foo': -> @foo + @ping + @zig
c = t.client(zapp.app)
c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'application/x-www-form-urlencoded'
... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/routes.coffee | 51 | 66 | ||
mauricemach/zappa:tests/routes.coffee:2:completion | completion | t.wait 3000
zapp = zappa port++, ->
use 'bodyParser'
get '/:foo': -> @foo + @ping
post '/:foo': -> @foo + @ping + @zig
c = t.client(zapp.app) | c.get '/bar?ping=pong', (err, res) ->
t.equal 1, res.body, 'barpong'
headers = 'Content-Type': 'application/x-www-form-urlencoded'
json = {zig: 'zag'}
c.post '/bar?ping=pong', {headers, json}, (err, res) ->
t.equal 2, res.body, 'barpongzag' | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 6a0bf34282a3db50b307b1319d30ff227d4277a9 | 943 | https://github.com/mauricemach/zappa/blob/6a0bf34282a3db50b307b1319d30ff227d4277a9/tests/routes.coffee | 51 | 66 |
mauricemach/zappa:tests/routes.coffee:1:raw_corpus | raw_corpus | zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/, -> 'regex function'
t.get '/string', 'string'
... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/routes.coffee | 1 | 42 | ||
mauricemach/zappa:tests/routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/... | var zappa;
zappa = require('./support/tester')(require('../src/zappa'));
module.exports = {
hello: function() {
var t;
t = zappa(function() {
get({
'/string': 'string'
});
get({
'/return': function() {
return 'return';
}
});
get({
'/sen... | CoffeeScript | JavaScript | mauricemach/zappa | tests/routes.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/routes.coffee | 1 | 42 |
mauricemach/zappa:tests/routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var zappa;
zappa = require('./support/tester')(require('../src/zappa'));
module.exports = {
hello: function() {
var t;
t = zappa(function() {
get({
'/string': 'string'
});
get({
'/return': function() {
return ... | zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/, -> 'regex function'
t.get '/string', 'string'
... | JavaScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/routes.coffee | 1 | 42 |
mauricemach/zappa:tests/routes.coffee:1:completion | completion | zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
get /\/regex$/, 'regex'
get /\/regex_function$/, -> 'regex function'
t.get '/string', 'string'
... | del '/': -> send 'del'
t.response {method: 'post', url: '/'}, {body: 'post'}
t.response {method: 'put', url: '/'}, {body: 'put'}
t.response {method: 'delete', url: '/'}, {body: 'del'}
redirect: ->
t = zappa ->
get '/': -> redirect '/foo'
t.response {url: '/'}, {status: 302, headers: {Loca... | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | 9a07f55f8c030b026a3d2a6bb1f32cde77b6806a | 943 | https://github.com/mauricemach/zappa/blob/9a07f55f8c030b026a3d2a6bb1f32cde77b6806a/tests/routes.coffee | 1 | 42 |
mauricemach/zappa:tests/routes.coffee:1:raw_corpus | raw_corpus | zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
t.get '/string', 'string'
t.get '/return', 'return'
t.get '/send', 'send'
verbs: ->
t = zappa ->... | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | e338cf805cb6b68ea06957166238560063d1f1e4 | 943 | https://github.com/mauricemach/zappa/blob/e338cf805cb6b68ea06957166238560063d1f1e4/tests/routes.coffee | 1 | 38 | ||
mauricemach/zappa:tests/routes.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
t.get '/string', 'string'
t.get '/return', 'return... | var zappa;
zappa = require('./support/tester')(require('../src/zappa'));
module.exports = {
hello: function() {
var t;
t = zappa(function() {
get({
'/string': 'string'
});
get({
'/return': function() {
return 'return';
}
});
return get({
... | CoffeeScript | JavaScript | mauricemach/zappa | tests/routes.coffee | MIT | e338cf805cb6b68ea06957166238560063d1f1e4 | 943 | https://github.com/mauricemach/zappa/blob/e338cf805cb6b68ea06957166238560063d1f1e4/tests/routes.coffee | 1 | 38 |
mauricemach/zappa:tests/routes.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var zappa;
zappa = require('./support/tester')(require('../src/zappa'));
module.exports = {
hello: function() {
var t;
t = zappa(function() {
get({
'/string': 'string'
});
get({
'/return': function() {
return ... | zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
t.get '/string', 'string'
t.get '/return', 'return'
t.get '/send', 'send'
verbs: ->
t = zappa ->... | JavaScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | e338cf805cb6b68ea06957166238560063d1f1e4 | 943 | https://github.com/mauricemach/zappa/blob/e338cf805cb6b68ea06957166238560063d1f1e4/tests/routes.coffee | 1 | 38 |
mauricemach/zappa:tests/routes.coffee:1:completion | completion | zappa = require('./support/tester') require('../src/zappa')
module.exports =
hello: ->
t = zappa ->
get '/string': 'string'
get '/return': -> 'return'
get '/send': -> send 'send'
t.get '/string', 'string'
t.get '/return', 'return'
t.get '/send', 'send'
verbs: ->
t = zappa ->... | t.response {method: 'post', url: '/'}, {body: 'post'}
t.response {method: 'put', url: '/'}, {body: 'put'}
t.response {method: 'delete', url: '/'}, {body: 'del'}
redirect: ->
t = zappa ->
get '/': -> redirect '/foo'
t.response {url: '/'}, {status: 302, headers: {Location: /\/foo$/}}
params: ... | CoffeeScript | CoffeeScript | mauricemach/zappa | tests/routes.coffee | MIT | e338cf805cb6b68ea06957166238560063d1f1e4 | 943 | https://github.com/mauricemach/zappa/blob/e338cf805cb6b68ea06957166238560063d1f1e4/tests/routes.coffee | 1 | 38 |
meltingice/psd.js:lib/psd/layer_info/vector_stroke_content.coffee:1:raw_corpus | raw_corpus | LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'
module.exports = class VectorStrokeContent extends LayerInfo
@shouldParse: (key) -> key is 'vscg'
parse: ->
@file.seek 8, true
@data = new Descriptor(@file).parse() | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/vector_stroke_content.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/vector_stroke_content.coffee | 1 | 9 | ||
meltingice/psd.js:lib/psd/layer_info/vector_stroke_content.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'
module.exports = class VectorStrokeContent extends LayerInfo
@shouldParse: (key) -> key is 'vscg'
parse: ->
@file.seek 8, true
@data = new Descriptor(@file).parse... | var Descriptor, LayerInfo, VectorStrokeContent;
LayerInfo = require('../layer_info.coffee');
Descriptor = require('../descriptor.coffee');
module.exports = VectorStrokeContent = class VectorStrokeContent extends LayerInfo {
static shouldParse(key) {
return key === 'vscg';
}
parse() {
this.file.seek(8,... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/vector_stroke_content.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/vector_stroke_content.coffee | 1 | 9 |
meltingice/psd.js:lib/psd/layer_info/vector_stroke_content.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Descriptor, LayerInfo, VectorStrokeContent;
LayerInfo = require('../layer_info.coffee');
Descriptor = require('../descriptor.coffee');
module.exports = VectorStrokeContent = class VectorStrokeContent extends LayerInfo {
static shouldParse(key) {
return... | LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'
module.exports = class VectorStrokeContent extends LayerInfo
@shouldParse: (key) -> key is 'vscg'
parse: ->
@file.seek 8, true
@data = new Descriptor(@file).parse() | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/vector_stroke_content.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/vector_stroke_content.coffee | 1 | 9 |
meltingice/psd.js:lib/psd/layer_info/vector_stroke_content.coffee:1:completion | completion | LayerInfo = require '../layer_info.coffee'
Descriptor = require '../descriptor.coffee'
module.exports = class VectorStrokeContent extends LayerInfo | @shouldParse: (key) -> key is 'vscg'
parse: ->
@file.seek 8, true
@data = new Descriptor(@file).parse() | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/vector_stroke_content.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/vector_stroke_content.coffee | 1 | 9 |
jianliaoim/talk-os:talk-web/client/util/dom.coffee:1:raw_corpus | raw_corpus | replaceMap =
code: 'span'
pre: 'div'
table: 'div'
blockquote: 'div'
tr: 'span'
td: 'span'
b: 'span'
tt: 'span'
h1: 'div'
h2: 'div'
h3: 'div'
h4: 'div'
h5: 'div'
h6: 'div'
p: 'div'
a: 'span'
ol: 'div'
ul: 'div'
li: 'div'
copyChildren = (source, target) ->
if source.children.lengt... | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/dom.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/dom.coffee | 1 | 50 | ||
jianliaoim/talk-os:talk-web/client/util/dom.coffee:1:completion | completion | replaceMap =
code: 'span'
pre: 'div'
table: 'div'
blockquote: 'div'
tr: 'span'
td: 'span'
b: 'span'
tt: 'span'
h1: 'div'
h2: 'div'
h3: 'div'
h4: 'div'
h5: 'div'
h6: 'div'
p: 'div'
a: 'span'
ol: 'div'
ul: 'div'
li: 'div'
copyChildren = (source, target) ->
if source.children.lengt... | target.appendChild el
else if source.innerHTML.length > 0
target.innerHTML = source.innerHTML
# http://blog.gospodarets.com/native_smooth_scrolling/
exports.smoothScrollTo = (node, x, y) ->
# http://blog.gospodarets.com/native_smooth_scrolling/
# https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavi... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/dom.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/dom.coffee | 1 | 50 |
jianliaoim/talk-os:talk-web/client/util/dom.coffee:2:raw_corpus | raw_corpus | return true
node = node.parentNode
return false
exports.isElementInViewport = (el, port) ->
return false if not el or not port
elBounds = el.getBoundingClientRect()
portBounds = port.getBoundingClientRect()
elBounds.top <= portBounds.bottom and elBounds.bottom >= portBounds.top | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/dom.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/dom.coffee | 51 | 59 | ||
jianliaoim/talk-os:talk-web/client/util/dom.coffee:2:completion | completion | return true
node = node.parentNode
return false | exports.isElementInViewport = (el, port) ->
return false if not el or not port
elBounds = el.getBoundingClientRect()
portBounds = port.getBoundingClientRect()
elBounds.top <= portBounds.bottom and elBounds.bottom >= portBounds.top | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/util/dom.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/util/dom.coffee | 51 | 59 |
yakyak/yakyak:src/login.coffee:1:raw_corpus | raw_corpus | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%... | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/login.coffee | 1 | 45 | ||
yakyak/yakyak:src/login.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts... | var AGENT, Client, LOGIN_URL, Q, app, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
app = require('electron').app;
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://acco... | CoffeeScript | JavaScript | yakyak/yakyak | src/login.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/login.coffee | 1 | 45 |
yakyak/yakyak:src/login.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var AGENT, Client, LOGIN_URL, Q, app, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
app = require('electron').app;
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issu... | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%... | JavaScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/login.coffee | 1 | 45 |
yakyak/yakyak:src/login.coffee:1:completion | completion | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%... | url = mainWindow.getURL()
console.log 'login: did-finish-load', url
if url.indexOf('/signin/rejected') > 0 and url.indexOf('rrk=47') > 0
console.error 'javascript disabled, testing logout...'
reject 'logout'
else if url.indexOf('/o/oauth2/programmatic_auth') > 0
... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd | 3,762 | https://github.com/yakyak/yakyak/blob/8f8cbc081c66ca00b5e9520a9bef5f2bc1d64dfd/src/login.coffee | 1 | 45 |
yakyak/yakyak:src/login.coffee:1:raw_corpus | raw_corpus | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%... | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 0e491adb7e04151f2e705acf882f46253ad23d27 | 3,762 | https://github.com/yakyak/yakyak/blob/0e491adb7e04151f2e705acf882f46253ad23d27/src/login.coffee | 1 | 41 | ||
yakyak/yakyak:src/login.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts... | var AGENT, Client, LOGIN_URL, Q, app, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
app = require('electron').app;
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://acco... | CoffeeScript | JavaScript | yakyak/yakyak | src/login.coffee | MIT | 0e491adb7e04151f2e705acf882f46253ad23d27 | 3,762 | https://github.com/yakyak/yakyak/blob/0e491adb7e04151f2e705acf882f46253ad23d27/src/login.coffee | 1 | 41 |
yakyak/yakyak:src/login.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var AGENT, Client, LOGIN_URL, Q, app, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
app = require('electron').app;
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issu... | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%... | JavaScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 0e491adb7e04151f2e705acf882f46253ad23d27 | 3,762 | https://github.com/yakyak/yakyak/blob/0e491adb7e04151f2e705acf882f46253ad23d27/src/login.coffee | 1 | 41 |
yakyak/yakyak:src/login.coffee:1:completion | completion | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
app = require('electron').app
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%... | # the url that just finished loading
url = mainWindow.getURL()
console.log 'login: did-finish-load', url
if url.indexOf('/o/oauth2/programmatic_auth') > 0
console.log 'login: programmatic auth'
# get the cookie from browser session, it has to be there
session... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 0e491adb7e04151f2e705acf882f46253ad23d27 | 3,762 | https://github.com/yakyak/yakyak/blob/0e491adb7e04151f2e705acf882f46253ad23d27/src/login.coffee | 1 | 41 |
yakyak/yakyak:src/login.coffee:1:raw_corpus | raw_corpus | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab | 3,762 | https://github.com/yakyak/yakyak/blob/bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab/src/login.coffee | 1 | 29 | ||
yakyak/yakyak:src/login.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programma... | var Client, LOGIN_URL, Q, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?h... | CoffeeScript | JavaScript | yakyak/yakyak | src/login.coffee | MIT | bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab | 3,762 | https://github.com/yakyak/yakyak/blob/bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab/src/login.coffee | 1 | 29 |
yakyak/yakyak:src/login.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Client, LOGIN_URL, Q, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "h... | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | JavaScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab | 3,762 | https://github.com/yakyak/yakyak/blob/bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab/src/login.coffee | 1 | 29 |
yakyak/yakyak:src/login.coffee:1:completion | completion | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | url = mainWindow.getURL()
console.log 'login: did-finish-load', url
if url.indexOf('/o/oauth2/programmatic_auth') > 0
console.log 'login: programmatic auth'
# get the cookie from browser session, it has to be there
session.defaultSession.cookies.get({}).then (err, va... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab | 3,762 | https://github.com/yakyak/yakyak/blob/bf8ab6708edf6cfbe60d8daf809c16ec9f4dd5ab/src/login.coffee | 1 | 29 |
yakyak/yakyak:src/login.coffee:1:raw_corpus | raw_corpus | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 0d1290748c904439f59d830f8671a6f7ddedb796 | 3,762 | https://github.com/yakyak/yakyak/blob/0d1290748c904439f59d830f8671a6f7ddedb796/src/login.coffee | 1 | 34 | ||
yakyak/yakyak:src/login.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programma... | var AGENT, Client, LOGIN_URL, Q, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic... | CoffeeScript | JavaScript | yakyak/yakyak | src/login.coffee | MIT | 0d1290748c904439f59d830f8671a6f7ddedb796 | 3,762 | https://github.com/yakyak/yakyak/blob/0d1290748c904439f59d830f8671a6f7ddedb796/src/login.coffee | 1 | 34 |
yakyak/yakyak:src/login.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var AGENT, Client, LOGIN_URL, Q, session;
Client = require('hangupsjs');
Q = require('q');
({session} = require('electron'));
// Current programmatic login workflow is described here
// https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_U... | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | JavaScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 0d1290748c904439f59d830f8671a6f7ddedb796 | 3,762 | https://github.com/yakyak/yakyak/blob/0d1290748c904439f59d830f8671a6f7ddedb796/src/login.coffee | 1 | 34 |
yakyak/yakyak:src/login.coffee:1:completion | completion | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | # the url that just finished loading
url = mainWindow.getURL()
console.log 'login: did-finish-load', url
if url.indexOf('/o/oauth2/programmatic_auth') > 0
console.log 'login: programmatic auth'
# get the cookie from browser session, it has to be there
session... | CoffeeScript | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 0d1290748c904439f59d830f8671a6f7ddedb796 | 3,762 | https://github.com/yakyak/yakyak/blob/0d1290748c904439f59d830f8671a6f7ddedb796/src/login.coffee | 1 | 34 |
yakyak/yakyak:src/login.coffee:1:raw_corpus | raw_corpus | Client = require 'hangupsjs'
Q = require 'q'
{session} = require('electron')
# Current programmatic login workflow is described here
# https://github.com/tdryer/hangups/issues/260#issuecomment-246578670
LOGIN_URL = "https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccou... | CoffeeScript | yakyak/yakyak | src/login.coffee | MIT | 097b7eafa7953d064c491168dbee6fd280349e43 | 3,762 | https://github.com/yakyak/yakyak/blob/097b7eafa7953d064c491168dbee6fd280349e43/src/login.coffee | 1 | 30 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.