Переименования

This commit is contained in:
Book Pauk
2022-11-10 00:40:44 +07:00
parent 8ee1b98a12
commit ec6b72868b
4 changed files with 31 additions and 95 deletions

View File

@@ -1,4 +1,4 @@
class ObjectNavigator {
class ObjectInspector {
constructor(raw = null) {
this.raw = raw;
}
@@ -62,7 +62,7 @@ class ObjectNavigator {
const result = [];
for (const r of raw)
result.push(new ObjectNavigator(r));
result.push(new ObjectInspector(r));
return result;
}
@@ -106,4 +106,4 @@ class ObjectNavigator {
}
}
module.exports = ObjectNavigator;
module.exports = ObjectInspector;

View File

@@ -1,5 +1,5 @@
const sax = require('./sax');
const ObjectNavigator = require('./ObjectNavigator');
const ObjectInspector = require('./ObjectInspector');
//node types
const NODE = 1;
@@ -760,11 +760,11 @@ class XmlParser extends NodeBase {
return this;
}
navigator(obj) {
inspector(obj) {
if (!obj)
obj = this.toObject();
return new ObjectNavigator(obj);
return new ObjectInspector(obj);
}
}