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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jeremyfa/yaml.js:src/Escaper.coffee:1:raw_corpus | raw_corpus | Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ['\\', '\\\\', '\\"', '"',
... | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Escaper.coffee | 1 | 50 | ||
jeremyfa/yaml.js:src/Escaper.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ... | var Escaper, Pattern;
Pattern = require('./Pattern');
Escaper = (function() {
var ch;
// Escaper encapsulates escaping rules for single
// and double-quoted YAML strings.
class Escaper {
// Determines if a JavaScript value would require double quoting in YAML.
// @param [String] value A JavaScri... | CoffeeScript | JavaScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Escaper.coffee | 1 | 50 |
jeremyfa/yaml.js:src/Escaper.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Escaper, Pattern;
Pattern = require('./Pattern');
Escaper = (function() {
var ch;
// Escaper encapsulates escaping rules for single
// and double-quoted YAML strings.
class Escaper {
// Determines if a JavaScript value would require double quotin... | Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ['\\', '\\\\', '\\"', '"',
... | JavaScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Escaper.coffee | 1 | 50 |
jeremyfa/yaml.js:src/Escaper.coffee:1:completion | completion | Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ['\\', '\\\\', '\\"', '"',
... | return mapping
# Characters that would cause a dumped string to require double quoting.
@PATTERN_CHARACTERS_TO_ESCAPE: new Pattern '[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9'
# Other precompiled patterns
@PATTERN_MAPPING_ESCAPEES: new Pattern @LIST_ESCAPEES.join('|').split('\\').... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Escaper.coffee | 1 | 50 |
jeremyfa/yaml.js:src/Escaper.coffee:2:raw_corpus | raw_corpus | # @return [String] The quoted, escaped string
#
@escapeWithDoubleQuotes: (value) ->
result = @PATTERN_MAPPING_ESCAPEES.replace value, (str) =>
return @MAPPING_ESCAPEES_TO_ESCAPED[str]
return '"'+result+'"'
# Determines if a JavaScript value would require single quoting in YAML... | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Escaper.coffee | 51 | 79 | ||
jeremyfa/yaml.js:src/Escaper.coffee:2:completion | completion | # @return [String] The quoted, escaped string
#
@escapeWithDoubleQuotes: (value) ->
result = @PATTERN_MAPPING_ESCAPEES.replace value, (str) =>
return @MAPPING_ESCAPEES_TO_ESCAPED[str]
return '"'+result+'"'
# Determines if a JavaScript value would require single quoting in YAML... | @requiresSingleQuoting: (value) ->
return @PATTERN_SINGLE_QUOTING.test value
# Escapes and surrounds a JavaScript value with single quotes.
#
# @param [String] value A JavaScript value
#
# @return [String] The quoted, escaped string
#
@escapeWithSingleQuotes: (value) ->
... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | efe8ce18704ae43383e4177aa7de1a2619bd4e67 | 887 | https://github.com/jeremyfa/yaml.js/blob/efe8ce18704ae43383e4177aa7de1a2619bd4e67/src/Escaper.coffee | 51 | 79 |
jeremyfa/yaml.js:src/Escaper.coffee:1:raw_corpus | raw_corpus | Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ['\\\\', '\\"', '"',
... | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | 3cd6f8477590227f01697e4594971248c04c91d4 | 887 | https://github.com/jeremyfa/yaml.js/blob/3cd6f8477590227f01697e4594971248c04c91d4/src/Escaper.coffee | 1 | 50 | ||
jeremyfa/yaml.js:src/Escaper.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ... | var Escaper, Pattern;
Pattern = require('./Pattern');
Escaper = (function() {
var ch;
// Escaper encapsulates escaping rules for single
// and double-quoted YAML strings.
class Escaper {
// Determines if a JavaScript value would require double quoting in YAML.
// @param [String] value A JavaScri... | CoffeeScript | JavaScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | 3cd6f8477590227f01697e4594971248c04c91d4 | 887 | https://github.com/jeremyfa/yaml.js/blob/3cd6f8477590227f01697e4594971248c04c91d4/src/Escaper.coffee | 1 | 50 |
jeremyfa/yaml.js:src/Escaper.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var Escaper, Pattern;
Pattern = require('./Pattern');
Escaper = (function() {
var ch;
// Escaper encapsulates escaping rules for single
// and double-quoted YAML strings.
class Escaper {
// Determines if a JavaScript value would require double quotin... | Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ['\\\\', '\\"', '"',
... | JavaScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | 3cd6f8477590227f01697e4594971248c04c91d4 | 887 | https://github.com/jeremyfa/yaml.js/blob/3cd6f8477590227f01697e4594971248c04c91d4/src/Escaper.coffee | 1 | 50 |
jeremyfa/yaml.js:src/Escaper.coffee:1:completion | completion | Pattern = require './Pattern'
# Escaper encapsulates escaping rules for single
# and double-quoted YAML strings.
class Escaper
# Mapping arrays for escaping a double quoted string. The backslash is
# first to ensure proper escaping.
@LIST_ESCAPEES: ['\\\\', '\\"', '"',
... | return mapping
# Characters that would cause a dumped string to require double quoting.
@PATTERN_CHARACTERS_TO_ESCAPE: new Pattern '[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9'
# Other precompiled patterns
@PATTERN_MAPPING_ESCAPEES: new Pattern @LIST_ESCAPEES.join('|')
@PATTERN... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | 3cd6f8477590227f01697e4594971248c04c91d4 | 887 | https://github.com/jeremyfa/yaml.js/blob/3cd6f8477590227f01697e4594971248c04c91d4/src/Escaper.coffee | 1 | 50 |
jeremyfa/yaml.js:src/Escaper.coffee:2:raw_corpus | raw_corpus | # @return [String] The quoted, escaped string
#
@escapeWithDoubleQuotes: (value) ->
result = @PATTERN_MAPPING_ESCAPEES.replace value, (str) =>
return @MAPPING_ESCAPEES_TO_ESCAPED[str]
return '"'+result+'"'
# Determines if a JavaScript value would require single quoting in YAML... | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | e3efe9d4ee17efad2583bdb82cb26527b749c67b | 887 | https://github.com/jeremyfa/yaml.js/blob/e3efe9d4ee17efad2583bdb82cb26527b749c67b/src/Escaper.coffee | 51 | 79 | ||
jeremyfa/yaml.js:src/Escaper.coffee:2:completion | completion | # @return [String] The quoted, escaped string
#
@escapeWithDoubleQuotes: (value) ->
result = @PATTERN_MAPPING_ESCAPEES.replace value, (str) =>
return @MAPPING_ESCAPEES_TO_ESCAPED[str]
return '"'+result+'"'
# Determines if a JavaScript value would require single quoting in YAML... | @requiresSingleQuoting: (value) ->
return @PATTERN_SINGLE_QUOTING.test value
# Escapes and surrounds a JavaScript value with single quotes.
#
# @param [String] value A JavaScript value
#
# @return [String] The quoted, escaped string
#
@escapeWithSingleQuotes: (value) ->
... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | e3efe9d4ee17efad2583bdb82cb26527b749c67b | 887 | https://github.com/jeremyfa/yaml.js/blob/e3efe9d4ee17efad2583bdb82cb26527b749c67b/src/Escaper.coffee | 51 | 79 |
jeremyfa/yaml.js:src/Escaper.coffee:2:raw_corpus | raw_corpus | # @return [String] The quoted, escaped string
#
@escapeWithDoubleQuotes: (value) ->
return @PATTERN_MAPPING_ESCAPEES.replace value, (str) =>
return @MAPPING_ESCAPEES_TO_ESCAPED[str]
# Determines if a JavaScript value would require single quoting in YAML.
#
# @param [String] ... | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | c6cbcf0326723c5f0013490d1fea489694790775 | 887 | https://github.com/jeremyfa/yaml.js/blob/c6cbcf0326723c5f0013490d1fea489694790775/src/Escaper.coffee | 51 | 78 | ||
jeremyfa/yaml.js:src/Escaper.coffee:2:completion | completion | # @return [String] The quoted, escaped string
#
@escapeWithDoubleQuotes: (value) ->
return @PATTERN_MAPPING_ESCAPEES.replace value, (str) =>
return @MAPPING_ESCAPEES_TO_ESCAPED[str]
# Determines if a JavaScript value would require single quoting in YAML.
#
# @param [String] ... | return @PATTERN_SINGLE_QUOTING.test value
# Escapes and surrounds a JavaScript value with single quotes.
#
# @param [String] value A JavaScript value
#
# @return [String] The quoted, escaped string
#
@escapeWithSingleQuotes: (value) ->
return "'"+value.replace('\'', '\'\'')+"'... | CoffeeScript | CoffeeScript | jeremyfa/yaml.js | src/Escaper.coffee | MIT | c6cbcf0326723c5f0013490d1fea489694790775 | 887 | https://github.com/jeremyfa/yaml.js/blob/c6cbcf0326723c5f0013490d1fea489694790775/src/Escaper.coffee | 51 | 78 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent... | var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = (function() {
class XMLDTDEntity extends XMLNode {
// Initializes a new instance ... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = (function() {
class XMLDTDEnti... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | throw new Error "Missing DTD entity value. " + @debugInfo(name)
@pe = !!pe
@name = @stringify.name name
@type = NodeType.EntityDeclaration
if not isObject value
@value = @stringify.dtdEntityValue value
@internal = true
else
if not value.pubID and not value.sysID
throw ne... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:raw_corpus | raw_corpus | Object.defineProperty @::, 'systemId', get: () -> @sysID
Object.defineProperty @::, 'notationName', get: () -> @nData or null
# DOM level 3
Object.defineProperty @::, 'inputEncoding', get: () -> null
Object.defineProperty @::, 'xmlEncoding', get: () -> null
Object.defineProperty @::, 'xmlVersion', get: () ->... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDEntity.coffee | 51 | 66 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:completion | completion | Object.defineProperty @::, 'systemId', get: () -> @sysID
Object.defineProperty @::, 'notationName', get: () -> @nData or null
# DOM level 3
Object.defineProperty @::, 'inputEncoding', get: () -> null
Object.defineProperty @::, 'xmlEncoding', get: () -> null
Object.defineProperty @::, 'xmlVersion', get: () ->... | # 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
toString: (options) ->
@options.writer.... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ce625aeb9f52d1f75d5d94260794d3b5fd74a8b1/src/XMLDTDEntity.coffee | 51 | 66 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:raw_corpus | raw_corpus | Object.defineProperty @::, 'systemId', get: () -> @sysID
Object.defineProperty @::, 'notationName', get: () -> @nData or null
# 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 ... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 68552eda87d08b71507e70e032d7619b46096fe3 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLDTDEntity.coffee | 51 | 62 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:completion | completion | Object.defineProperty @::, 'systemId', get: () -> @sysID
Object.defineProperty @::, 'notationName', get: () -> @nData or null
# 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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(o... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 68552eda87d08b71507e70e032d7619b46096fe3 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/68552eda87d08b71507e70e032d7619b46096fe3/src/XMLDTDEntity.coffee | 51 | 62 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent... | var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLDTDEntity`
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNo... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | throw new Error "Missing DTD entity value. " + @debugInfo(name)
@pe = !!pe
@name = @stringify.name name
@type = NodeType.EntityDeclaration
if not isObject value
@value = @stringify.dtdEntityValue value
@internal = true
else
if not value.pubID and not value.sysID
throw ne... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:raw_corpus | raw_corpus | Object.defineProperty @, 'systemId', get: () -> @sysID
Object.defineProperty @, 'notationName', get: () -> @nData or null
# 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... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDEntity.coffee | 51 | 62 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:completion | completion | Object.defineProperty @, 'systemId', get: () -> @sysID
Object.defineProperty @, 'notationName', get: () -> @nData or null
# 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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(o... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 6f18c8edefd0f3ed1192e4129fb1b032b8c9918f | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/6f18c8edefd0f3ed1192e4129fb1b032b8c9918f/src/XMLDTDEntity.coffee | 51 | 62 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent... | var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLDTDEntity`
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNo... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | throw new Error "Missing DTD entity value. " + @debugInfo(name)
@pe = !!pe
@name = @stringify.name name
@type = NodeType.EntityDeclaration
if not isObject value
@value = @stringify.dtdEntityValue value
@internal = true
else
if not value.pubID and not value.sysID
throw ne... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2: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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptio... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 51 | 57 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2: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
toString: (options) ->
... | // `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
({
toString: function(options) {
return this.options.writer.dtdEntity(this, this.opti... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 51 | 57 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2: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
({
toString: function(options) {
... | #
# `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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptio... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 51 | 57 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2: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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options) | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | 3ea28fa414af4cf62b9583bb975ad1f1fb194372 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/3ea28fa414af4cf62b9583bb975ad1f1fb194372/src/XMLDTDEntity.coffee | 51 | 57 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent... | var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLDTDEntity`
... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var NodeType, XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
NodeType = require('./NodeType');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNo... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
NodeType = require './NodeType'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this i... | throw new Error "Missing DTD entity value. " + @debugInfo(name)
@pe = !!pe
@name = @stringify.name name
@type = NodeType.EntityDeclaration
if not isObject value
@value = @stringify.dtdEntityValue value
else
if not value.pubID and not value.sysID
throw new Error "Public and/or ... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:raw_corpus | raw_corpus | # `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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options) | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 51 | 55 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# `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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filt... | // `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
({
toString: function(options) {
return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
}
}); | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 51 | 55 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// `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
({
toString: function(options) {
return this.options.writer.dtdEntity(this,... | # `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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options) | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 51 | 55 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:completion | completion | # `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
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options) | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | d8de14769590b262e56b467df05db50855a0ad24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/d8de14769590b262e56b467df05db50855a0ad24/src/XMLDTDEntity.coffee | 51 | 55 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` elemen... | var XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLDTDEntity`
// `parent` the parent `XMLDocType` elemen... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLD... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | @pe = !!pe
@name = @stringify.name name
if not isObject value
@value = @stringify.dtdEntityValue value
else
if not value.pubID and not value.sysID
throw new Error "Public and/or system identifiers are required for an external entity. " + @debugInfo(name)
if value.pubID and not va... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:raw_corpus | raw_corpus | # `options.newline` newline sequence for pretty print
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options) | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 51 | 53 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# `options.newline` newline sequence for pretty print
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options)
``` | // `options.newline` newline sequence for pretty print
({
toString: function(options) {
return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
}
}); | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 51 | 53 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// `options.newline` newline sequence for pretty print
({
toString: function(options) {
return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));
}
});
``` | # `options.newline` newline sequence for pretty print
toString: (options) ->
@options.writer.dtdEntity @, @options.writer.filterOptions(options) | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b38e655b1c8b3f940de5f764029d4cb6c4bc5d9e/src/XMLDTDEntity.coffee | 51 | 53 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` elemen... | var XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLDTDEntity`
// `parent` the parent `XMLDocType` elemen... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLD... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | @pe = !!pe
@name = @stringify.eleName name
if not isObject value
@value = @stringify.dtdEntityValue value
else
if not value.pubID and not value.sysID
throw new Error "Public and/or system identifiers are required for an external entity. " + @debugInfo(name)
if value.pubID and not... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | b6c2503daa774b02579fb8c98c31877ea24861a1 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/b6c2503daa774b02579fb8c98c31877ea24861a1/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:raw_corpus | raw_corpus | # `options.newline` newline sequence for pretty print
toString: (options) ->
@options.writer.set(options).dtdEntity @ | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLDTDEntity.coffee | 51 | 53 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# `options.newline` newline sequence for pretty print
toString: (options) ->
@options.writer.set(options).dtdEntity @
``` | // `options.newline` newline sequence for pretty print
({
toString: function(options) {
return this.options.writer.set(options).dtdEntity(this);
}
}); | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLDTDEntity.coffee | 51 | 53 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// `options.newline` newline sequence for pretty print
({
toString: function(options) {
return this.options.writer.set(options).dtdEntity(this);
}
});
``` | # `options.newline` newline sequence for pretty print
toString: (options) ->
@options.writer.set(options).dtdEntity @ | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | f066a3151d269e738ea37d87e5bf2470ef948b24 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/f066a3151d269e738ea37d87e5bf2470ef948b24/src/XMLDTDEntity.coffee | 51 | 53 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:raw_corpus | raw_corpus | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ab0c6d3649828decfdd0c4b0e16021a3f300cc47 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLDTDEntity.coffee | 1 | 50 | ||
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
{ isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` elemen... | var XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLDTDEntity`
// `parent` the parent `XMLDocType` elemen... | CoffeeScript | JavaScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ab0c6d3649828decfdd0c4b0e16021a3f300cc47 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var XMLDTDEntity, XMLNode, isObject;
({isObject} = require('./Utility'));
XMLNode = require('./XMLNode');
// Represents an entity declaration in the DTD
module.exports = XMLDTDEntity = class XMLDTDEntity extends XMLNode {
// Initializes a new instance of `XMLD... | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | JavaScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ab0c6d3649828decfdd0c4b0e16021a3f300cc47 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLDTDEntity.coffee | 1 | 50 |
oozcitak/xmlbuilder-js:src/XMLDTDEntity.coffee:1:completion | completion | { isObject } = require './Utility'
XMLNode = require './XMLNode'
# Represents an entity declaration in the DTD
module.exports = class XMLDTDEntity extends XMLNode
# Initializes a new instance of `XMLDTDEntity`
#
# `parent` the parent `XMLDocType` element
# `pe` whether this is a parameter entity or a genera... | @pe = !!pe
@name = @stringify.eleName name
if not isObject value
@value = @stringify.dtdEntityValue value
else
if not value.pubID and not value.sysID
throw new Error "Public and/or system identifiers are required for an external entity"
if value.pubID and not value.sysID
... | CoffeeScript | CoffeeScript | oozcitak/xmlbuilder-js | src/XMLDTDEntity.coffee | MIT | ab0c6d3649828decfdd0c4b0e16021a3f300cc47 | 926 | https://github.com/oozcitak/xmlbuilder-js/blob/ab0c6d3649828decfdd0c4b0e16021a3f300cc47/src/XMLDTDEntity.coffee | 1 | 50 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:1:raw_corpus | raw_corpus | module.exports = class TextElements extends LayerInfo
@shouldParse: (key) -> key is 'TySh'
TRANSFORM_VALUE = ['xx', 'xy', 'yx', 'yy', 'tx', 'ty']
COORDS_VALUE = ['left', 'top', 'right', 'bottom']
constructor: (layer, length) ->
super(layer, length)
@version = null
@transform = {}
@textVersion... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 6 | 55 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class TextElements extends LayerInfo
@shouldParse: (key) -> key is 'TySh'
TRANSFORM_VALUE = ['xx', 'xy', 'yx', 'yy', 'tx', 'ty']
COORDS_VALUE = ['left', 'top', 'right', 'bottom']
constructor: (layer, length) ->
super(layer, length)
... | var TextElements;
module.exports = TextElements = (function() {
var COORDS_VALUE, TRANSFORM_VALUE;
class TextElements extends LayerInfo {
static shouldParse(key) {
return key === 'TySh';
}
constructor(layer, length) {
super(layer, length);
this.version = null;
this.transform =... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 6 | 55 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var TextElements;
module.exports = TextElements = (function() {
var COORDS_VALUE, TRANSFORM_VALUE;
class TextElements extends LayerInfo {
static shouldParse(key) {
return key === 'TySh';
}
constructor(layer, length) {
super(layer, len... | module.exports = class TextElements extends LayerInfo
@shouldParse: (key) -> key is 'TySh'
TRANSFORM_VALUE = ['xx', 'xy', 'yx', 'yy', 'tx', 'ty']
COORDS_VALUE = ['left', 'top', 'right', 'bottom']
constructor: (layer, length) ->
super(layer, length)
@version = null
@transform = {}
@textVersion... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 6 | 55 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:1:completion | completion | module.exports = class TextElements extends LayerInfo
@shouldParse: (key) -> key is 'TySh'
TRANSFORM_VALUE = ['xx', 'xy', 'yx', 'yy', 'tx', 'ty']
COORDS_VALUE = ['left', 'top', 'right', 'bottom']
constructor: (layer, length) ->
super(layer, length)
@version = null
@transform = {}
@textVersion... | @parseTransformInfo()
@textVersion = @file.readShort()
@descriptorVersion = @file.readInt()
@textData = new Descriptor(@file).parse()
@textValue = @textData['Txt ']
@engineData = parseEngineData(@textData.EngineData)
@warpVersion = @file.readShort()
@descriptorVersion = @file.readInt()
... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 6 | 55 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:raw_corpus | raw_corpus | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 56 | 105 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.... | ({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.length - 1] - 1;
}
return arr;
},
fontStyles: f... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.leng... | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:completion | completion | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | return weight
textDecoration: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleSheetData
data.map (f) ->
if f.Underline
decoration = 'underline'
else
decoration = 'none'
return decoration
leading: ->
data = @engineData.EngineDict.S... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:3:raw_corpus | raw_corpus | alignment: ->
return [] unless @engineData?
alignments = ['left', 'right', 'center', 'justify']
@engineData.EngineDict.ParagraphRun.RunArray.map (s) ->
alignments[Math.min(parseInt(s.ParagraphSheet.Properties.Justification, 10), 3)]
# Return all colors used for text in this layer. The colors are re... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 106 | 155 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
alignment: ->
return [] unless @engineData?
alignments = ['left', 'right', 'center', 'justify']
@engineData.EngineDict.ParagraphRun.RunArray.map (s) ->
alignments[Math.min(parseInt(s.ParagraphSheet.Properties.Justification, 10), 3)]
# Return ... | var hasProp = {}.hasOwnProperty;
({
alignment: function() {
var alignments;
if (this.engineData == null) {
return [];
}
alignments = ['left', 'right', 'center', 'justify'];
return this.engineData.EngineDict.ParagraphRun.RunArray.map(function(s) {
return alignments[Math.min(parseInt(s.... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 106 | 155 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var hasProp = {}.hasOwnProperty;
({
alignment: function() {
var alignments;
if (this.engineData == null) {
return [];
}
alignments = ['left', 'right', 'center', 'justify'];
return this.engineData.EngineDict.ParagraphRun.RunArray.map(fun... | alignment: ->
return [] unless @engineData?
alignments = ['left', 'right', 'center', 'justify']
@engineData.EngineDict.ParagraphRun.RunArray.map (s) ->
alignments[Math.min(parseInt(s.ParagraphSheet.Properties.Justification, 10), 3)]
# Return all colors used for text in this layer. The colors are re... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 106 | 155 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:3:completion | completion | alignment: ->
return [] unless @engineData?
alignments = ['left', 'right', 'center', 'justify']
@engineData.EngineDict.ParagraphRun.RunArray.map (s) ->
alignments[Math.min(parseInt(s.ParagraphSheet.Properties.Justification, 10), 3)]
# Return all colors used for text in this layer. The colors are re... | @_styles = _.reduce(data, (m, o) ->
for own k, v of o
m[k] or= []
m[k].push v
m
, {})
# Creates the CSS string and returns it. Each property is newline separated
# and not all properties may be present depending on the document.
#
# Colors are returned in rgba() format and fonts... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 106 | 155 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:raw_corpus | raw_corpus | export: ->
value: @textValue
font:
lengthArray: @lengthArray()
styles: @fontStyles()
weights: @fontWeights()
names: @fonts()
sizes: @sizes()
colors: @colors()
alignment: @alignment()
textDecoration: @textDecoration()
leading: @leading()
left: @coords.lef... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 156 | 172 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
export: ->
value: @textValue
font:
lengthArray: @lengthArray()
styles: @fontStyles()
weights: @fontWeights()
names: @fonts()
sizes: @sizes()
colors: @colors()
alignment: @alignment()
textDecoration: @textDec... | ({
export: function() {
return {
value: this.textValue,
font: {
lengthArray: this.lengthArray(),
styles: this.fontStyles(),
weights: this.fontWeights(),
names: this.fonts(),
sizes: this.sizes(),
colors: this.colors(),
alignment: this.alignment(),... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 156 | 172 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
export: function() {
return {
value: this.textValue,
font: {
lengthArray: this.lengthArray(),
styles: this.fontStyles(),
weights: this.fontWeights(),
names: this.fonts(),
sizes: this.sizes(),
colo... | export: ->
value: @textValue
font:
lengthArray: @lengthArray()
styles: @fontStyles()
weights: @fontWeights()
names: @fonts()
sizes: @sizes()
colors: @colors()
alignment: @alignment()
textDecoration: @textDecoration()
leading: @leading()
left: @coords.lef... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 156 | 172 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:completion | completion | export: ->
value: @textValue
font:
lengthArray: @lengthArray()
styles: @fontStyles()
weights: @fontWeights()
names: @fonts()
sizes: @sizes() | colors: @colors()
alignment: @alignment()
textDecoration: @textDecoration()
leading: @leading()
left: @coords.left
top: @coords.top
right: @coords.right
bottom: @coords.bottom
transform: @transform | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 7e8392d20fd5d66ad70ddda7309661b9a0ca67c8 | 2,846 | https://github.com/meltingice/psd.js/blob/7e8392d20fd5d66ad70ddda7309661b9a0ca67c8/lib/psd/layer_info/typetool.coffee | 156 | 172 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:raw_corpus | raw_corpus | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ea2510f82157f6999ed273e4cb1a631cedeb2049 | 2,846 | https://github.com/meltingice/psd.js/blob/ea2510f82157f6999ed273e4cb1a631cedeb2049/lib/psd/layer_info/typetool.coffee | 56 | 105 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.... | ({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.length - 1] - 1;
}
return arr;
},
fontStyles: f... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ea2510f82157f6999ed273e4cb1a631cedeb2049 | 2,846 | https://github.com/meltingice/psd.js/blob/ea2510f82157f6999ed273e4cb1a631cedeb2049/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.leng... | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ea2510f82157f6999ed273e4cb1a631cedeb2049 | 2,846 | https://github.com/meltingice/psd.js/blob/ea2510f82157f6999ed273e4cb1a631cedeb2049/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:completion | completion | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | return weight
textDecoration: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleSheetData
data.map (f) ->
if f.Underline
decoration = 'underline'
else
decoration = 'normal'
return decoration
leading: ->
data = @engineData.EngineDict... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ea2510f82157f6999ed273e4cb1a631cedeb2049 | 2,846 | https://github.com/meltingice/psd.js/blob/ea2510f82157f6999ed273e4cb1a631cedeb2049/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:raw_corpus | raw_corpus | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 044a157b086b4dd0e79b24a33d431391cab02d9c | 2,846 | https://github.com/meltingice/psd.js/blob/044a157b086b4dd0e79b24a33d431391cab02d9c/lib/psd/layer_info/typetool.coffee | 56 | 105 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.... | ({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.length - 1] - 1;
}
return arr;
},
fontStyles: f... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 044a157b086b4dd0e79b24a33d431391cab02d9c | 2,846 | https://github.com/meltingice/psd.js/blob/044a157b086b4dd0e79b24a33d431391cab02d9c/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.leng... | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 044a157b086b4dd0e79b24a33d431391cab02d9c | 2,846 | https://github.com/meltingice/psd.js/blob/044a157b086b4dd0e79b24a33d431391cab02d9c/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:completion | completion | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | return weight
textDecoration: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleSheetData
data.map (f) ->
if f.Underline
decoration = 'underline'
else
decoration = 'normal'
return decoration
leading: ->
data = @engineData.EngineDict... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | 044a157b086b4dd0e79b24a33d431391cab02d9c | 2,846 | https://github.com/meltingice/psd.js/blob/044a157b086b4dd0e79b24a33d431391cab02d9c/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:raw_corpus | raw_corpus | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 56 | 105 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.... | ({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.length - 1] - 1;
}
return arr;
},
fontStyles: f... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.leng... | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:completion | completion | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | textDecoration: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleSheetData
data.map (f) ->
if f.Underline
decoration = 'underline';
else
decoration = 'none';
return decoration
sizes: ->
return [] if not @engineData? and not @styles().... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:3:raw_corpus | raw_corpus | return [[0, 0, 0, 255]] if not @engineData? or not @styles().FillColor?
@styles().FillColor.map (s) ->
values = s.Values.map (v) -> Math.round(v * 255)
values.push values.shift() # Change ARGB -> RGBA for consistency
values
styles: ->
return {} unless @engineData?
return @_styles if @_... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 106 | 155 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:3:completion | completion | return [[0, 0, 0, 255]] if not @engineData? or not @styles().FillColor?
@styles().FillColor.map (s) ->
values = s.Values.map (v) -> Math.round(v * 255)
values.push values.shift() # Change ARGB -> RGBA for consistency
values
styles: ->
return {} unless @engineData?
return @_styles if @_... | # Photoshop fonts.
toCSS: ->
definition =
'font-family': @fonts().join(', ')
'font-size': "#{@sizes()[0]}pt"
'color': "rgba(#{@colors()[0].join(', ')})"
'text-align': @alignment()[0]
css = []
for k, v of definition
continue unless v?
css.push "#{k}: #{v};"
css.joi... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 106 | 155 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:raw_corpus | raw_corpus | textDecoration: @textDecoration()
left: @coords.left
top: @coords.top
right: @coords.right
bottom: @coords.bottom
transform: @transform | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 156 | 161 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
textDecoration: @textDecoration()
left: @coords.left
top: @coords.top
right: @coords.right
bottom: @coords.bottom
transform: @transform
``` | ({
textDecoration: this.textDecoration()({
left: this.coords.left,
top: this.coords.top,
right: this.coords.right,
bottom: this.coords.bottom,
transform: this.transform
})
}); | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 156 | 161 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
textDecoration: this.textDecoration()({
left: this.coords.left,
top: this.coords.top,
right: this.coords.right,
bottom: this.coords.bottom,
transform: this.transform
})
});
``` | textDecoration: @textDecoration()
left: @coords.left
top: @coords.top
right: @coords.right
bottom: @coords.bottom
transform: @transform | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 156 | 161 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:4:completion | completion | textDecoration: @textDecoration()
left: @coords.left
top: @coords.top | right: @coords.right
bottom: @coords.bottom
transform: @transform | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | a36fe739e786743920c46d4163ecd4c5d19250c6 | 2,846 | https://github.com/meltingice/psd.js/blob/a36fe739e786743920c46d4163ecd4c5d19250c6/lib/psd/layer_info/typetool.coffee | 156 | 161 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:raw_corpus | raw_corpus | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ec4e741e7cb4d4dcc462df51520bdd20d0acad93 | 2,846 | https://github.com/meltingice/psd.js/blob/ec4e741e7cb4d4dcc462df51520bdd20d0acad93/lib/psd/layer_info/typetool.coffee | 56 | 105 | ||
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.... | ({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.length - 1] - 1;
}
return arr;
},
fontStyles: f... | CoffeeScript | JavaScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ec4e741e7cb4d4dcc462df51520bdd20d0acad93 | 2,846 | https://github.com/meltingice/psd.js/blob/ec4e741e7cb4d4dcc462df51520bdd20d0acad93/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
lengthArray: function() {
var arr, sum;
arr = this.engineData.EngineDict.StyleRun.RunLengthArray;
sum = _.reduce(arr, function(m, o) {
return m + o;
});
if (sum - this.textValue.length === 1) {
arr[arr.length - 1] = arr[arr.leng... | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | JavaScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ec4e741e7cb4d4dcc462df51520bdd20d0acad93 | 2,846 | https://github.com/meltingice/psd.js/blob/ec4e741e7cb4d4dcc462df51520bdd20d0acad93/lib/psd/layer_info/typetool.coffee | 56 | 105 |
meltingice/psd.js:lib/psd/layer_info/typetool.coffee:2:completion | completion | lengthArray: ->
arr = @engineData.EngineDict.StyleRun.RunLengthArray
sum = _.reduce(arr, (m, o) -> m + o)
arr[arr.length - 1] = arr[arr.length - 1] - 1 if sum - @textValue.length == 1
return arr
fontStyles: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleShee... | textDecoration: ->
data = @engineData.EngineDict.StyleRun.RunArray.map (r) ->
r.StyleSheet.StyleSheetData
data.map (f) ->
if f.Underline
decoration = 'underline';
else
decoration = 'normal';
return decoration
sizes: ->
return [] if not @engineData? and not @styles(... | CoffeeScript | CoffeeScript | meltingice/psd.js | lib/psd/layer_info/typetool.coffee | MIT | ec4e741e7cb4d4dcc462df51520bdd20d0acad93 | 2,846 | https://github.com/meltingice/psd.js/blob/ec4e741e7cb4d4dcc462df51520bdd20d0acad93/lib/psd/layer_info/typetool.coffee | 56 | 105 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.