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/controllerSpec.coffee:4:raw_corpus | raw_corpus | it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) ->
spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) ->
expect($event).toBeNull()
expect($scope.activeGroup).toEqual activeGroup
$builder.registerComponen... | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | a59bcf484e4261c24e853daf2fee69879df44bd3 | 600 | https://github.com/kelp404/angular-form-builder/blob/a59bcf484e4261c24e853daf2fee69879df44bd3/test/specs/controllerSpec.coffee | 132 | 155 | ||
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) ->
spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) ->
expect($event).toBeNull()
expect($scope.activeGroup).toEq... | it('$watch $scope.allComponents than call $scope.selectGroup', inject(function($builder) {
spyOn($scope, 'selectGroup').andCallFake(function($event, activeGroup) {
expect($event).toBeNull();
return expect($scope.activeGroup).toEqual(activeGroup);
});
$builder.registerComponent('newComponent', {
templa... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | a59bcf484e4261c24e853daf2fee69879df44bd3 | 600 | https://github.com/kelp404/angular-form-builder/blob/a59bcf484e4261c24e853daf2fee69879df44bd3/test/specs/controllerSpec.coffee | 132 | 155 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('$watch $scope.allComponents than call $scope.selectGroup', inject(function($builder) {
spyOn($scope, 'selectGroup').andCallFake(function($event, activeGroup) {
expect($event).toBeNull();
return expect($scope.activeGroup).toEqual(activeGroup);
});
... | it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) ->
spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) ->
expect($event).toBeNull()
expect($scope.activeGroup).toEqual activeGroup
$builder.registerComponen... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | a59bcf484e4261c24e853daf2fee69879df44bd3 | 600 | https://github.com/kelp404/angular-form-builder/blob/a59bcf484e4261c24e853daf2fee69879df44bd3/test/specs/controllerSpec.coffee | 132 | 155 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:4:completion | completion | it '$watch $scope.allComponents than call $scope.selectGroup', inject ($builder) ->
spyOn($scope, 'selectGroup').andCallFake ($event, activeGroup) ->
expect($event).toBeNull()
expect($scope.activeGroup).toEqual activeGroup
$builder.registerComponen... | $builder.registerComponent 'xComponent',
group: 'X'
template: "<div class='form-group'></div>"
popoverTemplate: "<div class='form-group'></div>"
$scope.$digest()
$event = preventDefault: jasmine.createSpy 'preventDefault'
... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | a59bcf484e4261c24e853daf2fee69879df44bd3 | 600 | https://github.com/kelp404/angular-form-builder/blob/a59bcf484e4261c24e853daf2fee69879df44bd3/test/specs/controllerSpec.coffee | 132 | 155 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:raw_corpus | raw_corpus | describe 'builder.provider', ->
beforeEach module('builder')
describe 'fbFormObjectEditableController', ->
$scope = null
controller = null
beforeEach inject ($rootScope, $controller) ->
$scope = $rootScope.$new()
controller = $controller 'fbFormObjectEditableCo... | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 1 | 41 | ||
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
describe 'builder.provider', ->
beforeEach module('builder')
describe 'fbFormObjectEditableController', ->
$scope = null
controller = null
beforeEach inject ($rootScope, $controller) ->
$scope = $rootScope.$new()
... | describe('builder.provider', function() {
beforeEach(module('builder'));
return describe('fbFormObjectEditableController', function() {
var $scope, controller;
$scope = null;
controller = null;
beforeEach(inject(function($rootScope, $controller) {
$scope = $rootScope.$new();
return contr... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 1 | 41 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
describe('builder.provider', function() {
beforeEach(module('builder'));
return describe('fbFormObjectEditableController', function() {
var $scope, controller;
$scope = null;
controller = null;
beforeEach(inject(function($rootScope, $controller)... | describe 'builder.provider', ->
beforeEach module('builder')
describe 'fbFormObjectEditableController', ->
$scope = null
controller = null
beforeEach inject ($rootScope, $controller) ->
$scope = $rootScope.$new()
controller = $controller 'fbFormObjectEditableCo... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 1 | 41 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:1:completion | completion | describe 'builder.provider', ->
beforeEach module('builder')
describe 'fbFormObjectEditableController', ->
$scope = null
controller = null
beforeEach inject ($rootScope, $controller) ->
$scope = $rootScope.$new()
controller = $controller 'fbFormObjectEditableCo... | description: 'description'
placeholder: 'placeholder'
required: no
options: ['value one', 'two']
$scope.setupScope formObject
it 'check $scope.setupScope(formObject) copy properties from formObject without `$$hashKey`', ->
... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 1 | 41 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:2:raw_corpus | raw_corpus | $scope.description = 'new'
$scope.$digest()
expect(formObject.description).toEqual $scope.description
$scope.placeholder = 'new'
$scope.$digest()
expect(formObject.placeholder).toEqual $scope.placeholder
$scope.required = ... | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 43 | 89 | ||
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:2:completion | completion | $scope.description = 'new'
$scope.$digest()
expect(formObject.description).toEqual $scope.description
$scope.placeholder = 'new'
$scope.$digest()
expect(formObject.placeholder).toEqual $scope.placeholder
$scope.required = ... | formObject = null
beforeEach ->
formObject =
$$hashKey: '007'
label: 'label'
description: 'description'
placeholder: 'placeholder'
required: no
options: ['value one', 'two... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 43 | 89 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:raw_corpus | raw_corpus | it 'check $scope after call $scope.data.rollback()', ->
$scope.data.backup()
$scope.label = ''
$scope.description = ''
$scope.placeholder = ''
$scope.required = yes
$scope.optionsText = ''
$scope.data.rollbac... | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 91 | 104 | ||
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'check $scope after call $scope.data.rollback()', ->
$scope.data.backup()
$scope.label = ''
$scope.description = ''
$scope.placeholder = ''
$scope.required = yes
$s... | it('check $scope after call $scope.data.rollback()', function() {
$scope.data.backup();
$scope.label = '';
$scope.description = '';
$scope.placeholder = '';
$scope.required = true;
$scope.optionsText = '';
$scope.data.rollback();
$scope.$digest();
expect(formObject.label).toEqual($scope.label);
expe... | CoffeeScript | JavaScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 91 | 104 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('check $scope after call $scope.data.rollback()', function() {
$scope.data.backup();
$scope.label = '';
$scope.description = '';
$scope.placeholder = '';
$scope.required = true;
$scope.optionsText = '';
$scope.data.rollback();
$scope.$digest();
... | it 'check $scope after call $scope.data.rollback()', ->
$scope.data.backup()
$scope.label = ''
$scope.description = ''
$scope.placeholder = ''
$scope.required = yes
$scope.optionsText = ''
$scope.data.rollbac... | JavaScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 91 | 104 |
kelp404/angular-form-builder:test/specs/controllerSpec.coffee:3:completion | completion | it 'check $scope after call $scope.data.rollback()', ->
$scope.data.backup()
$scope.label = ''
$scope.description = ''
$scope.placeholder = ''
$scope.required = yes
$scope.optionsText = '' | $scope.data.rollback()
$scope.$digest()
expect(formObject.label).toEqual $scope.label
expect(formObject.description).toEqual $scope.description
expect(formObject.placeholder).toEqual $scope.placeholder
expect(formObject.required).toEqual $s... | CoffeeScript | CoffeeScript | kelp404/angular-form-builder | test/specs/controllerSpec.coffee | MIT | daeac8e873d4aafa8d300a2280ecdcfb7216dba2 | 600 | https://github.com/kelp404/angular-form-builder/blob/daeac8e873d4aafa8d300a2280ecdcfb7216dba2/test/specs/controllerSpec.coffee | 91 | 104 |
soyjavi/QuoJS:source/quo.css.coffee:1:raw_corpus | raw_corpus | ###
CSS Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 1 | 43 | ||
soyjavi/QuoJS:source/quo.css.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
CSS Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClas... | /*
CSS Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
"use strict";
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
*/... | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 1 | 43 |
soyjavi/QuoJS:source/quo.css.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
CSS Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
"use strict";
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method ad... | ###
CSS Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.... | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 1 | 43 |
soyjavi/QuoJS:source/quo.css.coffee:1:completion | completion | ###
CSS Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.... | @each ->
@classList.add value for value in _arrayOf values
###
Remove stylesheet class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.removeClass = (values) ->
@each ->
@classList.remove value for value in _arrayOf values
###
Toggle s... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 1 | 43 |
soyjavi/QuoJS:source/quo.css.coffee:2:raw_corpus | raw_corpus | ###
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} Name of stylesheet class
###
$$.fn.hasClass = (name) ->
@length > 0 and @[0].classList.contains name
###
List a object with all classes in a given instance element
@method listClass
@param {string}... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 45 | 84 | ||
soyjavi/QuoJS:source/quo.css.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} Name of stylesheet class
###
$$.fn.hasClass = (name) ->
@length > 0 and @[0].classList.contains name
###
List a object with all classes in a give... | /*
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} Name of stylesheet class
*/
$$.fn.hasClass = function(name) {
return this.length > 0 && this[0].classList.contains(name);
};
/*
List a object with all classes in a given instance element
@method listClass
@param {string... | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 45 | 84 |
soyjavi/QuoJS:source/quo.css.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} Name of stylesheet class
*/
$$.fn.hasClass = function(name) {
return this.length > 0 && this[0].classList.contains(name);
};
/*
List a object with all classes in a g... | ###
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} Name of stylesheet class
###
$$.fn.hasClass = (name) ->
@length > 0 and @[0].classList.contains name
###
List a object with all classes in a given instance element
@method listClass
@param {string}... | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 45 | 84 |
soyjavi/QuoJS:source/quo.css.coffee:2:completion | completion | ###
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} Name of stylesheet class
###
$$.fn.hasClass = (name) ->
@length > 0 and @[0].classList.contains name
###
List a object with all classes in a given instance element
@method listClass
@param {string}... | @method style
@param {string} Name of property
@param {string} [OPTIONAL] Value for property
###
$$.fn.style = $$.fn.css = (property, value) ->
if value?
@each -> @style[property] = value
else
el = @[0]
el.style[property] or _computedStyle(el, property)
###
Set/Get a stylesheet... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 45 | 84 |
soyjavi/QuoJS:source/quo.css.coffee:3:raw_corpus | raw_corpus | # ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property]
_arrayOf = (values) ->
value... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 87 | 95 | ||
soyjavi/QuoJS:source/quo.css.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(e... | // ---------------------------------------------------------------------------
// Private Methods
// ---------------------------------------------------------------------------
var _arrayOf, _computedStyle;
_computedStyle = function(element, property) {
return document.defaultView.getComputedStyle(element, "")[prope... | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 87 | 95 |
soyjavi/QuoJS:source/quo.css.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// ---------------------------------------------------------------------------
// Private Methods
// ---------------------------------------------------------------------------
var _arrayOf, _computedStyle;
_computedStyle = function(element, property) {
return d... | # ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property]
_arrayOf = (values) ->
value... | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 87 | 95 |
soyjavi/QuoJS:source/quo.css.coffee:3:completion | completion | # ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) -> | document.defaultView.getComputedStyle(element, "")[property]
_arrayOf = (values) ->
values = [values] unless Array.isArray(values)
values | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 7296aa6bc321370c1b92de005c9b55b9e1365596 | 2,055 | https://github.com/soyjavi/QuoJS/blob/7296aa6bc321370c1b92de005c9b55b9e1365596/source/quo.css.coffee | 87 | 95 |
soyjavi/QuoJS:source/quo.css.coffee:1:raw_corpus | raw_corpus | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | d6e2d2f25651be7887d5e683bcea0bd427db6591 | 2,055 | https://github.com/soyjavi/QuoJS/blob/d6e2d2f25651be7887d5e683bcea0bd427db6591/source/quo.css.coffee | 1 | 43 | ||
soyjavi/QuoJS:source/quo.css.coffee:1:completion | completion | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | @each ->
@classList.add value for value in _arrayOf values
###
Remove stylesheet class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.removeClass = (values) ->
@each ->
gi @classList.remove value for value in _arrayOf values
###
Toggle... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | d6e2d2f25651be7887d5e683bcea0bd427db6591 | 2,055 | https://github.com/soyjavi/QuoJS/blob/d6e2d2f25651be7887d5e683bcea0bd427db6591/source/quo.css.coffee | 1 | 43 |
soyjavi/QuoJS:source/quo.css.coffee:1:raw_corpus | raw_corpus | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 1 | 40 | ||
soyjavi/QuoJS:source/quo.css.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addCl... | /*
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
"use strict";
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
... | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 1 | 40 |
soyjavi/QuoJS:source/quo.css.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
"use strict";
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method ... | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 1 | 40 |
soyjavi/QuoJS:source/quo.css.coffee:1:completion | completion | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
### | $$.fn.addClass = (values) ->
@each -> @classList.add value for value in values.split " "
###
Remove stylesheet class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.removeClass = (values) ->
@each -> @classList.remove value for value in values.split... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 1 | 40 |
soyjavi/QuoJS:source/quo.css.coffee:3:raw_corpus | raw_corpus | # ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property] | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 84 | 88 | ||
soyjavi/QuoJS:source/quo.css.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(e... | // ---------------------------------------------------------------------------
// Private Methods
// ---------------------------------------------------------------------------
var _computedStyle;
_computedStyle = function(element, property) {
return document.defaultView.getComputedStyle(element, "")[property];
}; | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 84 | 88 |
soyjavi/QuoJS:source/quo.css.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// ---------------------------------------------------------------------------
// Private Methods
// ---------------------------------------------------------------------------
var _computedStyle;
_computedStyle = function(element, property) {
return document.de... | # ---------------------------------------------------------------------------
# Private Methods
# ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property] | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 84 | 88 |
soyjavi/QuoJS:source/quo.css.coffee:3:completion | completion | # ---------------------------------------------------------------------------
# Private Methods | # ---------------------------------------------------------------------------
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property] | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 8396195e0feb84b0e1704ef9c21ec7c94b8f1518 | 2,055 | https://github.com/soyjavi/QuoJS/blob/8396195e0feb84b0e1704ef9c21ec7c94b8f1518/source/quo.css.coffee | 84 | 88 |
soyjavi/QuoJS:source/quo.css.coffee:1:raw_corpus | raw_corpus | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 41c65ae444d494fc7ca9b0778a305666c0aaf904 | 2,055 | https://github.com/soyjavi/QuoJS/blob/41c65ae444d494fc7ca9b0778a305666c0aaf904/source/quo.css.coffee | 1 | 42 | ||
soyjavi/QuoJS:source/quo.css.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addCl... | /*
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
"use strict";
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
... | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 41c65ae444d494fc7ca9b0778a305666c0aaf904 | 2,055 | https://github.com/soyjavi/QuoJS/blob/41c65ae444d494fc7ca9b0778a305666c0aaf904/source/quo.css.coffee | 1 | 42 |
soyjavi/QuoJS:source/quo.css.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
*/
"use strict";
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method ... | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 41c65ae444d494fc7ca9b0778a305666c0aaf904 | 2,055 | https://github.com/soyjavi/QuoJS/blob/41c65ae444d494fc7ca9b0778a305666c0aaf904/source/quo.css.coffee | 1 | 42 |
soyjavi/QuoJS:source/quo.css.coffee:1:completion | completion | ###
Basic Quo Module
@namespace Quo
@class css
@author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
###
"use strict"
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$... | @each -> @classList.add name
###
Remove stylesheet class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.removeClass = (name) ->
@each -> @classList.remove name
###
Toggle stylesheet class to a given instance element
@method addClass
@param {... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 41c65ae444d494fc7ca9b0778a305666c0aaf904 | 2,055 | https://github.com/soyjavi/QuoJS/blob/41c65ae444d494fc7ca9b0778a305666c0aaf904/source/quo.css.coffee | 1 | 42 |
soyjavi/QuoJS:source/quo.css.coffee:3:raw_corpus | raw_corpus | # Private Methods
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property] | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 86c2d4406262c5ec7c1ec8d3dea8d1d4adbc9880 | 2,055 | https://github.com/soyjavi/QuoJS/blob/86c2d4406262c5ec7c1ec8d3dea8d1d4adbc9880/source/quo.css.coffee | 86 | 88 | ||
soyjavi/QuoJS:source/quo.css.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# Private Methods
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property]
``` | // Private Methods
var _computedStyle;
_computedStyle = function(element, property) {
return document.defaultView.getComputedStyle(element, "")[property];
}; | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 86c2d4406262c5ec7c1ec8d3dea8d1d4adbc9880 | 2,055 | https://github.com/soyjavi/QuoJS/blob/86c2d4406262c5ec7c1ec8d3dea8d1d4adbc9880/source/quo.css.coffee | 86 | 88 |
soyjavi/QuoJS:source/quo.css.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// Private Methods
var _computedStyle;
_computedStyle = function(element, property) {
return document.defaultView.getComputedStyle(element, "")[property];
};
``` | # Private Methods
_computedStyle = (element, property) ->
document.defaultView.getComputedStyle(element, "")[property] | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | 86c2d4406262c5ec7c1ec8d3dea8d1d4adbc9880 | 2,055 | https://github.com/soyjavi/QuoJS/blob/86c2d4406262c5ec7c1ec8d3dea8d1d4adbc9880/source/quo.css.coffee | 86 | 88 |
soyjavi/QuoJS:source/quo.css.coffee:1:raw_corpus | raw_corpus | do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.addClass = (name) ->
@each -> @classList.add name
###
Remove stylesheet class to a given instance element
@meth... | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | f3ed40727f537f38953fe5d753063e372641497f | 2,055 | https://github.com/soyjavi/QuoJS/blob/f3ed40727f537f38953fe5d753063e372641497f/source/quo.css.coffee | 1 | 49 | ||
soyjavi/QuoJS:source/quo.css.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.addClass = (name) ->
@each -> @classList.add name
###
Re... | (function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
*/
$$.fn.addClass = function(name) {
return this.each(function() {
return this.classList.add(name);
});
};
... | CoffeeScript | JavaScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | f3ed40727f537f38953fe5d753063e372641497f | 2,055 | https://github.com/soyjavi/QuoJS/blob/f3ed40727f537f38953fe5d753063e372641497f/source/quo.css.coffee | 1 | 49 |
soyjavi/QuoJS:source/quo.css.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
(function($$) {
var VENDORS;
VENDORS = ["-webkit-", "-moz-", "-ms-", "-o-", ""];
/*
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
*/
$$.fn.addClass = function(name) {
return this.each(function()... | do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.addClass = (name) ->
@each -> @classList.add name
###
Remove stylesheet class to a given instance element
@meth... | JavaScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | f3ed40727f537f38953fe5d753063e372641497f | 2,055 | https://github.com/soyjavi/QuoJS/blob/f3ed40727f537f38953fe5d753063e372641497f/source/quo.css.coffee | 1 | 49 |
soyjavi/QuoJS:source/quo.css.coffee:1:completion | completion | do ($$ = Quo) ->
VENDORS = [ "-webkit-", "-moz-", "-ms-", "-o-", "" ]
###
Add class to a given instance element
@method addClass
@param {string} Name of stylesheet class
###
$$.fn.addClass = (name) ->
@each -> @classList.add name
###
Remove stylesheet class to a given instance element
@meth... | @method addClass
@param {string} Name of stylesheet class
###
$$.fn.toggleClass = (name) ->
@each ->
method = if @.classList.contains(name) then "remove" else "add"
@classList[method] name
###
Test if a stylesheet class is in the giben instance element
@method hasClass
@param {string} ... | CoffeeScript | CoffeeScript | soyjavi/QuoJS | source/quo.css.coffee | MIT | f3ed40727f537f38953fe5d753063e372641497f | 2,055 | https://github.com/soyjavi/QuoJS/blob/f3ed40727f537f38953fe5d753063e372641497f/source/quo.css.coffee | 1 | 49 |
jianliaoim/talk-os:talk-api2x/server/services/talkai.coffee:1:raw_corpus | raw_corpus | Promise = require 'bluebird'
Err = require 'err1st'
_ = require 'lodash'
serviceLoader = require 'talk-services'
limbo = require 'limbo'
logger = require 'graceful-logger'
app = require '../server'
$service = serviceLoader.load 'talkai'
{
MessageModel
PreferenceModel
} = limbo.use 'talk'
# Register hook after c... | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/services/talkai.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/talkai.coffee | 1 | 46 | ||
jianliaoim/talk-os:talk-api2x/server/services/talkai.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Promise = require 'bluebird'
Err = require 'err1st'
_ = require 'lodash'
serviceLoader = require 'talk-services'
limbo = require 'limbo'
logger = require 'graceful-logger'
app = require '../server'
$service = serviceLoader.load 'talkai'
{
MessageModel
Pref... | var $service, Err, MessageModel, PreferenceModel, Promise, _, app, limbo, logger, serviceLoader;
Promise = require('bluebird');
Err = require('err1st');
_ = require('lodash');
serviceLoader = require('talk-services');
limbo = require('limbo');
logger = require('graceful-logger');
app = require('../server');
$se... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-api2x/server/services/talkai.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/talkai.coffee | 1 | 46 |
jianliaoim/talk-os:talk-api2x/server/services/talkai.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var $service, Err, MessageModel, PreferenceModel, Promise, _, app, limbo, logger, serviceLoader;
Promise = require('bluebird');
Err = require('err1st');
_ = require('lodash');
serviceLoader = require('talk-services');
limbo = require('limbo');
logger = requir... | Promise = require 'bluebird'
Err = require 'err1st'
_ = require 'lodash'
serviceLoader = require 'talk-services'
limbo = require 'limbo'
logger = require 'graceful-logger'
app = require '../server'
$service = serviceLoader.load 'talkai'
{
MessageModel
PreferenceModel
} = limbo.use 'talk'
# Register hook after c... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/services/talkai.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/talkai.coffee | 1 | 46 |
jianliaoim/talk-os:talk-api2x/server/services/talkai.coffee:1:completion | completion | Promise = require 'bluebird'
Err = require 'err1st'
_ = require 'lodash'
serviceLoader = require 'talk-services'
limbo = require 'limbo'
logger = require 'graceful-logger'
app = require '../server'
$service = serviceLoader.load 'talkai'
{
MessageModel
PreferenceModel
} = limbo.use 'talk'
# Register hook after c... | $service.then (service) ->
return unless message._toId and "#{message._toId}" is "#{service.robot._id}"
$preference = PreferenceModel.findOneAsync _id: message._creatorId
.then (preference) ->
if preference?.customOptions?.hasGetReply is false
preference.$save()
else prefere... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-api2x/server/services/talkai.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-api2x/server/services/talkai.coffee | 1 | 46 |
jianliaoim/talk-os:talk-web/client/app/topic-correction.coffee:1:raw_corpus | raw_corpus | React = require 'react'
Immutable = require 'immutable'
lang = require '../locales/lang'
span = React.createFactory 'span'
T = React.PropTypes
cx = require 'classnames'
module.exports = React.createClass
displayName: 'topic-correction'
propTypes:
topic: T.instanceOf(Immutable.Map)
isGeneral: ->
@pro... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/topic-correction.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-correction.coffee | 1 | 26 | ||
jianliaoim/talk-os:talk-web/client/app/topic-correction.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
React = require 'react'
Immutable = require 'immutable'
lang = require '../locales/lang'
span = React.createFactory 'span'
T = React.PropTypes
cx = require 'classnames'
module.exports = React.createClass
displayName: 'topic-correction'
propTypes:
top... | var Immutable, React, T, cx, lang, span;
React = require('react');
Immutable = require('immutable');
lang = require('../locales/lang');
span = React.createFactory('span');
T = React.PropTypes;
cx = require('classnames');
module.exports = React.createClass({
displayName: 'topic-correction',
propTypes: {
t... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/topic-correction.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-correction.coffee | 1 | 26 |
jianliaoim/talk-os:talk-web/client/app/topic-correction.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Immutable, React, T, cx, lang, span;
React = require('react');
Immutable = require('immutable');
lang = require('../locales/lang');
span = React.createFactory('span');
T = React.PropTypes;
cx = require('classnames');
module.exports = React.createClass({
... | React = require 'react'
Immutable = require 'immutable'
lang = require '../locales/lang'
span = React.createFactory 'span'
T = React.PropTypes
cx = require 'classnames'
module.exports = React.createClass
displayName: 'topic-correction'
propTypes:
topic: T.instanceOf(Immutable.Map)
isGeneral: ->
@pro... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/topic-correction.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-correction.coffee | 1 | 26 |
jianliaoim/talk-os:talk-web/client/app/topic-correction.coffee:1:completion | completion | React = require 'react'
Immutable = require 'immutable'
lang = require '../locales/lang'
span = React.createFactory 'span'
T = React.PropTypes
cx = require 'classnames'
module.exports = React.createClass
displayName: 'topic-correction' | propTypes:
topic: T.instanceOf(Immutable.Map)
isGeneral: ->
@props.topic.get('isGeneral')
render: ->
name =
if @isGeneral()
lang.getText('room-general')
else
@props.topic.get('topic')
span className: 'name text-overflow', name | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/topic-correction.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/topic-correction.coffee | 1 | 26 |
iizukanao/node-rtsp-rtmp-server:flv.coffee:1:raw_corpus | raw_corpus | api =
SOUND_FORMAT_AAC: 10 # AAC
SOUND_RATE_5KHZ : 0 # 5.5 kHz
SOUND_RATE_11KHZ: 1 # 11 kHz
SOUND_RATE_22KHZ: 2 # 22 kHz
SOUND_RATE_44KHZ: 3 # 44 kHz
# SoundSize for compressed audio is 1 (16-bit)
SOUND_SIZE_COMPRESSED: 1
SOUND_TYPE_MONO: 0
SOUND_TYPE_STEREO: 1
AAC_PACKET_TYPE_SEQUENCE_HEAD... | CoffeeScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 1 | 50 | ||
iizukanao/node-rtsp-rtmp-server:flv.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
api =
SOUND_FORMAT_AAC: 10 # AAC
SOUND_RATE_5KHZ : 0 # 5.5 kHz
SOUND_RATE_11KHZ: 1 # 11 kHz
SOUND_RATE_22KHZ: 2 # 22 kHz
SOUND_RATE_44KHZ: 3 # 44 kHz
# SoundSize for compressed audio is 1 (16-bit)
SOUND_SIZE_COMPRESSED: 1
SOUND_TYPE_MONO: ... | var api;
api = {
SOUND_FORMAT_AAC: 10, // AAC
SOUND_RATE_5KHZ: 0, // 5.5 kHz
SOUND_RATE_11KHZ: 1, // 11 kHz
SOUND_RATE_22KHZ: 2, // 22 kHz
SOUND_RATE_44KHZ: 3, // 44 kHz
// SoundSize for compressed audio is 1 (16-bit)
SOUND_SIZE_COMPRESSED: 1,
SOUND_TYPE_MONO: 0,
SOUND_TYPE_STEREO: 1,
AAC_PACKET_T... | CoffeeScript | JavaScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 1 | 50 |
iizukanao/node-rtsp-rtmp-server:flv.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var api;
api = {
SOUND_FORMAT_AAC: 10, // AAC
SOUND_RATE_5KHZ: 0, // 5.5 kHz
SOUND_RATE_11KHZ: 1, // 11 kHz
SOUND_RATE_22KHZ: 2, // 22 kHz
SOUND_RATE_44KHZ: 3, // 44 kHz
// SoundSize for compressed audio is 1 (16-bit)
SOUND_SIZE_COMPRESSED: 1,
SOU... | api =
SOUND_FORMAT_AAC: 10 # AAC
SOUND_RATE_5KHZ : 0 # 5.5 kHz
SOUND_RATE_11KHZ: 1 # 11 kHz
SOUND_RATE_22KHZ: 2 # 22 kHz
SOUND_RATE_44KHZ: 3 # 44 kHz
# SoundSize for compressed audio is 1 (16-bit)
SOUND_SIZE_COMPRESSED: 1
SOUND_TYPE_MONO: 0
SOUND_TYPE_STEREO: 1
AAC_PACKET_TYPE_SEQUENCE_HEAD... | JavaScript | CoffeeScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 1 | 50 |
iizukanao/node-rtsp-rtmp-server:flv.coffee:1:completion | completion | api =
SOUND_FORMAT_AAC: 10 # AAC
SOUND_RATE_5KHZ : 0 # 5.5 kHz
SOUND_RATE_11KHZ: 1 # 11 kHz
SOUND_RATE_22KHZ: 2 # 22 kHz
SOUND_RATE_44KHZ: 3 # 44 kHz
# SoundSize for compressed audio is 1 (16-bit)
SOUND_SIZE_COMPRESSED: 1
SOUND_TYPE_MONO: 0
SOUND_TYPE_STEREO: 1
AAC_PACKET_TYPE_SEQUENCE_HEAD... | when 8 then 0
when 16 then 1
else
throw new Error "Invalid number of bits in a sample: #{numBits}"
# @param sampleRate (number) sample rate in Hz
# @return (number) sound rate
getSoundRate: (sampleRate) ->
switch parseInt sampleRate
when 5512 then 0
when 11025 then 1
... | CoffeeScript | CoffeeScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 1 | 50 |
iizukanao/node-rtsp-rtmp-server:flv.coffee:2:raw_corpus | raw_corpus | soundSize: api.SOUND_SIZE_COMPRESSED
soundType: api.SOUND_TYPE_STEREO # ignored by Flash Player
aacPacketType: opts.aacPacketType
# @param opts (object) {
# soundFormat (int)
# soundRate (int)
# soundSize (int)
# soundType (int)
# aacPacketType (int) (optional): mandatory if soundFo... | CoffeeScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 51 | 76 | ||
iizukanao/node-rtsp-rtmp-server:flv.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
soundSize: api.SOUND_SIZE_COMPRESSED
soundType: api.SOUND_TYPE_STEREO # ignored by Flash Player
aacPacketType: opts.aacPacketType
# @param opts (object) {
# soundFormat (int)
# soundRate (int)
# soundSize (int)
# soundType (int)
... | ({
soundSize: api.SOUND_SIZE_COMPRESSED({
soundType: api.SOUND_TYPE_STEREO, // ignored by Flash Player
aacPacketType: opts.aacPacketType
}),
// @param opts (object) {
// soundFormat (int)
// soundRate (int)
// soundSize (int)
// soundType (int)
// aacPacketType (int) (optional): manda... | CoffeeScript | JavaScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 51 | 76 |
iizukanao/node-rtsp-rtmp-server:flv.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
soundSize: api.SOUND_SIZE_COMPRESSED({
soundType: api.SOUND_TYPE_STEREO, // ignored by Flash Player
aacPacketType: opts.aacPacketType
}),
// @param opts (object) {
// soundFormat (int)
// soundRate (int)
// soundSize (int)
// sound... | soundSize: api.SOUND_SIZE_COMPRESSED
soundType: api.SOUND_TYPE_STEREO # ignored by Flash Player
aacPacketType: opts.aacPacketType
# @param opts (object) {
# soundFormat (int)
# soundRate (int)
# soundSize (int)
# soundType (int)
# aacPacketType (int) (optional): mandatory if soundFo... | JavaScript | CoffeeScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 51 | 76 |
iizukanao/node-rtsp-rtmp-server:flv.coffee:2:completion | completion | soundSize: api.SOUND_SIZE_COMPRESSED
soundType: api.SOUND_TYPE_STEREO # ignored by Flash Player
aacPacketType: opts.aacPacketType
# @param opts (object) {
# soundFormat (int)
# soundRate (int)
# soundSize (int)
# soundType (int)
# aacPacketType (int) (optional): mandatory if soundFo... | # AUDIODATA tag: Adobe's Video File Format Spec v10.1 E.4.2.1 AUDIODATA
# TODO: If AAC, SoundType and SoundRate should be 1 and 44 kHz, respectively.
buf = [
(opts.soundFormat << 4) \ # SoundFormat (4 bits)
| (opts.soundRate << 2) \ # SoundRate (2 bits): ignored by Flash Player if AAC
| (opts.... | CoffeeScript | CoffeeScript | iizukanao/node-rtsp-rtmp-server | flv.coffee | MIT | 0e71e753d4fccc26db984471190254ab6604bda6 | 1,100 | https://github.com/iizukanao/node-rtsp-rtmp-server/blob/0e71e753d4fccc26db984471190254ab6604bda6/flv.coffee | 51 | 76 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/saveDataIfAuthorized.coffee | 1 | 34 | ||
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dat... | var _;
_ = require('lodash');
module.exports = function(sendMessage, fromDevice, toDeviceUuid, params, callback = _.noop, dependencies = {}) {
var dataDB, getDevice, logEvent, moment, ref, ref1, ref2, ref3, ref4, securityImpl;
securityImpl = (ref = dependencies.securityImpl) != null ? ref : require('./getSecurity... | CoffeeScript | JavaScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/saveDataIfAuthorized.coffee | 1 | 34 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(sendMessage, fromDevice, toDeviceUuid, params, callback = _.noop, dependencies = {}) {
var dataDB, getDevice, logEvent, moment, ref, ref1, ref2, ref3, ref4, securityImpl;
securityImpl = (ref = dependenci... | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | JavaScript | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/saveDataIfAuthorized.coffee | 1 | 34 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | data.timestamp ?= moment().toISOString()
data.timestamp = moment(data.timestamp).toISOString()
_.each data, (value, key) ->
try
data[key] = JSON.parse(value).toString()
catch e
logEvent 700, data
dataDB.insert data, (error, saved) ->
return callback error if er... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | d50d8ea82333a9152fed00173143d5da12d17b78 | 815 | https://github.com/octoblu/meshblu/blob/d50d8ea82333a9152fed00173143d5da12d17b78/lib/saveDataIfAuthorized.coffee | 1 | 34 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | 7063bd4527f3de5e9b6988adb4006eec72687735 | 815 | https://github.com/octoblu/meshblu/blob/7063bd4527f3de5e9b6988adb4006eec72687735/lib/saveDataIfAuthorized.coffee | 1 | 35 | ||
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dat... | var _;
_ = require('lodash');
module.exports = function(sendMessage, fromDevice, toDeviceUuid, params, callback = _.noop, dependencies = {}) {
var dataDB, getDevice, logEvent, moment, ref, ref1, ref2, ref3, ref4, ref5, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.securityImpl) != null ? re... | CoffeeScript | JavaScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | 7063bd4527f3de5e9b6988adb4006eec72687735 | 815 | https://github.com/octoblu/meshblu/blob/7063bd4527f3de5e9b6988adb4006eec72687735/lib/saveDataIfAuthorized.coffee | 1 | 35 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(sendMessage, fromDevice, toDeviceUuid, params, callback = _.noop, dependencies = {}) {
var dataDB, getDevice, logEvent, moment, ref, ref1, ref2, ref3, ref4, ref5, securityImpl, sendConfigActivity;
securi... | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | JavaScript | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | 7063bd4527f3de5e9b6988adb4006eec72687735 | 815 | https://github.com/octoblu/meshblu/blob/7063bd4527f3de5e9b6988adb4006eec72687735/lib/saveDataIfAuthorized.coffee | 1 | 35 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | data.uuid = toDeviceUuid
data.timestamp ?= moment().toISOString()
data.timestamp = moment(data.timestamp).toISOString()
_.each data, (value, key) ->
try
data[key] = JSON.parse(value).toString()
catch e
logEvent 700, data
dataDB.insert data, (error, saved) ->
... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | 7063bd4527f3de5e9b6988adb4006eec72687735 | 815 | https://github.com/octoblu/meshblu/blob/7063bd4527f3de5e9b6988adb4006eec72687735/lib/saveDataIfAuthorized.coffee | 1 | 35 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | e315719b325c77ceb0671572d93ad7edf7d08475 | 815 | https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/lib/saveDataIfAuthorized.coffee | 1 | 35 | ||
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dat... | var _;
_ = require('lodash');
module.exports = function(sendMessage, fromDevice, toDeviceUuid, params, callback = _.noop, dependencies = {}) {
var dataDB, getDevice, logEvent, moment, ref, ref1, ref2, ref3, ref4, ref5, securityImpl, sendConfigActivity;
securityImpl = (ref = dependencies.securityImpl) != null ? re... | CoffeeScript | JavaScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | e315719b325c77ceb0671572d93ad7edf7d08475 | 815 | https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/lib/saveDataIfAuthorized.coffee | 1 | 35 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _;
_ = require('lodash');
module.exports = function(sendMessage, fromDevice, toDeviceUuid, params, callback = _.noop, dependencies = {}) {
var dataDB, getDevice, logEvent, moment, ref, ref1, ref2, ref3, ref4, ref5, securityImpl, sendConfigActivity;
securi... | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | JavaScript | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | e315719b325c77ceb0671572d93ad7edf7d08475 | 815 | https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/lib/saveDataIfAuthorized.coffee | 1 | 35 |
octoblu/meshblu:lib/saveDataIfAuthorized.coffee:1:completion | completion | _ = require 'lodash'
module.exports = (sendMessage, fromDevice, toDeviceUuid, params, callback=_.noop, dependencies={}) ->
securityImpl = dependencies.securityImpl ? require './getSecurityImpl'
getDevice = dependencies.getDevice ? require './getDevice'
dataDB = dependencies.dataDB ? require('./database').data
... | data.uuid = toDeviceUuid
data.timestamp ?= moment().toISOString()
data.timestamp = moment(data.timestamp).toISOString()
_.each data, (value, key) ->
try
data[key] = JSON.parse(value).toString()
catch e
logEvent 700, data
dataDB.insert data, (error, saved) ->
... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/saveDataIfAuthorized.coffee | MIT | e315719b325c77ceb0671572d93ad7edf7d08475 | 815 | https://github.com/octoblu/meshblu/blob/e315719b325c77ceb0671572d93ad7edf7d08475/lib/saveDataIfAuthorized.coffee | 1 | 35 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
@dependencies =
getDeviceWithToken : sinon.stub()
De... | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 1 | 50 | ||
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
@depend... | var TestDatabase, _, bcrypt;
_ = require('lodash');
bcrypt = require('bcrypt');
TestDatabase = require('../test-database');
describe('authDevice', function() {
beforeEach(function() {
this.sut = require('../../lib/authDevice');
this.device = {
verifyToken: sinon.stub(),
fetch: sinon.stub()
... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 1 | 50 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var TestDatabase, _, bcrypt;
_ = require('lodash');
bcrypt = require('bcrypt');
TestDatabase = require('../test-database');
describe('authDevice', function() {
beforeEach(function() {
this.sut = require('../../lib/authDevice');
this.device = {
v... | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
@dependencies =
getDeviceWithToken : sinon.stub()
De... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 1 | 50 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:completion | completion | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
@dependencies =
getDeviceWithToken : sinon.stub()
De... | describe 'when passed an invalid token and uuid', ->
beforeEach (done) ->
@device.verifyToken.yields null, false
@device.fetch.yields null, {}
storeResults = (@error, @returnDevice) => done()
@sut 'valid-uuid', 'invalid-token', storeResults, @dependencies
it 'should call the callback wi... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 1 | 50 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:2:raw_corpus | raw_corpus | it 'should call fetch', ->
expect(@device.fetch).to.have.been.called
it 'should call the callback without an error', ->
expect(@error).to.not.exist | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 51 | 55 | ||
octoblu/meshblu:test/lib/authDevice-spec.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
it 'should call fetch', ->
expect(@device.fetch).to.have.been.called
it 'should call the callback without an error', ->
expect(@error).to.not.exist
``` | it('should call fetch', function() {
return expect(this.device.fetch).to.have.been.called;
});
it('should call the callback without an error', function() {
return expect(this.error).to.not.exist;
}); | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 51 | 55 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
it('should call fetch', function() {
return expect(this.device.fetch).to.have.been.called;
});
it('should call the callback without an error', function() {
return expect(this.error).to.not.exist;
});
``` | it 'should call fetch', ->
expect(@device.fetch).to.have.been.called
it 'should call the callback without an error', ->
expect(@error).to.not.exist | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 51 | 55 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:2:completion | completion | it 'should call fetch', ->
expect(@device.fetch).to.have.been.called | it 'should call the callback without an error', ->
expect(@error).to.not.exist | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 62f93ac9292b7630f7b75486551a4bb6e8072708 | 815 | https://github.com/octoblu/meshblu/blob/62f93ac9292b7630f7b75486551a4bb6e8072708/test/lib/authDevice-spec.coffee | 51 | 55 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console.log("DEVICE", @device);
@dependencies =
getDev... | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/test/lib/authDevice-spec.coffee | 1 | 50 | ||
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console... | var TestDatabase, _, bcrypt;
_ = require('lodash');
bcrypt = require('bcrypt');
TestDatabase = require('../test-database');
describe('authDevice', function() {
beforeEach(function() {
this.sut = require('../../lib/authDevice');
this.device = {
verifyToken: sinon.stub(),
fetch: sinon.stub()
... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/test/lib/authDevice-spec.coffee | 1 | 50 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var TestDatabase, _, bcrypt;
_ = require('lodash');
bcrypt = require('bcrypt');
TestDatabase = require('../test-database');
describe('authDevice', function() {
beforeEach(function() {
this.sut = require('../../lib/authDevice');
this.device = {
v... | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console.log("DEVICE", @device);
@dependencies =
getDev... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/test/lib/authDevice-spec.coffee | 1 | 50 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:completion | completion | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console.log("DEVICE", @device);
@dependencies =
getDev... | describe 'when passed a valid token and uuid', ->
beforeEach (done) ->
@device.verifyToken.yields null, false
@device.fetch.yields null, {}
storeResults = (@error, @returnDevice) => done()
@sut 'valid-uuid', 'invalid-token', storeResults, @dependencies
it 'should call the callback with ... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/test/lib/authDevice-spec.coffee | 1 | 50 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:2:raw_corpus | raw_corpus | expect(@returnDevice).to.exist
it 'should call fetch', ->
expect(@device.fetch).to.have.been.called
it 'should call the callback without an error', ->
expect(@error).to.not.exist | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/test/lib/authDevice-spec.coffee | 51 | 57 | ||
octoblu/meshblu:test/lib/authDevice-spec.coffee:2:completion | completion | expect(@returnDevice).to.exist
it 'should call fetch', -> | expect(@device.fetch).to.have.been.called
it 'should call the callback without an error', ->
expect(@error).to.not.exist | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | cb391c74d09b0a15a42c95b0dc884034632400d8 | 815 | https://github.com/octoblu/meshblu/blob/cb391c74d09b0a15a42c95b0dc884034632400d8/test/lib/authDevice-spec.coffee | 51 | 57 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console.log("DEVICE", @device);
@dependencies =
getDev... | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 83684923f1be1a39418dc1a331416def34eebf83 | 815 | https://github.com/octoblu/meshblu/blob/83684923f1be1a39418dc1a331416def34eebf83/test/lib/authDevice-spec.coffee | 1 | 41 | ||
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console... | var TestDatabase, _, bcrypt;
_ = require('lodash');
bcrypt = require('bcrypt');
TestDatabase = require('../test-database');
describe('authDevice', function() {
beforeEach(function() {
this.sut = require('../../lib/authDevice');
this.device = {
verifyToken: sinon.stub(),
fetch: sinon.stub()
... | CoffeeScript | JavaScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 83684923f1be1a39418dc1a331416def34eebf83 | 815 | https://github.com/octoblu/meshblu/blob/83684923f1be1a39418dc1a331416def34eebf83/test/lib/authDevice-spec.coffee | 1 | 41 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var TestDatabase, _, bcrypt;
_ = require('lodash');
bcrypt = require('bcrypt');
TestDatabase = require('../test-database');
describe('authDevice', function() {
beforeEach(function() {
this.sut = require('../../lib/authDevice');
this.device = {
v... | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console.log("DEVICE", @device);
@dependencies =
getDev... | JavaScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 83684923f1be1a39418dc1a331416def34eebf83 | 815 | https://github.com/octoblu/meshblu/blob/83684923f1be1a39418dc1a331416def34eebf83/test/lib/authDevice-spec.coffee | 1 | 41 |
octoblu/meshblu:test/lib/authDevice-spec.coffee:1:completion | completion | _ = require 'lodash'
bcrypt = require 'bcrypt'
TestDatabase = require '../test-database'
describe 'authDevice', ->
beforeEach ->
@sut = require '../../lib/authDevice'
@device = verifyToken: sinon.stub(), fetch: sinon.stub()
console.log("DEVICE", @device);
@dependencies =
getDev... | it 'should call the callback with no device', ->
expect(@returnDevice).to.not.exist
it 'should call the callback with an error', ->
expect(@error).to.exist
describe 'when passed a valid token and uuid', ->
beforeEach (done) ->
@device.verifyToken.yields null, true
@device.fetch.yield... | CoffeeScript | CoffeeScript | octoblu/meshblu | test/lib/authDevice-spec.coffee | MIT | 83684923f1be1a39418dc1a331416def34eebf83 | 815 | https://github.com/octoblu/meshblu/blob/83684923f1be1a39418dc1a331416def34eebf83/test/lib/authDevice-spec.coffee | 1 | 41 |
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:1:raw_corpus | raw_corpus | exports.inteFetch = (_teamId, success, fail) ->
api.integrations.read.get(queryParams: _teamId: _teamId)
.then (resp) ->
dispatcher.handleViewAction
type: 'inte/fetch'
data:
_teamId: _teamId
resp: resp
success? resp
.catch (error) ->
fail? error | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 10 | 20 | ||
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.inteFetch = (_teamId, success, fail) ->
api.integrations.read.get(queryParams: _teamId: _teamId)
.then (resp) ->
dispatcher.handleViewAction
type: 'inte/fetch'
data:
_teamId: _teamId
resp: resp
success... | exports.inteFetch = function(_teamId, success, fail) {
return api.integrations.read.get({
queryParams: {
_teamId: _teamId
}
}).then(function(resp) {
dispatcher.handleViewAction({
type: 'inte/fetch',
data: {
_teamId: _teamId,
resp: resp
}
});
return typeof ... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 10 | 20 |
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.inteFetch = function(_teamId, success, fail) {
return api.integrations.read.get({
queryParams: {
_teamId: _teamId
}
}).then(function(resp) {
dispatcher.handleViewAction({
type: 'inte/fetch',
data: {
_teamId: _teamId... | exports.inteFetch = (_teamId, success, fail) ->
api.integrations.read.get(queryParams: _teamId: _teamId)
.then (resp) ->
dispatcher.handleViewAction
type: 'inte/fetch'
data:
_teamId: _teamId
resp: resp
success? resp
.catch (error) ->
fail? error | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 10 | 20 |
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:1:completion | completion | exports.inteFetch = (_teamId, success, fail) ->
api.integrations.read.get(queryParams: _teamId: _teamId)
.then (resp) ->
dispatcher.handleViewAction
type: 'inte/fetch' | data:
_teamId: _teamId
resp: resp
success? resp
.catch (error) ->
fail? error | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 10 | 20 |
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:2:raw_corpus | raw_corpus | exports.inteUpdate = (_inteId, data, success, fail) ->
config =
pathParams:
id: _inteId
data: data
api.integrations.update.put(config)
.then (resp) ->
dispatcher.handleViewAction type: 'inte/update', data: resp
success? resp
.catch (error) ->
notifyActions.error lang.getText(... | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 22 | 33 | ||
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
exports.inteUpdate = (_inteId, data, success, fail) ->
config =
pathParams:
id: _inteId
data: data
api.integrations.update.put(config)
.then (resp) ->
dispatcher.handleViewAction type: 'inte/update', data: resp
success? resp
... | exports.inteUpdate = function(_inteId, data, success, fail) {
var config;
config = {
pathParams: {
id: _inteId
},
data: data
};
return api.integrations.update.put(config).then(function(resp) {
dispatcher.handleViewAction({
type: 'inte/update',
data: resp
});
return type... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 22 | 33 |
jianliaoim/talk-os:talk-web/client/actions/inte.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
exports.inteUpdate = function(_inteId, data, success, fail) {
var config;
config = {
pathParams: {
id: _inteId
},
data: data
};
return api.integrations.update.put(config).then(function(resp) {
dispatcher.handleViewAction({
type: ... | exports.inteUpdate = (_inteId, data, success, fail) ->
config =
pathParams:
id: _inteId
data: data
api.integrations.update.put(config)
.then (resp) ->
dispatcher.handleViewAction type: 'inte/update', data: resp
success? resp
.catch (error) ->
notifyActions.error lang.getText(... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/actions/inte.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/actions/inte.coffee | 22 | 33 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.