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
+26 -26
View File
@@ -11,9 +11,32 @@ import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pus
* @constructor
* @extends {module:ol/format/XML}
*/
const OWS = function() {
XML.call(this);
};
class OWS {
constructor() {
XML.call(this);
}
/**
* @inheritDoc
*/
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) {
const owsObject = pushParseAndPop({},
PARSERS, node, []);
return owsObject ? owsObject : null;
}
}
inherits(OWS, XML);
@@ -187,29 +210,6 @@ const SERVICE_PROVIDER_PARSERS =
});
/**
* @inheritDoc
*/
OWS.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
*/
OWS.prototype.readFromNode = function(node) {
const owsObject = pushParseAndPop({},
PARSERS, node, []);
return owsObject ? owsObject : null;
};
/**
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.