nl_tokens: Internal : Used by getPath to resolve a path into a value . o - The object to resolve the path from . pathSegments - An array of strings representing segments of the path to resolve . Returns the resolved value or undefined if some segment of the path does not exist .
pl_tokens: function _getPath ( o , pathSegments ) { if ( o == null ) { return undefined ; } var <mask> = pathSegments [ 0 ] , tail = pathSegments . slice ( 1 ) ; if ( Array . isArray ( o ) && ! ( head in o ) ) { o = o . reduce ( function ( acc , x ) { if ( ! x ) { return acc ; } var y = x [ head ] ; if ( Array . isArray ( y ) ) { acc . push . apply ( acc , y ) ; } else { acc . push ( y ) ; } return acc ; } , [ ] ) ; } else { o = o [ head ] ; } if ( ! tail . length ) { return o ; } else { return o ? _getPath ( o , tail ) : undefined ; } }