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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
oozcitak/xmlbuilder-js:src/XMLDummy.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLDummy, XMLNode;
XMLNode = require('./XMLNode');
// Represents a raw node
module.exports = XMLDummy = class XMLDummy extends XMLNode {
// Initializes a new instance of `XMLDummy`
// `XMLDummy` is a special node representing a node with
// a null val... | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLDummy extends XMLNode
# Initializes a new instance of `XMLDummy`
#
# `XMLDummy` is a special node representing a node with
# a null value. Dummy nodes are created while recursively
# building the XML tree. Simple skipping null... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDummy.coffee | MIT | 61c7428475fe9ffc02b63662b59f87749fe3125f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/61c7428475fe9ffc02b63662b59f87749fe3125f/src/XMLDummy.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLDummy.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a raw node
module.exports = class XMLDummy extends XMLNode
# Initializes a new instance of `XMLDummy`
#
# `XMLDummy` is a special node representing a node with
# a null value. Dummy nodes are created while recursively
# building the XML tree. Simple skipping null... | @isDummy = true
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# Converts the XML fragment to string
#
# `options.pretty` pretty prints the result
# `options.indent` indentation for pretty print
# `options.offset` how many indentations to add to every line for pretty pri... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDummy.coffee | MIT | 61c7428475fe9ffc02b63662b59f87749fe3125f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/61c7428475fe9ffc02b63662b59f87749fe3125f/src/XMLDummy.coffee | 1 | 31 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data',
get: () -> @value
... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLCharacterData.coffee | 1 | 43 | ||
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Ob... | var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a character data node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent);
this.value = '';... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLCharacterData.coffee | 1 | 43 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a character data node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructo... | XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data',
get: () -> @value
... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLCharacterData.coffee | 1 | 43 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data',
get: () -> @value
... | get: () -> @value
set: (value) -> @value = value or ''
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# DOM level 1 functions to be implemented later
substringData: (offset, count) -> throw new Error "This DOM method is not implemented." + @debugInfo()
appendData: (arg) ... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLCharacterData.coffee | 1 | 43 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data',
get: () -> @value
... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 731c0e0c4226598187e6577969b815a22663d695 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/731c0e0c4226598187e6577969b815a22663d695/src/XMLCharacterData.coffee | 1 | 36 | ||
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Ob... | var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a character data node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent);
this.value = '';... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 731c0e0c4226598187e6577969b815a22663d695 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/731c0e0c4226598187e6577969b815a22663d695/src/XMLCharacterData.coffee | 1 | 36 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a character data node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructo... | XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data',
get: () -> @value
... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 731c0e0c4226598187e6577969b815a22663d695 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/731c0e0c4226598187e6577969b815a22663d695/src/XMLCharacterData.coffee | 1 | 36 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a character data node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data',
get: () -> @value
... | # DOM level 3
Object.defineProperty @::, 'textContent',
get: () -> @data
set: (value) -> @value = value or ''
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# DOM level 1 functions to be implemented later
substringData: (offset, count) -> throw new Error "This DOM me... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 731c0e0c4226598187e6577969b815a22663d695 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/731c0e0c4226598187e6577969b815a22663d695/src/XMLCharacterData.coffee | 1 | 36 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data', get: () -> @value
Object.defin... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 51b902d6945014c3d4cf4f0b62997965c2c6781f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLCharacterData.coffee | 1 | 34 | ||
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.def... | var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent);
this.value = '';
}
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 51b902d6945014c3d4cf4f0b62997965c2c6781f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLCharacterData.coffee | 1 | 34 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent... | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data', get: () -> @value
Object.defin... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 51b902d6945014c3d4cf4f0b62997965c2c6781f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLCharacterData.coffee | 1 | 34 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data', get: () -> @value
Object.defin... | # DOM level 3
Object.defineProperty @::, 'textContent',
get: () -> @data
set: (value) -> @value = value
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# DOM level 1 functions to be implemented later
substringData: (offset, count) -> throw new Error "This DOM method i... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 51b902d6945014c3d4cf4f0b62997965c2c6781f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLCharacterData.coffee | 1 | 34 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data', get: () -> @value
Object.defin... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 68552eda87d08b71507e70e032d7619b46096fe3 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLCharacterData.coffee | 1 | 29 | ||
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.def... | var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent);
this.value = '';
}
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 68552eda87d08b71507e70e032d7619b46096fe3 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLCharacterData.coffee | 1 | 29 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = (function() {
class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent... | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @::, 'data', get: () -> @value
Object.defin... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 68552eda87d08b71507e70e032d7619b46096fe3 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLCharacterData.coffee | 1 | 29 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1 | Object.defineProperty @::, 'data', get: () -> @value
Object.defineProperty @::, 'length', get: () -> @value.length
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# DOM level 1 functions to be implemented later
substringData: (offset, count) -> throw new Error "This DOM metho... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 68552eda87d08b71507e70e032d7619b46096fe3 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLCharacterData.coffee | 1 | 29 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @, 'data', get: () -> @value
Object.d... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLCharacterData.coffee | 1 | 29 | ||
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object... | var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent);
this.value = '';
// DOM level 1
Object.d... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLCharacterData.coffee | 1 | 29 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent... | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1
Object.defineProperty @, 'data', get: () -> @value
Object.d... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLCharacterData.coffee | 1 | 29 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
@value = ''
# DOM level 1 | Object.defineProperty @, 'data', get: () -> @value
Object.defineProperty @, 'length', get: () -> @value.length
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# DOM level 1 functions to be implemented later
substringData: (offset, count) -> throw new Error "This DOM method ... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLCharacterData.coffee | 1 | 29 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:raw_corpus | raw_corpus | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
# DOM level 1
Object.defineProperty @, 'data', get: () -> @value
Object.defineProperty @, ... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLCharacterData.coffee | 1 | 27 | ||
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
# DOM level 1
Object.defineProperty @... | var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent);
// DOM level 1
Object.defineProperty(this, '... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLCharacterData.coffee | 1 | 27 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLCharacterData, XMLNode;
XMLNode = require('./XMLNode');
// Represents a CDATA node
module.exports = XMLCharacterData = class XMLCharacterData extends XMLNode {
// Initializes a new instance of `XMLCharacterData`
constructor(parent) {
super(parent... | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
# DOM level 1
Object.defineProperty @, 'data', get: () -> @value
Object.defineProperty @, ... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLCharacterData.coffee | 1 | 27 |
oozcitak/xmlbuilder-js:src/XMLCharacterData.coffee:1:completion | completion | XMLNode = require './XMLNode'
# Represents a CDATA node
module.exports = class XMLCharacterData extends XMLNode
# Initializes a new instance of `XMLCharacterData`
#
constructor: (parent) ->
super parent
# DOM level 1
Object.defineProperty @, 'data', get: () -> @value | Object.defineProperty @, 'length', get: () -> @value.length
# Creates and returns a deep clone of `this`
clone: () ->
Object.create @
# DOM level 1 functions to be implemented later
substringData: (offset, count) -> throw new Error "This DOM method is not implemented." + @debugInfo()
appendData: (arg)... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLCharacterData.coffee | MIT | b3f243ffbeb47486162b212d976fe7e97918e6dc | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLCharacterData.coffee | 1 | 27 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2018 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:completion | completion | ###
# Copyright (c) 2013-2018 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | $scope.dashboardName = $stateParams.dashboardName
$scope.pageViewsOptions =
x_accessor: 'date'
y_accessor: 'pageViews'
mouseover: (d, i) ->
d.pageViews + ' page view' + (if d.pageViews == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm')
$scope.visitsOpti... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:raw_corpus | raw_corpus | $scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
axis:
x:
type: 'category'
$scope.showVisitors = false
$scope.selectedTimespan = 'day'
$sc... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 44 | 87 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
axis:
x:
type: 'category'
$scope.showVisi... | $scope.viewsPerPageOptions = {
data: {
type: 'bar',
names: {
pageViews: 'Page Views'
},
keys: {
value: ['pageViews']
}
},
axis: {
x: {
type: 'category'
}
}
};
$scope.showVisitors = false;
$scope.selectedTimespan = 'day';
$scope.toggleVisitors = function() {
ret... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 44 | 87 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$scope.viewsPerPageOptions = {
data: {
type: 'bar',
names: {
pageViews: 'Page Views'
},
keys: {
value: ['pageViews']
}
},
axis: {
x: {
type: 'category'
}
}
};
$scope.showVisitors = false;
$scope.selectedTimesp... | $scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
axis:
x:
type: 'category'
$scope.showVisitors = false
$scope.selectedTimespan = 'day'
$sc... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 44 | 87 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:completion | completion | $scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
axis:
x:
type: 'category'
$scope.showVisitors = false
$scope.selectedTimespan = 'day'
$sc... | if timeSpan.length == 1 then timeSpan.unshift 1
startDate = moment().subtract(timeSpan[0], timeSpan[1])
analyticsService.getUniqueVisitors($scope.dashboardId, startDate).then (visitors) ->
$scope.uniqueVisitorCount = visitors.length
$scope.uniqueVisitors = visitors
anal... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 44 | 87 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:raw_corpus | raw_corpus | $scope.widgets = [reducedWidgets]
analyticsService.getDataSourcesByName($scope.dashboardId, startDate).then (dataSources) ->
$scope.dataSources = dataSources
analyticsService.getPageViewsPerPage($scope.dashboardId, startDate).then (viewsPerPage) ->
categories = []
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 89 | 129 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:completion | completion | $scope.widgets = [reducedWidgets]
analyticsService.getDataSourcesByName($scope.dashboardId, startDate).then (dataSources) ->
$scope.dataSources = dataSources
analyticsService.getPageViewsPerPage($scope.dashboardId, startDate).then (viewsPerPage) ->
categories = []
... | $scope.initialize = ->
q = dashboardService.getDashboard $scope.dashboardName
q.then (dashboard) ->
$scope.dashboard = dashboard
$scope.dashboardId = dashboard._id
$scope.createdDate = '?'
$scope.lastModifiedDate = moment(dashboard.date).format('MM/DD HH... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 89 | 129 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:4:raw_corpus | raw_corpus | q.catch (error) ->
switch error.status
when 401
$scope.login(true).then ->
$scope.initialize()
return
when 403
$scope.dashboardEditors = error.data.data.editors
$scope.dash... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 131 | 166 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
q.catch (error) ->
switch error.status
when 401
$scope.login(true).then ->
$scope.initialize()
return
when 403
$scope.dashboardEditors ... | q.catch(function(error) {
switch (error.status) {
case 401:
$scope.login(true).then(function() {
return $scope.initialize();
});
break;
case 403:
$scope.dashboardEditors = error.data.data.editors;
$scope.dashboardName = $scope.dashboardName;
return $uibModal.open({
... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 131 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
q.catch(function(error) {
switch (error.status) {
case 401:
$scope.login(true).then(function() {
return $scope.initialize();
});
break;
case 403:
$scope.dashboardEditors = error.data.data.editors;
$scope.dashboardName... | q.catch (error) ->
switch error.status
when 401
$scope.login(true).then ->
$scope.initialize()
return
when 403
$scope.dashboardEditors = error.data.data.editors
$scope.dash... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 131 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:4:completion | completion | q.catch (error) ->
switch error.status
when 401
$scope.login(true).then ->
$scope.initialize()
return
when 403
$scope.dashboardEditors = error.data.data.editors
$scope.dash... | $uibModal.open {
templateUrl: '/partials/404.html'
scope: $scope
controller: 'GenericErrorModalController'
backdrop: 'static'
keyboard: false
}
else
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 131 | 166 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 6cc73f21bed8092b3c29d359b22c6dca8fe66bb5 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6cc73f21bed8092b3c29d359b22c6dca8fe66bb5/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 6cc73f21bed8092b3c29d359b22c6dca8fe66bb5 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6cc73f21bed8092b3c29d359b22c6dca8fe66bb5/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 6cc73f21bed8092b3c29d359b22c6dca8fe66bb5 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6cc73f21bed8092b3c29d359b22c6dca8fe66bb5/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | $scope.dashboardName = $stateParams.dashboardName
$scope.pageViewsOptions =
x_accessor: 'date'
y_accessor: 'pageViews'
mouseover: (d, i) ->
d.pageViews + ' page view' + (if d.pageViews == 1 then '' else 's') + ' | ' + moment(d.date).format('MMM Do HH:mm')
$scope.visitsOpti... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 6cc73f21bed8092b3c29d359b22c6dca8fe66bb5 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/6cc73f21bed8092b3c29d359b22c6dca8fe66bb5/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 42 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | $scope.dashboard = dashboard
$scope.dashboardId = dashboard._id
$scope.createdDate = '?'
$scope.lastModifiedDate = moment(dashboard.date).format('MM/DD HH:mm:ss')
$scope.longModifiedDate = moment(dashboard.date).format('MM/DD/YYYY HH:mm:ss')
$scope.pageViewsOptions =
x_accessor: 'date'
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:raw_corpus | raw_corpus | $scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 84 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
... | $scope.browserOptions = {
data: {
type: 'pie'
}
};
$scope.widgetOptions = {
data: {
type: 'pie'
}
};
$scope.viewsPerPageOptions = {
data: {
type: 'bar',
names: {
pageViews: 'Page Views'
},
keys: {
value: ['pageViews']
}
},
axis: {
x: {
type: 'category'
... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$scope.browserOptions = {
data: {
type: 'pie'
}
};
$scope.widgetOptions = {
data: {
type: 'pie'
}
};
$scope.viewsPerPageOptions = {
data: {
type: 'bar',
names: {
pageViews: 'Page Views'
},
keys: {
value: ['pageViews']... | $scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:completion | completion | $scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
... | $scope.toggleVisitors = ->
$scope.showVisitors = not $scope.showVisitors
# Analytics relative to a startDate
$scope.loadTimeseriesData = ->
return unless dashboard.visits > 0
timeSpan = $scope.selectedTimespan.split('_')
if timeSpan.length == 1 then timeSpan.unshift 1
s... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 84 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:raw_corpus | raw_corpus | $scope.browsers = [reducedBrowsers]
analyticsService.getWidgets($scope.dashboardId, startDate).then (widgets) ->
$scope.widgetOptions.data.keys = { value: _.pluck widgets, 'widget' }
reducedWidgets = _.reduce widgets, (result, widget) ->
result[widget.widget] = widget.wi... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 86 | 121 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:completion | completion | $scope.browsers = [reducedBrowsers]
analyticsService.getWidgets($scope.dashboardId, startDate).then (widgets) ->
$scope.widgetOptions.data.keys = { value: _.pluck widgets, 'widget' }
reducedWidgets = _.reduce widgets, (result, widget) ->
result[widget.widget] = widget.wi... | categories.push('Page ' + (page.page + 1))
$scope.viewsPerPage = viewsPerPage
$scope.viewsPerPageOptions.axis.x.categories = categories
analyticsService.getPageViewsOverTime($scope.dashboardId, startDate).then (pageViews) ->
$scope.pageViews = pageViews
analyticsSer... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | b56e43a76db5194d1381575b1f85b8905693799e | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/b56e43a76db5194d1381575b1f85b8905693799e/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 86 | 121 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:raw_corpus | raw_corpus | $scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | e4379afd234f2ba5b4c121b8a51e8da38599b374 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/e4379afd234f2ba5b4c121b8a51e8da38599b374/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 80 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
$scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
... | $scope.browserOptions = {
data: {
type: 'pie'
}
};
$scope.widgetOptions = {
data: {
type: 'pie'
}
};
$scope.viewsPerPageOptions = {
data: {
type: 'bar',
names: {
pageViews: 'Page Views'
},
keys: {
value: ['pageViews']
}
},
axis: {
x: {
type: 'category'
... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | e4379afd234f2ba5b4c121b8a51e8da38599b374 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/e4379afd234f2ba5b4c121b8a51e8da38599b374/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 80 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
$scope.browserOptions = {
data: {
type: 'pie'
}
};
$scope.widgetOptions = {
data: {
type: 'pie'
}
};
$scope.viewsPerPageOptions = {
data: {
type: 'bar',
names: {
pageViews: 'Page Views'
},
keys: {
value: ['pageViews']... | $scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | e4379afd234f2ba5b4c121b8a51e8da38599b374 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/e4379afd234f2ba5b4c121b8a51e8da38599b374/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 80 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:2:completion | completion | $scope.browserOptions =
data:
type: 'pie'
$scope.widgetOptions =
data:
type: 'pie'
$scope.viewsPerPageOptions =
data:
type: 'bar'
names:
pageViews: 'Page Views'
keys:
value: ['pageViews']
... | $scope.showVisitors = false
$scope.selectedTimespan = 'day'
$scope.toggleVisitors = ->
$scope.showVisitors = not $scope.showVisitors
# Analytics over the lifetime of the dashboard
$scope.loadLifetimeData = ->
return unless dashboard.visits > 0
analyticsService.getUniqueVisitor... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | e4379afd234f2ba5b4c121b8a51e8da38599b374 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/e4379afd234f2ba5b4c121b8a51e8da38599b374/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 42 | 80 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:raw_corpus | raw_corpus | $scope.browsers = [reducedBrowsers]
analyticsService.getWidgets($scope.dashboardId).then (widgets) ->
$scope.widgetOptions.data.keys = { value: _.pluck widgets, 'widget' }
reducedWidgets = _.reduce widgets, (result, widget) ->
result[widget.widget] = widget.widgetViews
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | e4379afd234f2ba5b4c121b8a51e8da38599b374 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/e4379afd234f2ba5b4c121b8a51e8da38599b374/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 82 | 124 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:completion | completion | $scope.browsers = [reducedBrowsers]
analyticsService.getWidgets($scope.dashboardId).then (widgets) ->
$scope.widgetOptions.data.keys = { value: _.pluck widgets, 'widget' }
reducedWidgets = _.reduce widgets, (result, widget) ->
result[widget.widget] = widget.widgetViews
... | # Analytics relative to a startDate
$scope.loadTimeseriesData = ->
return unless dashboard.visits > 0
timeSpan = $scope.selectedTimespan.split('_')
if timeSpan.length == 1 then timeSpan.unshift 1
startDate = moment().subtract(timeSpan[0], timeSpan[1])
analyticsService.getPa... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | e4379afd234f2ba5b4c121b8a51e8da38599b374 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/e4379afd234f2ba5b4c121b8a51e8da38599b374/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 82 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:raw_corpus | raw_corpus | $scope.browsers = [reducedBrowsers]
analyticsService.getWidgets($scope.dashboardId).then (widgets) ->
$scope.widgetOptions.data.keys = { value: _.pluck widgets, 'widget' }
reducedWidgets = _.reduce widgets, (result, widget) ->
result[widget.widget] = widget.widgetViews
... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | fb283092f9ecd2432be6f510f370cc98ded05e31 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/fb283092f9ecd2432be6f510f370cc98ded05e31/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 82 | 124 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:3:completion | completion | $scope.browsers = [reducedBrowsers]
analyticsService.getWidgets($scope.dashboardId).then (widgets) ->
$scope.widgetOptions.data.keys = { value: _.pluck widgets, 'widget' }
reducedWidgets = _.reduce widgets, (result, widget) ->
result[widget.widget] = widget.widgetViews
... | # Analytics relative to a startDate
$scope.loadTimeseriesData = ->
return unless dashboard.visits > 0
timeSpan = $scope.selectedTimespan.split('_')
if timeSpan.length == 1 then timeSpan.unshift 1
startDate = moment().subtract(timeSpan[0], timeSpan[1])
analyticsService.getPa... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | fb283092f9ecd2432be6f510f370cc98ded05e31 | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/fb283092f9ecd2432be6f510f370cc98ded05e31/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 82 | 124 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:raw_corpus | raw_corpus | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 | ||
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licens... | /*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/mit-license.php
*
* Unless required by applica... | CoffeeScript | JavaScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
/*
* Copyright (c) 2013-2015 the original author or authors.
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/li... | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | JavaScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 |
ExpediaGroup/cyclotron:cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee:1:completion | completion | ###
# Copyright (c) 2013-2015 the original author or authors.
#
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.opensource.org/licenses/mit-license.php
#
# Unless required by applicable law ... | $scope.dashboard = dashboard
$scope.dashboardId = dashboard._id
$scope.createdDate = '?'
$scope.lastModifiedDate = moment(dashboard.date).format("MM/DD HH:mm:ss")
$scope.longModifiedDate = moment(dashboard.date).format("MM/DD/YYYY HH:mm:ss")
$scope.pageViewsOptions =
x_accessor: 'date'
... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | MIT | 14b0e411415be801f94fe13ea6f63d5ad957c2ed | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/14b0e411415be801f94fe13ea6f63d5ad957c2ed/cyclotron-site/app/scripts/mgmt/controller.dashboardAnalytics.coffee | 1 | 40 |
gss/engine:src/types/Gradient.coffee:1:raw_corpus | raw_corpus | Command = require('../Command')
class Gradient extends Command
type: 'Gradient'
constructor: (obj) ->
switch typeof obj
when 'object'
if Gradient[obj[0]]
return obj
@define
'linear-gradient': ->
'radial-gradient': ->
'repeating-linear-gradient': ->
'repeating-radial-... | CoffeeScript | gss/engine | src/types/Gradient.coffee | MIT | e0d31eda3ebf8554204221731fbcfaa35d711a39 | 2,854 | https://github.com/gss/engine/blob/e0d31eda3ebf8554204221731fbcfaa35d711a39/src/types/Gradient.coffee | 1 | 18 | ||
gss/engine:src/types/Gradient.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Command = require('../Command')
class Gradient extends Command
type: 'Gradient'
constructor: (obj) ->
switch typeof obj
when 'object'
if Gradient[obj[0]]
return obj
@define
'linear-gradient': ->
'radial-gradient': ->
... | var Command, Gradient;
Command = require('../Command');
Gradient = (function() {
class Gradient extends Command {
constructor(obj) {
switch (typeof obj) {
case 'object':
if (Gradient[obj[0]]) {
return obj;
}
}
}
};
Gradient.prototype.type = 'Gradient... | CoffeeScript | JavaScript | gss/engine | src/types/Gradient.coffee | MIT | e0d31eda3ebf8554204221731fbcfaa35d711a39 | 2,854 | https://github.com/gss/engine/blob/e0d31eda3ebf8554204221731fbcfaa35d711a39/src/types/Gradient.coffee | 1 | 18 |
gss/engine:src/types/Gradient.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Command, Gradient;
Command = require('../Command');
Gradient = (function() {
class Gradient extends Command {
constructor(obj) {
switch (typeof obj) {
case 'object':
if (Gradient[obj[0]]) {
return obj;
}
... | Command = require('../Command')
class Gradient extends Command
type: 'Gradient'
constructor: (obj) ->
switch typeof obj
when 'object'
if Gradient[obj[0]]
return obj
@define
'linear-gradient': ->
'radial-gradient': ->
'repeating-linear-gradient': ->
'repeating-radial-... | JavaScript | CoffeeScript | gss/engine | src/types/Gradient.coffee | MIT | e0d31eda3ebf8554204221731fbcfaa35d711a39 | 2,854 | https://github.com/gss/engine/blob/e0d31eda3ebf8554204221731fbcfaa35d711a39/src/types/Gradient.coffee | 1 | 18 |
gss/engine:src/types/Gradient.coffee:1:completion | completion | Command = require('../Command')
class Gradient extends Command
type: 'Gradient'
constructor: (obj) ->
switch typeof obj
when 'object'
if Gradient[obj[0]] | return obj
@define
'linear-gradient': ->
'radial-gradient': ->
'repeating-linear-gradient': ->
'repeating-radial-gradient': ->
module.exports = Gradient | CoffeeScript | CoffeeScript | gss/engine | src/types/Gradient.coffee | MIT | e0d31eda3ebf8554204221731fbcfaa35d711a39 | 2,854 | https://github.com/gss/engine/blob/e0d31eda3ebf8554204221731fbcfaa35d711a39/src/types/Gradient.coffee | 1 | 18 |
technoweenie/coffee-resque:test/connection_key_test.coffee:1:raw_corpus | raw_corpus | require './helper'
conn = Resque.connect()
assert.equal 'resque:foo:bar', conn.key('foo', 'bar')
conn.end()
conn = resque namespace: "test"
assert.equal 'test:foo:bar', conn.key('foo', 'bar')
conn.end()
process.on 'exit', ->
console.log '.' | CoffeeScript | technoweenie/coffee-resque | test/connection_key_test.coffee | MIT | cddec8828bb8bafcddb6b494651578e0ef1e5323 | 542 | https://github.com/technoweenie/coffee-resque/blob/cddec8828bb8bafcddb6b494651578e0ef1e5323/test/connection_key_test.coffee | 1 | 11 | ||
technoweenie/coffee-resque:test/connection_key_test.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
require './helper'
conn = Resque.connect()
assert.equal 'resque:foo:bar', conn.key('foo', 'bar')
conn.end()
conn = resque namespace: "test"
assert.equal 'test:foo:bar', conn.key('foo', 'bar')
conn.end()
process.on 'exit', ->
console.log '.'
``` | var conn;
require('./helper');
conn = Resque.connect();
assert.equal('resque:foo:bar', conn.key('foo', 'bar'));
conn.end();
conn = resque({
namespace: "test"
});
assert.equal('test:foo:bar', conn.key('foo', 'bar'));
conn.end();
process.on('exit', function() {
return console.log('.');
}); | CoffeeScript | JavaScript | technoweenie/coffee-resque | test/connection_key_test.coffee | MIT | cddec8828bb8bafcddb6b494651578e0ef1e5323 | 542 | https://github.com/technoweenie/coffee-resque/blob/cddec8828bb8bafcddb6b494651578e0ef1e5323/test/connection_key_test.coffee | 1 | 11 |
technoweenie/coffee-resque:test/connection_key_test.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var conn;
require('./helper');
conn = Resque.connect();
assert.equal('resque:foo:bar', conn.key('foo', 'bar'));
conn.end();
conn = resque({
namespace: "test"
});
assert.equal('test:foo:bar', conn.key('foo', 'bar'));
conn.end();
process.on('exit', function... | require './helper'
conn = Resque.connect()
assert.equal 'resque:foo:bar', conn.key('foo', 'bar')
conn.end()
conn = resque namespace: "test"
assert.equal 'test:foo:bar', conn.key('foo', 'bar')
conn.end()
process.on 'exit', ->
console.log '.' | JavaScript | CoffeeScript | technoweenie/coffee-resque | test/connection_key_test.coffee | MIT | cddec8828bb8bafcddb6b494651578e0ef1e5323 | 542 | https://github.com/technoweenie/coffee-resque/blob/cddec8828bb8bafcddb6b494651578e0ef1e5323/test/connection_key_test.coffee | 1 | 11 |
technoweenie/coffee-resque:test/connection_key_test.coffee:1:completion | completion | require './helper'
conn = Resque.connect()
assert.equal 'resque:foo:bar', conn.key('foo', 'bar')
conn.end() | conn = resque namespace: "test"
assert.equal 'test:foo:bar', conn.key('foo', 'bar')
conn.end()
process.on 'exit', ->
console.log '.' | CoffeeScript | CoffeeScript | technoweenie/coffee-resque | test/connection_key_test.coffee | MIT | cddec8828bb8bafcddb6b494651578e0ef1e5323 | 542 | https://github.com/technoweenie/coffee-resque/blob/cddec8828bb8bafcddb6b494651578e0ef1e5323/test/connection_key_test.coffee | 1 | 11 |
Pagedraw/pagedraw:src/frontend/disable-backspace-backbutton.coffee:1:raw_corpus | raw_corpus | _l = require 'lodash'
config = require '../config'
# prevent user backspace from hitting the back button
# http://stackoverflow.com/a/2768256
document.addEventListener 'keydown', (evt) ->
if evt.keyCode == 8 # backspace
if config.shadowDomTheEditor
# I *believe* using _l.first(evt.composedPa... | CoffeeScript | Pagedraw/pagedraw | src/frontend/disable-backspace-backbutton.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/disable-backspace-backbutton.coffee | 1 | 32 | ||
Pagedraw/pagedraw:src/frontend/disable-backspace-backbutton.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_l = require 'lodash'
config = require '../config'
# prevent user backspace from hitting the back button
# http://stackoverflow.com/a/2768256
document.addEventListener 'keydown', (evt) ->
if evt.keyCode == 8 # backspace
if config.shadowDomTheEdito... | var _l, config;
_l = require('lodash');
config = require('../config');
// prevent user backspace from hitting the back button
// http://stackoverflow.com/a/2768256
document.addEventListener('keydown', function(evt) {
var d, ref;
if (evt.keyCode === 8) { // backspace
if (config.shadowDomTheEditor) {
// ... | CoffeeScript | JavaScript | Pagedraw/pagedraw | src/frontend/disable-backspace-backbutton.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/disable-backspace-backbutton.coffee | 1 | 32 |
Pagedraw/pagedraw:src/frontend/disable-backspace-backbutton.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var _l, config;
_l = require('lodash');
config = require('../config');
// prevent user backspace from hitting the back button
// http://stackoverflow.com/a/2768256
document.addEventListener('keydown', function(evt) {
var d, ref;
if (evt.keyCode === 8) { // b... | _l = require 'lodash'
config = require '../config'
# prevent user backspace from hitting the back button
# http://stackoverflow.com/a/2768256
document.addEventListener 'keydown', (evt) ->
if evt.keyCode == 8 # backspace
if config.shadowDomTheEditor
# I *believe* using _l.first(evt.composedPa... | JavaScript | CoffeeScript | Pagedraw/pagedraw | src/frontend/disable-backspace-backbutton.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/disable-backspace-backbutton.coffee | 1 | 32 |
Pagedraw/pagedraw:src/frontend/disable-backspace-backbutton.coffee:1:completion | completion | _l = require 'lodash'
config = require '../config'
# prevent user backspace from hitting the back button
# http://stackoverflow.com/a/2768256
document.addEventListener 'keydown', (evt) ->
if evt.keyCode == 8 # backspace
if config.shadowDomTheEditor
# I *believe* using _l.first(evt.composedPa... | # ignore backspaces on input elements
return if d.tagName.toUpperCase() == 'INPUT' and
d.type.toUpperCase() in [
'TEXT', 'PASSWORD','FILE', 'SEARCH',
'EMAIL', 'NUMBER', 'DATE', 'TEXTAREA'
] and
not (d.readOnly or d.disabled)
# ignore on tex... | CoffeeScript | CoffeeScript | Pagedraw/pagedraw | src/frontend/disable-backspace-backbutton.coffee | MIT | aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e | 3,558 | https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/disable-backspace-backbutton.coffee | 1 | 32 |
cdglabs/apparatus:src/Evaluator/evaluateTimeInSecs.coffee:1:raw_corpus | raw_corpus | timeout = null
periodMillis = 33
module.exports = now = () ->
theNow = Date.now()
if not timeout
timeout = window.setTimeout(
() ->
timeout = null
Apparatus.refresh() # HACK: calling Apparatus seems funky here.
, periodMillis)
return theNow / 1000 | CoffeeScript | cdglabs/apparatus | src/Evaluator/evaluateTimeInSecs.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Evaluator/evaluateTimeInSecs.coffee | 1 | 14 | ||
cdglabs/apparatus:src/Evaluator/evaluateTimeInSecs.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
timeout = null
periodMillis = 33
module.exports = now = () ->
theNow = Date.now()
if not timeout
timeout = window.setTimeout(
() ->
timeout = null
Apparatus.refresh() # HACK: calling Apparatus seems funky here.
, periodMilli... | var now, periodMillis, timeout;
timeout = null;
periodMillis = 33;
module.exports = now = function() {
var theNow;
theNow = Date.now();
if (!timeout) {
timeout = window.setTimeout(function() {
timeout = null;
return Apparatus.refresh(); // HACK: calling Apparatus seems funky here.
}, period... | CoffeeScript | JavaScript | cdglabs/apparatus | src/Evaluator/evaluateTimeInSecs.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Evaluator/evaluateTimeInSecs.coffee | 1 | 14 |
cdglabs/apparatus:src/Evaluator/evaluateTimeInSecs.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var now, periodMillis, timeout;
timeout = null;
periodMillis = 33;
module.exports = now = function() {
var theNow;
theNow = Date.now();
if (!timeout) {
timeout = window.setTimeout(function() {
timeout = null;
return Apparatus.refresh(); // ... | timeout = null
periodMillis = 33
module.exports = now = () ->
theNow = Date.now()
if not timeout
timeout = window.setTimeout(
() ->
timeout = null
Apparatus.refresh() # HACK: calling Apparatus seems funky here.
, periodMillis)
return theNow / 1000 | JavaScript | CoffeeScript | cdglabs/apparatus | src/Evaluator/evaluateTimeInSecs.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Evaluator/evaluateTimeInSecs.coffee | 1 | 14 |
cdglabs/apparatus:src/Evaluator/evaluateTimeInSecs.coffee:1:completion | completion | timeout = null
periodMillis = 33
module.exports = now = () ->
theNow = Date.now()
if not timeout | timeout = window.setTimeout(
() ->
timeout = null
Apparatus.refresh() # HACK: calling Apparatus seems funky here.
, periodMillis)
return theNow / 1000 | CoffeeScript | CoffeeScript | cdglabs/apparatus | src/Evaluator/evaluateTimeInSecs.coffee | MIT | 107e0c2db5a0adf0f1c3b49f16f7625cff4e523b | 1,052 | https://github.com/cdglabs/apparatus/blob/107e0c2db5a0adf0f1c3b49f16f7625cff4e523b/src/Evaluator/evaluateTimeInSecs.coffee | 1 | 14 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:2:raw_corpus | raw_corpus | module.exports = React.createClass
displayName: 'mention-menu'
mixins: [PureRenderMixin]
propTypes:
members: T.instanceOf(Immutable.List)
contacts: T.instanceOf(Immutable.List)
onSelect: T.func.isRequired
_teamId: T.string.isRequired
getInitialState: ->
index: 0
componentWillReceivePro... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 23 | 72 | ||
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = React.createClass
displayName: 'mention-menu'
mixins: [PureRenderMixin]
propTypes:
members: T.instanceOf(Immutable.List)
contacts: T.instanceOf(Immutable.List)
onSelect: T.func.isRequired
_teamId: T.string.isRequired
ge... | module.exports = React.createClass({
displayName: 'mention-menu',
mixins: [PureRenderMixin],
propTypes: {
members: T.instanceOf(Immutable.List),
contacts: T.instanceOf(Immutable.List),
onSelect: T.func.isRequired,
_teamId: T.string.isRequired
},
getInitialState: function() {
return {
... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 23 | 72 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
module.exports = React.createClass({
displayName: 'mention-menu',
mixins: [PureRenderMixin],
propTypes: {
members: T.instanceOf(Immutable.List),
contacts: T.instanceOf(Immutable.List),
onSelect: T.func.isRequired,
_teamId: T.string.isRequired
... | module.exports = React.createClass
displayName: 'mention-menu'
mixins: [PureRenderMixin]
propTypes:
members: T.instanceOf(Immutable.List)
contacts: T.instanceOf(Immutable.List)
onSelect: T.func.isRequired
_teamId: T.string.isRequired
getInitialState: ->
index: 0
componentWillReceivePro... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 23 | 72 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:2:completion | completion | module.exports = React.createClass
displayName: 'mention-menu'
mixins: [PureRenderMixin]
propTypes:
members: T.instanceOf(Immutable.List)
contacts: T.instanceOf(Immutable.List)
onSelect: T.func.isRequired
_teamId: T.string.isRequired
getInitialState: ->
index: 0
componentWillReceivePro... | componentDidUpdate: ->
root = @refs.root
@debouncedUpdateScroll(root)
updateScroll: (root) ->
eachHeight = 36
HrHeight = 9
totalHeight = eachHeight * 8
startY = eachHeight * @state.index
endY = startY + eachHeight
top = root.scrollTop
if @state.index > @props.members.size
s... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 23 | 72 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:3:raw_corpus | raw_corpus | getMergedList: ->
members = @props.members.sortBy (member) -> member.get('pinyin')
contacts = @props.contacts.sortBy (member) -> member.get('pinyin')
members.concat(contacts)
moveSelectUp: ->
if @getLength() < 2 then return
if @state.index is 0
@setState index: limit80(@getLength()) - 1
... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 73 | 122 | ||
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
getMergedList: ->
members = @props.members.sortBy (member) -> member.get('pinyin')
contacts = @props.contacts.sortBy (member) -> member.get('pinyin')
members.concat(contacts)
moveSelectUp: ->
if @getLength() < 2 then return
if @state.index ... | ({
getMergedList: function() {
var contacts, members;
members = this.props.members.sortBy(function(member) {
return member.get('pinyin');
});
contacts = this.props.contacts.sortBy(function(member) {
return member.get('pinyin');
});
return members.concat(contacts);
},
moveSelect... | CoffeeScript | JavaScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 73 | 122 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
getMergedList: function() {
var contacts, members;
members = this.props.members.sortBy(function(member) {
return member.get('pinyin');
});
contacts = this.props.contacts.sortBy(function(member) {
return member.get('pinyin');
});... | getMergedList: ->
members = @props.members.sortBy (member) -> member.get('pinyin')
contacts = @props.contacts.sortBy (member) -> member.get('pinyin')
members.concat(contacts)
moveSelectUp: ->
if @getLength() < 2 then return
if @state.index is 0
@setState index: limit80(@getLength()) - 1
... | JavaScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 73 | 122 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:3:completion | completion | getMergedList: ->
members = @props.members.sortBy (member) -> member.get('pinyin')
contacts = @props.contacts.sortBy (member) -> member.get('pinyin')
members.concat(contacts)
moveSelectUp: ->
if @getLength() < 2 then return
if @state.index is 0
@setState index: limit80(@getLength()) - 1
... | onItemClick: (member) ->
@props.onSelect member
onWindowKeydown: (event) ->
switch event.keyCode
when keyboard.up then @moveSelectUp()
when keyboard.down then @moveSelectDown()
when keyboard.enter then @selectCurrent()
when keyboard.tab then @selectCurrent()
onSelect: (index) ->
... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 73 | 122 |
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:4:raw_corpus | raw_corpus | # isMember = memberIds.contains(member.get('_id'))
# switch to native method for performance
isMember = memberIds.indexOf(member.get('_id')) >= 0
ContactName
contact: member
_teamId: @props._teamId
key: member.get('_id')
hover: @state.index is index
online: true... | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 123 | 147 | ||
jianliaoim/talk-os:talk-web/client/app/mention-menu.coffee:4:completion | completion | # isMember = memberIds.contains(member.get('_id'))
# switch to native method for performance
isMember = memberIds.indexOf(member.get('_id')) >= 0
ContactName
contact: member
_teamId: @props._teamId
key: member.get('_id')
hover: @state.index is index
online: true... | if (not isMember)
span className: 'muted hint flex-static', locale
render: ->
memberElements = @renderMembers()
pos = @props.members.size
if (@props.members.size > 0) and (@props.contacts.size > 0)
divider = hr key: 'divider', className: 'divider'
memberElements = memberElements[.... | CoffeeScript | CoffeeScript | jianliaoim/talk-os | talk-web/client/app/mention-menu.coffee | MIT | 2545c4497865779a55762e03963a39237df9046b | 2,703 | https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/app/mention-menu.coffee | 123 | 147 |
ExpediaGroup/cyclotron:cyclotron-site/test/karma-unit.conf.coffee:1:raw_corpus | raw_corpus | module.exports = (config) ->
config.set {
# base path, that will be used to resolve all patterns, eg. files, exclude
basePath: '../'
# frameworks to use
frameworks: [
'jasmine'
'jasmine-matchers'
]
preprocessors:
'test/**/*.coffe... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/karma-unit.conf.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/karma-unit.conf.coffee | 18 | 67 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/karma-unit.conf.coffee:1:completion | completion | module.exports = (config) ->
config.set {
# base path, that will be used to resolve all patterns, eg. files, exclude
basePath: '../'
# frameworks to use
frameworks: [
'jasmine'
'jasmine-matchers'
]
preprocessors:
'test/**/*.coffe... | # list of files to exclude
exclude: [
]
# test results reporter to use
# possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['nested', 'coverage']
# web server port
port: 9876
# enable / disable colors in the output (reporters ... | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/karma-unit.conf.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/karma-unit.conf.coffee | 18 | 67 |
ExpediaGroup/cyclotron:cyclotron-site/test/karma-unit.conf.coffee:2:raw_corpus | raw_corpus | # - Firefox
# - Opera
# - Safari (only Mac)
# - PhantomJS
# - IE (only Windows)
browsers: [
#'PhantomJS'
#'Firefox'
#'Chrome'
'ChromeHeadless'
]
# If browser does not capture in given timeout [ms], kill it
c... | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/karma-unit.conf.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/karma-unit.conf.coffee | 68 | 86 | ||
ExpediaGroup/cyclotron:cyclotron-site/test/karma-unit.conf.coffee:2:completion | completion | # - Firefox
# - Opera
# - Safari (only Mac)
# - PhantomJS
# - IE (only Windows)
browsers: [
#'PhantomJS'
#'Firefox'
#'Chrome' | 'ChromeHeadless'
]
# If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000
# Continuous Integration mode
# if true, it capture browsers, run tests and exit
singleRun: true
} | CoffeeScript | CoffeeScript | ExpediaGroup/cyclotron | cyclotron-site/test/karma-unit.conf.coffee | MIT | 0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab | 1,544 | https://github.com/ExpediaGroup/cyclotron/blob/0228db71d84a3138a9ffddb50d8f4f8ff37cc5ab/cyclotron-site/test/karma-unit.conf.coffee | 68 | 86 |
octoblu/meshblu:lib/MessageWebhook.coffee:1:raw_corpus | raw_corpus | _ = require 'lodash'
config = require '../config'
class MessageWebhook
@HTTP_SIGNATURE_OPTIONS:
keyId: 'meshblu-webhook-key'
key: config.privateKey
headers: [ 'date', 'X-MESHBLU-UUID' ]
constructor: (options, dependencies={}) ->
{@uuid, @options, @type} = options
{@request, @device} = dependen... | CoffeeScript | octoblu/meshblu | lib/MessageWebhook.coffee | MIT | 0b4a5f0233ed1ad2bd0447db99ef92ca89866069 | 815 | https://github.com/octoblu/meshblu/blob/0b4a5f0233ed1ad2bd0447db99ef92ca89866069/lib/MessageWebhook.coffee | 1 | 50 | ||
octoblu/meshblu:lib/MessageWebhook.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
_ = require 'lodash'
config = require '../config'
class MessageWebhook
@HTTP_SIGNATURE_OPTIONS:
keyId: 'meshblu-webhook-key'
key: config.privateKey
headers: [ 'date', 'X-MESHBLU-UUID' ]
constructor: (options, dependencies={}) ->
{@uuid, @opt... | var MessageWebhook, _, config;
_ = require('lodash');
config = require('../config');
MessageWebhook = (function() {
class MessageWebhook {
constructor(options, dependencies = {}) {
var Device;
this.generateAndForwardMeshbluCredentials = this.generateAndForwardMeshbluCredentials.bind(this);
th... | CoffeeScript | JavaScript | octoblu/meshblu | lib/MessageWebhook.coffee | MIT | 0b4a5f0233ed1ad2bd0447db99ef92ca89866069 | 815 | https://github.com/octoblu/meshblu/blob/0b4a5f0233ed1ad2bd0447db99ef92ca89866069/lib/MessageWebhook.coffee | 1 | 50 |
octoblu/meshblu:lib/MessageWebhook.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var MessageWebhook, _, config;
_ = require('lodash');
config = require('../config');
MessageWebhook = (function() {
class MessageWebhook {
constructor(options, dependencies = {}) {
var Device;
this.generateAndForwardMeshbluCredentials = this.ge... | _ = require 'lodash'
config = require '../config'
class MessageWebhook
@HTTP_SIGNATURE_OPTIONS:
keyId: 'meshblu-webhook-key'
key: config.privateKey
headers: [ 'date', 'X-MESHBLU-UUID' ]
constructor: (options, dependencies={}) ->
{@uuid, @options, @type} = options
{@request, @device} = dependen... | JavaScript | CoffeeScript | octoblu/meshblu | lib/MessageWebhook.coffee | MIT | 0b4a5f0233ed1ad2bd0447db99ef92ca89866069 | 815 | https://github.com/octoblu/meshblu/blob/0b4a5f0233ed1ad2bd0447db99ef92ca89866069/lib/MessageWebhook.coffee | 1 | 50 |
octoblu/meshblu:lib/MessageWebhook.coffee:1:completion | completion | _ = require 'lodash'
config = require '../config'
class MessageWebhook
@HTTP_SIGNATURE_OPTIONS:
keyId: 'meshblu-webhook-key'
key: config.privateKey
headers: [ 'date', 'X-MESHBLU-UUID' ]
constructor: (options, dependencies={}) ->
{@uuid, @options, @type} = options
{@request, @device} = dependen... | @doRequest options, message, callback
return
if @options.generateAndForwardMeshbluCredentials
@generateAndForwardMeshbluCredentials (error, token) =>
bearer = new Buffer("#{@uuid}:#{token}").toString('base64')
@doRequest auth: bearer: bearer, message, (error) =>
@removeToken(t... | CoffeeScript | CoffeeScript | octoblu/meshblu | lib/MessageWebhook.coffee | MIT | 0b4a5f0233ed1ad2bd0447db99ef92ca89866069 | 815 | https://github.com/octoblu/meshblu/blob/0b4a5f0233ed1ad2bd0447db99ef92ca89866069/lib/MessageWebhook.coffee | 1 | 50 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.