Automated class transform

npx lebab --replace src --transform class
This commit is contained in:
Tim Schaub
2018-07-16 16:18:16 -06:00
parent 60e85e7d89
commit 7b4a73f3b9
145 changed files with 32887 additions and 33714 deletions

View File

@@ -17,15 +17,40 @@ import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,
* @extends {module:ol/format/XML}
* @api
*/
const WMSCapabilities = function() {
class WMSCapabilities {
constructor() {
XML.call(this);
XML.call(this);
/**
* @type {string|undefined}
*/
this.version = undefined;
}
/**
* @type {string|undefined}
* @inheritDoc
*/
this.version = undefined;
};
readFromDocument(doc) {
for (let n = doc.firstChild; n; n = n.nextSibling) {
if (n.nodeType == Node.ELEMENT_NODE) {
return this.readFromNode(n);
}
}
return null;
}
/**
* @inheritDoc
*/
readFromNode(node) {
this.version = node.getAttribute('version').trim();
const wmsCapabilityObject = pushParseAndPop({
'version': this.version
}, PARSERS, node, []);
return wmsCapabilityObject ? wmsCapabilityObject : null;
}
}
inherits(WMSCapabilities, XML);
@@ -277,31 +302,6 @@ const KEYWORDLIST_PARSERS = makeStructureNS(
WMSCapabilities.prototype.read;
/**
* @inheritDoc
*/
WMSCapabilities.prototype.readFromDocument = function(doc) {
for (let n = doc.firstChild; n; n = n.nextSibling) {
if (n.nodeType == Node.ELEMENT_NODE) {
return this.readFromNode(n);
}
}
return null;
};
/**
* @inheritDoc
*/
WMSCapabilities.prototype.readFromNode = function(node) {
this.version = node.getAttribute('version').trim();
const wmsCapabilityObject = pushParseAndPop({
'version': this.version
}, PARSERS, node, []);
return wmsCapabilityObject ? wmsCapabilityObject : null;
};
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.