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/XMLElement.coffee:4:completion
completion
setIdAttributeNode: (idAttr, isId) -> throw new Error "This DOM method is not implemented." + @debugInfo()
# DOM Level 4 getElementsByTagName: (tagname) -> throw new Error "This DOM method is not implemented." + @debugInfo() getElementsByTagNameNS: (namespaceURI, localName) -> throw new Error "This DOM method is not implemented." + @debugInfo() getElementsByClassName: (classNames) -> throw new Error "This DOM method i...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
731c0e0c4226598187e6577969b815a22663d695
926
https://github.com/oozcitak/xmlbuilder-js/blob/731c0e0c4226598187e6577969b815a22663d695/src/XMLElement.coffee
159
165
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = (function() { class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes const...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = (function() { class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an obj...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
parent.rootObject = @ # set dtd name if parent.children for child in parent.children if child.type is NodeType.DocType child.name = @name break # DOM level 1 Object.defineProperty @::, 'tagName', get: () -> @name # Creates and returns a deep clone of `this`...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# clone child nodes clonedSelf.children = [] @children.forEach (child) -> clonedChild = child.clone() clonedChild.parent = clonedSelf clonedSelf.children.push clonedChild return clonedSelf # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attr...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# clone child nodes clonedSelf.children = [] @children.forEach (child) -> clonedChild = child.clone() clonedChild.parent = clonedSelf clonedSelf.children.push clonedChild return clonedSelf # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attr...
@attribs[name] = new XMLAttribute @, name, "" else if value? @attribs[name] = new XMLAttribute @, name, value return @ # Removes an attribute # # `name` attribute name removeAttribute: (name) -> # Also defined in DOM level 1 # removeAttribute(name) removes an attribute by name. ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:raw_corpus
raw_corpus
# 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 print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close em...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
108
145
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # 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 print # `options.newline` newline sequence for p...
// 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 print // `options.newline` newline sequence for pretty print // `options.allowEmpty` do not self close empty ele...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
108
145
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // 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 print // `options.newline` newline sequence for pretty pr...
# 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 print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close em...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
108
145
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:completion
completion
# 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 print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close em...
getAttributeNode: (name) -> if @attribs.hasOwnProperty(name) then @attribs[name] else null setAttributeNode: (newAttr) -> throw new Error "This DOM method is not implemented." + @debugInfo() removeAttributeNode: (oldAttr) -> throw new Error "This DOM method is not implemented." + @debugInfo() getElementsByTagName...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
51b902d6945014c3d4cf4f0b62997965c2c6781f
926
https://github.com/oozcitak/xmlbuilder-js/blob/51b902d6945014c3d4cf4f0b62997965c2c6781f/src/XMLElement.coffee
108
145
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = (function() { class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes const...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = (function() { class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an obj...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
# set dtd name if parent.children for child in parent.children if child.type is NodeType.DocType child.name = @name break # DOM level 1 Object.defineProperty @::, 'tagName', get: () -> @name # Creates and returns a deep clone of `this` # clone: () -> clone...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
clonedSelf.children = [] @children.forEach (child) -> clonedChild = child.clone() clonedChild.parent = clonedSelf clonedSelf.children.push clonedChild return clonedSelf # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> ...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
clonedSelf.children = [] @children.forEach (child) -> clonedChild = child.clone() clonedChild.parent = clonedSelf clonedSelf.children.push clonedChild return clonedSelf # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> ...
return @ # Removes an attribute # # `name` attribute name removeAttribute: (name) -> # Also defined in DOM level 1 # removeAttribute(name) removes an attribute by name. if not name? throw new Error "Missing attribute name. " + @debugInfo() name = getValue name if Array.isArray name ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:raw_corpus
raw_corpus
# `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close empty element tags toString: (options) -> ...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
108
138
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not ...
// `options.pretty` pretty prints the result // `options.indent` indentation for pretty print // `options.offset` how many indentations to add to every line for pretty print // `options.newline` newline sequence for pretty print // `options.allowEmpty` do not self close empty element tags ({ toString: function(option...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
108
138
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // `options.pretty` pretty prints the result // `options.indent` indentation for pretty print // `options.offset` how many indentations to add to every line for pretty print // `options.newline` newline sequence for pretty print // `options.allowEmpty` do not self ...
# `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close empty element tags toString: (options) -> ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
108
138
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:completion
completion
# `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close empty element tags toString: (options) -> ...
getAttribute: (name) -> if @attribs.hasOwnProperty(name) then @attribs[name].value else null setAttribute: (name, value) -> throw new Error "This DOM method is not implemented." + @debugInfo() getAttributeNode: (name) -> if @attribs.hasOwnProperty(name) then @attribs[name] else null setAttributeNode: (newAttr) ->...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
68552eda87d08b71507e70e032d7619b46096fe3
926
https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLElement.coffee
108
138
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
# set dtd name if parent.children for child in parent.children if child.type is NodeType.DocType child.name = @name break # DOM level 1 Object.defineProperty @, 'tagName', get: () -> @name # Creates and returns a deep clone of `this` # clone: () -> clo...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f6ad2df8c2551b47423405066312422d972aa32f
926
https://github.com/oozcitak/xmlbuilder-js/blob/f6ad2df8c2551b47423405066312422d972aa32f/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:raw_corpus
raw_corpus
# `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close empty element tags toString: (options) -> ...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
e89afa28c7d8b7154225931b62572edd95db2857
926
https://github.com/oozcitak/xmlbuilder-js/blob/e89afa28c7d8b7154225931b62572edd95db2857/src/XMLElement.coffee
108
129
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not ...
// `options.pretty` pretty prints the result // `options.indent` indentation for pretty print // `options.offset` how many indentations to add to every line for pretty print // `options.newline` newline sequence for pretty print // `options.allowEmpty` do not self close empty element tags ({ toString: function(option...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
e89afa28c7d8b7154225931b62572edd95db2857
926
https://github.com/oozcitak/xmlbuilder-js/blob/e89afa28c7d8b7154225931b62572edd95db2857/src/XMLElement.coffee
108
129
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // `options.pretty` pretty prints the result // `options.indent` indentation for pretty print // `options.offset` how many indentations to add to every line for pretty print // `options.newline` newline sequence for pretty print // `options.allowEmpty` do not self ...
# `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close empty element tags toString: (options) -> ...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
e89afa28c7d8b7154225931b62572edd95db2857
926
https://github.com/oozcitak/xmlbuilder-js/blob/e89afa28c7d8b7154225931b62572edd95db2857/src/XMLElement.coffee
108
129
oozcitak/xmlbuilder-js:src/XMLElement.coffee:3:completion
completion
# `options.pretty` pretty prints the result # `options.indent` indentation for pretty print # `options.offset` how many indentations to add to every line for pretty print # `options.newline` newline sequence for pretty print # `options.allowEmpty` do not self close empty element tags toString: (options) -> ...
a: (name, value) -> @attribute name, value # DOM Level 1 getAttribute: (name) -> throw new Error "This DOM method is not implemented." + @debugInfo() setAttribute: (name, value) -> throw new Error "This DOM method is not implemented." + @debugInfo() getAttributeNode: (name) -> throw new Error "This DOM method...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
e89afa28c7d8b7154225931b62572edd95db2857
926
https://github.com/oozcitak/xmlbuilder-js/blob/e89afa28c7d8b7154225931b62572edd95db2857/src/XMLElement.coffee
108
129
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b3f243ffbeb47486162b212d976fe7e97918e6dc
926
https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b3f243ffbeb47486162b212d976fe7e97918e6dc
926
https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b3f243ffbeb47486162b212d976fe7e97918e6dc
926
https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
# set dtd name if parent.children for child in parent.children if child.type is NodeType.DocType child.name = @name break # DOM level 1 Object.defineProperty @, 'tagName', get: () -> @name # Creates and returns a deep clone of `this` # clone: () -> clo...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b3f243ffbeb47486162b212d976fe7e97918e6dc
926
https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
clonedSelf.children = [] @children.forEach (child) -> clonedChild = child.clone() clonedChild.parent = clonedSelf clonedSelf.children.push clonedChild return clonedSelf # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> ...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b3f243ffbeb47486162b212d976fe7e97918e6dc
926
https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
clonedSelf.children = [] @children.forEach (child) -> clonedChild = child.clone() clonedChild.parent = clonedSelf clonedSelf.children.push clonedChild return clonedSelf # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> ...
return @ # Removes an attribute # # `name` attribute name removeAttribute: (name) -> # Also defined in DOM level 1 # removeAttribute(name) removes an attribute by name. if not name? throw new Error "Missing attribute name. " + @debugInfo() name = getValue name if Array.isArray name ...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b3f243ffbeb47486162b212d976fe7e97918e6dc
926
https://github.com/oozcitak/xmlbuilder-js/blob/b3f243ffbeb47486162b212d976fe7e97918e6dc/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
parent.rootObject = @ # Creates and returns a deep clone of `this` # clone: () -> clonedSelf = Object.create @ # remove document element if clonedSelf.isRoot clonedSelf.documentObject = null # clone attributes clonedSelf.attributes = {} for own attName, att of @attributes c...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName,...
// Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { // expand if object for (attName in name) ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(na...
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
if not name? throw new Error "Missing attribute name. " + @debugInfo() name = getValue name if Array.isArray name # expand if array for attName in name delete @attributes[attName] else delete @attributes[name] return @ # Converts the XML fragment to string # # `option...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
2111c3b992121037c2f3ef01eeb56f8dc4a39976
926
https://github.com/oozcitak/xmlbuilder-js/blob/2111c3b992121037c2f3ef01eeb56f8dc4a39976/src/XMLElement.coffee
58
107
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
parent.rootObject = @ # Creates and returns a deep clone of `this` # clone: () -> clonedSelf = Object.create @ # remove document element if clonedSelf.isRoot clonedSelf.documentObject = null # clone attributes clonedSelf.attributes = {} for own attName, att of @attributes c...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d8de14769590b262e56b467df05db50855a0ad24
926
https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLElement.coffee
8
57
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
# Creates and returns a deep clone of `this` # clone: () -> clonedSelf = Object.create @ # remove document element if clonedSelf.isRoot clonedSelf.documentObject = null # clone attributes clonedSelf.attributes = {} for own attName, att of @attributes clonedSelf.attributes[attNa...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
57
106
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName,...
// Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { // expand if object for (attName in name) ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
57
106
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(na...
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
57
106
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
throw new Error "Missing attribute name. " + @debugInfo() name = getValue name if Array.isArray name # expand if array for attName in name delete @attributes[attName] else delete @attributes[name] return @ # Converts the XML fragment to string # # `options.pretty` pretty pr...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e
926
https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLElement.coffee
57
106
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
782540c408a8fdbe1a425f16f67644fbd9b60492
926
https://github.com/oozcitak/xmlbuilder-js/blob/782540c408a8fdbe1a425f16f67644fbd9b60492/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
782540c408a8fdbe1a425f16f67644fbd9b60492
926
https://github.com/oozcitak/xmlbuilder-js/blob/782540c408a8fdbe1a425f16f67644fbd9b60492/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
782540c408a8fdbe1a425f16f67644fbd9b60492
926
https://github.com/oozcitak/xmlbuilder-js/blob/782540c408a8fdbe1a425f16f67644fbd9b60492/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
# Creates and returns a deep clone of `this` # clone: () -> clonedSelf = Object.create @ # remove document element if clonedSelf.isRoot clonedSelf.documentObject = null # clone attributes clonedSelf.attributes = {} for own attName, att of @attributes clonedSelf.attributes[attNa...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
782540c408a8fdbe1a425f16f67644fbd9b60492
926
https://github.com/oozcitak/xmlbuilder-js/blob/782540c408a8fdbe1a425f16f67644fbd9b60492/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b6c2503daa774b02579fb8c98c31877ea24861a1
926
https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName,...
// Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { // expand if object for (attName in name) ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b6c2503daa774b02579fb8c98c31877ea24861a1
926
https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(na...
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b6c2503daa774b02579fb8c98c31877ea24861a1
926
https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
name = getValue name if Array.isArray name # expand if array for attName in name delete @attributes[attName] else delete @attributes[name] return @ # Converts the XML fragment to string # # `options.pretty` pretty prints the result # `options.indent` indentation for pretty pr...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
b6c2503daa774b02579fb8c98c31877ea24861a1
926
https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f066a3151d269e738ea37d87e5bf2470ef948b24
926
https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName,...
// Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { // expand if object for (attName in name) ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f066a3151d269e738ea37d87e5bf2470ef948b24
926
https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(na...
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f066a3151d269e738ea37d87e5bf2470ef948b24
926
https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
name = getValue name if Array.isArray name # expand if array for attName in name delete @attributes[attName] else delete @attributes[name] return @ # Converts the XML fragment to string # # `options.pretty` pretty prints the result # `options.indent` indentation for pretty pr...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
f066a3151d269e738ea37d87e5bf2470ef948b24
926
https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:raw_corpus
raw_corpus
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attribut...
var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/value pairs of attributes constructor(parent, name, attri...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var XMLElement, hasProp = {}.hasOwnProperty; module.exports = XMLElement = class XMLElement extends XMLNode { // Initializes a new instance of `XMLElement` // `parent` the parent node // `name` element name // `attributes` an object containing name/valu...
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:1:completion
completion
module.exports = class XMLElement extends XMLNode # Initializes a new instance of `XMLElement` # # `parent` the parent node # `name` element name # `attributes` an object containing name/value pairs of attributes constructor: (parent, name, attributes) -> super parent if not name? throw new...
# Creates and returns a deep clone of `this` # clone: () -> clonedSelf = Object.create @ # remove document element if clonedSelf.isRoot clonedSelf.documentObject = null # clone attributes clonedSelf.attributes = {} for own attName, att of @attributes clonedSelf.attributes[attNa...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
7
56
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName,...
// Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { // expand if object for (attName in name) ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(na...
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = getValue(name) if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
name = getValue name if Array.isArray name # expand if array for attName in name delete @attributes[attName] else delete @attributes[name] return @ # Converts the XML fragment to string # # `options.pretty` pretty prints the result # `options.indent` indentation for pretty pr...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
d970429a73c6b87e84f71426f63f920e29361b1e
926
https://github.com/oozcitak/xmlbuilder-js/blob/d970429a73c6b87e84f71426f63f920e29361b1e/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:raw_corpus
raw_corpus
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = name.valueOf() if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
ab0c6d3649828decfdd0c4b0e16021a3f300cc47
926
https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript # Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = name.valueOf() if name? if isObject name # expand if object for own attName, attValue of name @attribute attName,...
// Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = name.valueOf(); } if (isObject(name)) { // expand if object for (attName in name) ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
ab0c6d3649828decfdd0c4b0e16021a3f300cc47
926
https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript // Adds or modifies an attribute // `name` attribute name // `value` attribute value var hasProp = {}.hasOwnProperty; ({ attribute: function(name, value) { var attName, attValue; if (name != null) { name = name.valueOf(); } if (isObject(na...
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = name.valueOf() if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
ab0c6d3649828decfdd0c4b0e16021a3f300cc47
926
https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLElement.coffee
57
105
oozcitak/xmlbuilder-js:src/XMLElement.coffee:2:completion
completion
# Adds or modifies an attribute # # `name` attribute name # `value` attribute value attribute: (name, value) -> name = name.valueOf() if name? if isObject name # expand if object for own attName, attValue of name @attribute attName, attValue else value = value.apply() if isFunct...
name = name.valueOf() if Array.isArray name # expand if array for attName in name delete @attributes[attName] else delete @attributes[name] return @ # Converts the XML fragment to string # # `options.pretty` pretty prints the result # `options.indent` indentation for pretty p...
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
src/XMLElement.coffee
MIT
ab0c6d3649828decfdd0c4b0e16021a3f300cc47
926
https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLElement.coffee
57
105
jianliaoim/talk-os:talk-web/client/updater/prefs.coffee:1:raw_corpus
raw_corpus
exports.update = (store, prefsData) -> store .set 'prefs', prefsData .setIn ['user', 'preference'], prefsData
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/prefs.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/prefs.coffee
1
4
jianliaoim/talk-os:talk-web/client/updater/prefs.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript exports.update = (store, prefsData) -> store .set 'prefs', prefsData .setIn ['user', 'preference'], prefsData ```
exports.update = function(store, prefsData) { return store.set('prefs', prefsData).setIn(['user', 'preference'], prefsData); };
CoffeeScript
JavaScript
jianliaoim/talk-os
talk-web/client/updater/prefs.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/prefs.coffee
1
4
jianliaoim/talk-os:talk-web/client/updater/prefs.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript exports.update = function(store, prefsData) { return store.set('prefs', prefsData).setIn(['user', 'preference'], prefsData); }; ```
exports.update = (store, prefsData) -> store .set 'prefs', prefsData .setIn ['user', 'preference'], prefsData
JavaScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/prefs.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/prefs.coffee
1
4
jianliaoim/talk-os:talk-web/client/updater/prefs.coffee:1:completion
completion
exports.update = (store, prefsData) -> store
.set 'prefs', prefsData .setIn ['user', 'preference'], prefsData
CoffeeScript
CoffeeScript
jianliaoim/talk-os
talk-web/client/updater/prefs.coffee
MIT
2545c4497865779a55762e03963a39237df9046b
2,703
https://github.com/jianliaoim/talk-os/blob/2545c4497865779a55762e03963a39237df9046b/talk-web/client/updater/prefs.coffee
1
4
xhan/qqbot:plugins/chatlog.coffee:1:raw_corpus
raw_corpus
### default behavior: log chat logs to file @command top (count) (chat-lines): show group's chat ranks in (count) depends on recently (chat-lines) history. need configs: - ### module.exports = (content ,send, robot, message)-> "nothing"
CoffeeScript
xhan/qqbot
plugins/chatlog.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/plugins/chatlog.coffee
1
9
xhan/qqbot:plugins/chatlog.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### default behavior: log chat logs to file @command top (count) (chat-lines): show group's chat ranks in (count) depends on recently (chat-lines) history. need configs: - ### module.exports = (content ,send, robot, message)-> "nothing" ```
/* default behavior: log chat logs to file @command top (count) (chat-lines): show group's chat ranks in (count) depends on recently (chat-lines) history. need configs: - */ module.exports = function(content, send, robot, message) { return "nothing"; };
CoffeeScript
JavaScript
xhan/qqbot
plugins/chatlog.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/plugins/chatlog.coffee
1
9
xhan/qqbot:plugins/chatlog.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* default behavior: log chat logs to file @command top (count) (chat-lines): show group's chat ranks in (count) depends on recently (chat-lines) history. need configs: - */ module.exports = function(content, send, robot, message) { return "nothing"; }; `...
### default behavior: log chat logs to file @command top (count) (chat-lines): show group's chat ranks in (count) depends on recently (chat-lines) history. need configs: - ### module.exports = (content ,send, robot, message)-> "nothing"
JavaScript
CoffeeScript
xhan/qqbot
plugins/chatlog.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/plugins/chatlog.coffee
1
9
xhan/qqbot:plugins/chatlog.coffee:1:completion
completion
### default behavior: log chat logs to file @command top (count) (chat-lines): show group's chat ranks in (count) depends on recently (chat-lines) history. need configs:
- ### module.exports = (content ,send, robot, message)-> "nothing"
CoffeeScript
CoffeeScript
xhan/qqbot
plugins/chatlog.coffee
MIT
f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0
1,435
https://github.com/xhan/qqbot/blob/f3b62a4a6e423cd85a7a2e06da5e5e51da940fe0/plugins/chatlog.coffee
1
9
oozcitak/xmlbuilder-js:test/guards/dtdnotation.coffee:1:raw_corpus
raw_corpus
suite 'DTDNotation Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().not() () -> xml('test').dtd().not('name', { invalid: "obj" }) ] results = [ "Missing DTD notation name. parent: <!DOCTYPE>" "Public or system identifiers are required for an external entit...
CoffeeScript
oozcitak/xmlbuilder-js
test/guards/dtdnotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdnotation.coffee
1
17
oozcitak/xmlbuilder-js:test/guards/dtdnotation.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript suite 'DTDNotation Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().not() () -> xml('test').dtd().not('name', { invalid: "obj" }) ] results = [ "Missing DTD notation name. parent: <!DOCTYPE>" "Public...
suite('DTDNotation Guards:', function() { return test('constructor', function() { var i, j, ref, results, results1, testCases; testCases = [ function() { return xml('test').dtd().not(); }, function() { return xml('test').dtd().not('name', { invalid: "obj" ...
CoffeeScript
JavaScript
oozcitak/xmlbuilder-js
test/guards/dtdnotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdnotation.coffee
1
17
oozcitak/xmlbuilder-js:test/guards/dtdnotation.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript suite('DTDNotation Guards:', function() { return test('constructor', function() { var i, j, ref, results, results1, testCases; testCases = [ function() { return xml('test').dtd().not(); }, function() { return xml('test')....
suite 'DTDNotation Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().not() () -> xml('test').dtd().not('name', { invalid: "obj" }) ] results = [ "Missing DTD notation name. parent: <!DOCTYPE>" "Public or system identifiers are required for an external entit...
JavaScript
CoffeeScript
oozcitak/xmlbuilder-js
test/guards/dtdnotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdnotation.coffee
1
17
oozcitak/xmlbuilder-js:test/guards/dtdnotation.coffee:1:completion
completion
suite 'DTDNotation Guards:', -> test 'constructor', -> testCases = [ () -> xml('test').dtd().not() () -> xml('test').dtd().not('name', { invalid: "obj" }) ] results = [
"Missing DTD notation name. parent: <!DOCTYPE>" "Public or system identifiers are required for an external entity. node: <name>, parent: <!DOCTYPE>" ] err( testCases[i] Error results[i] ) for i in [0..testCases.length-1]
CoffeeScript
CoffeeScript
oozcitak/xmlbuilder-js
test/guards/dtdnotation.coffee
MIT
ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1
926
https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/test/guards/dtdnotation.coffee
1
17
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:1:raw_corpus
raw_corpus
### This file is my best attempt to test that we're correctly not shipping down compileDoc with the editor. In core.coffee, we have the following lines: # PREVENT EVERYTHING BELOW FROM SHIPPING WITH THE EDITOR `if (!(process.env.REACT_APP_ENV === 'browser' && process.env.NODE_ENV === 'production')) {` The backticks ...
CoffeeScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
1
50
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript ### This file is my best attempt to test that we're correctly not shipping down compileDoc with the editor. In core.coffee, we have the following lines: # PREVENT EVERYTHING BELOW FROM SHIPPING WITH THE EDITOR `if (!(process.env.REACT_APP_ENV === 'browser' && p...
/* This file is my best attempt to test that we're correctly not shipping down compileDoc with the editor. In core.coffee, we have the following lines: * PREVENT EVERYTHING BELOW FROM SHIPPING WITH THE EDITOR `if (!(process.env.REACT_APP_ENV === 'browser' && process.env.NODE_ENV === 'production')) {` The backticks ...
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
1
50
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript /* This file is my best attempt to test that we're correctly not shipping down compileDoc with the editor. In core.coffee, we have the following lines: * PREVENT EVERYTHING BELOW FROM SHIPPING WITH THE EDITOR `if (!(process.env.REACT_APP_ENV === 'browser' && pro...
### This file is my best attempt to test that we're correctly not shipping down compileDoc with the editor. In core.coffee, we have the following lines: # PREVENT EVERYTHING BELOW FROM SHIPPING WITH THE EDITOR `if (!(process.env.REACT_APP_ENV === 'browser' && process.env.NODE_ENV === 'production')) {` The backticks ...
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
1
50
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:1:completion
completion
### This file is my best attempt to test that we're correctly not shipping down compileDoc with the editor. In core.coffee, we have the following lines: # PREVENT EVERYTHING BELOW FROM SHIPPING WITH THE EDITOR `if (!(process.env.REACT_APP_ENV === 'browser' && process.env.NODE_ENV === 'production')) {` The backticks ...
Hopefully, it will further tree-shake out any functions defined outside the block, but used only inside it. This would remove optimization passes from shipping with the editor. As of this commit, everything appears to be working as described above. -- Below, we do our best to check if the Webpack system is correctly...
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
1
50
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:2:raw_corpus
raw_corpus
excluded = false `}` if not excluded window.alert("[Pagedraw internal] build system misconfigured: roll back.") throw new Error("Webpack failed to exclude when process.env.REACT_APP_ENV != 'browser'!!")
CoffeeScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
51
55
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:2:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript excluded = false `}` if not excluded window.alert("[Pagedraw internal] build system misconfigured: roll back.") throw new Error("Webpack failed to exclude when process.env.REACT_APP_ENV != 'browser'!!") ```
var excluded; excluded = false; }; if (!excluded) { window.alert("[Pagedraw internal] build system misconfigured: roll back."); throw new Error("Webpack failed to exclude when process.env.REACT_APP_ENV != 'browser'!!"); }
CoffeeScript
JavaScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
51
55
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var excluded; excluded = false; }; if (!excluded) { window.alert("[Pagedraw internal] build system misconfigured: roll back."); throw new Error("Webpack failed to exclude when process.env.REACT_APP_ENV != 'browser'!!"); } ```
excluded = false `}` if not excluded window.alert("[Pagedraw internal] build system misconfigured: roll back.") throw new Error("Webpack failed to exclude when process.env.REACT_APP_ENV != 'browser'!!")
JavaScript
CoffeeScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
51
55
Pagedraw/pagedraw:src/frontend/verify-browser-excludes.coffee:2:completion
completion
excluded = false `}`
if not excluded window.alert("[Pagedraw internal] build system misconfigured: roll back.") throw new Error("Webpack failed to exclude when process.env.REACT_APP_ENV != 'browser'!!")
CoffeeScript
CoffeeScript
Pagedraw/pagedraw
src/frontend/verify-browser-excludes.coffee
MIT
aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e
3,558
https://github.com/Pagedraw/pagedraw/blob/aba1bd1b8ef6bb7f58866a9d11ebb7f1e0e18a8e/src/frontend/verify-browser-excludes.coffee
51
55
twilson63/express-coffee:lib/coffee/lib/coffee-script/test/test_classes.coffee:1:raw_corpus
raw_corpus
class Base func: (string) -> "zero/$string" @static: (string) -> "static/$string"
CoffeeScript
twilson63/express-coffee
lib/coffee/lib/coffee-script/test/test_classes.coffee
MIT
971837f7d7a5e96cf5a5fdb52e52748060ed2c68
622
https://github.com/twilson63/express-coffee/blob/971837f7d7a5e96cf5a5fdb52e52748060ed2c68/lib/coffee/lib/coffee-script/test/test_classes.coffee
2
7