Automated class transform
npx lebab --replace src --transform class
This commit is contained in:
+26
-26
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user