Переименования
This commit is contained in:
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user