message: added travel function
diff: @@ -101,6 +101,45 @@ namespace MakerJs {
  return converted.join('');
  }
  + /**
  + * Travel along a route inside of a model to extract a specific node in its tree.
  + *
  + * @param modelContext Model to travel within.
  + * @param routeKeyOrRoute String of a flattened route, or a string array of route segments.
  + * @returns Model or Path object within the modelContext tree.
  + */
  + export function travel(modelContext: IModel, routeKeyOrRoute: string | string[]) {
  + if (!modelContext || !routeKeyOrRoute) return null;
  +
  + var route: string[];
  + if (Array.isArray(routeKeyOrRoute)) {
  + route = routeKeyOrRoute;
  + } else {
  + route = JSON.parse(routeKeyOrRoute);
  + }
  +
  + var props = route.slice();
  + var ref: any = modelContext;
  + var origin = modelContext.origin || [0, 0];
  +
  + while (props.length) {
  + var prop = props.shift();
  + ref = ref[prop];
  +
  + if (!ref) return null;
  +
  + if (ref.origin && props.length) {
  + origin = point.add(origin, ref.origin);
  + }
  + }
  +
  + return {
  + path: <IPath | IModel>ref,
  + offset: origin
  + };
  +
  + }
  +
  /**
  * @private
  */
  