UNPKG

netconf-client

Version:
17 lines 953 B
import { NetconfType } from '../lib/index.ts'; /** * The function will return the requested object by stripping the parent objects from the object returned from * the Netconf,matching the XPath, leaving only the last object. Therefore the actual object is returned without * the root path. For example, if XPath is //aaa//user[name="admin"]/homedir, the function will return the object * that contains the homedir value: * { * homedir: '/home/admin' * } * * @param {object} obj - Config object returned by Netconf when queried with XPath filter * @param {string} xpath - XPath string * @returns The object stripped of the XPath tokens, that is if XPath is /aaa/authentication/users/user[name="admin"]/homedir, * the function will return the object that contains the homedir value */ export declare function resolveXPath(obj: NetconfType | undefined, xpath: string): NetconfType | undefined; //# sourceMappingURL=resolve-xpath.d.ts.map