Create and return a path element
@param {Array} path
18759
function (path) {
		var attr = {
			// subpixel precision down to 0.1 (width and height = 1px)
			coordsize: '10 10'
		};
		if (isArray(path)) {
			attr.d = path;
		} else if (isObject(path)) { // attributes
			extend(attr, path);
		}
		// create the shape
		return this.createElement('shape').attr(attr);
	}
304107
def get_elements(path)
      elements = self./(path)
      return unless elements
      elements = elements.map{|element| Element.new(element)}
    end
380
function generatePath(path = "/", params = {}) {
  return path === "/" ? path : compilePath(path)(params, { pretty: true });
}
762563
function SvgPath(path) {
  if (!(this instanceof SvgPath)) { return new SvgPath(path); }

  var pstate = pathParse(path);

  // Array of path segments.
  // Each segment is array [command, param1, param2, ...]
  this.segments = pstate.segments;

  // Error message on parse error.
  this.err      = pstate.err;

  // Transforms stack for lazy evaluation
  this.__stack    = [];
}
1090293
function (path) {
        if (!path) {
            return;
        }
        // TODO Name have slash ?
        var pathArr = path.split('/');
        var current = this;
        for (var i = 0; i < pathArr.length; i++) {
            var name = pathArr[i];
            // Skip empty
            if (!name) {
                continue;
            }
            var found = false;
            var children = current._children;
            for (var j = 0; j < children.length; j++) {
                var child = children[j];
                if (child.name === name) {
                    current = child;
                    found = true;
                    break;
                }
            }
            // Early return if not found
            if (!found) {
                return;
            }
        }

        return current;
    }
357935
function(path) {
                var pathParts = this.getPathParts(path),
                    tabs,
                    page;
                if (pathParts.length === 0) {
                    return;
                }
                page = pathParts[0];
                if (!page) {
                    return;
                }
                if (page === 'examples' && pathParts.length > 1) {
                    tabs = [];
                    tabs.push('app/examples/' + pathParts[1] + '.html');
                    tabs.push('app/examples/' + pathParts[1] + '.js');
                    return tabs;
                }
            }
756228
function pathStrToPathArr(path) {
	path = path.substr(1).split('/').map(part => {
		// De-tokenize '/' characters in path name
		return part.replace(/~1/g, '/');
	});

	// For some reason, path arrays whose only item is an empty string cause errors.
	// In this case, we replace the path with an empty array, which seems to be fine.
	if (path.length === 1 && path[0] === '') {
		path = [];
	}

	return path;
}
1113089
function tokenize (path) {
  const tokens = []

  const parts = path.split('.')

  for (let i = 0; i < parts.length; i++) {
    const part = parts[i].trim()

    if (part.length === 0) {
      continue
    }

    const arrayIndexes = part.split(SPLIT_REG_EXP)

    tokens.push(arrayIndexes[0])

    for (let j = 1; j < arrayIndexes.length; j++) {
      if (arrayIndexes[j].length === 0) {
        continue
      }

      tokens.push(Number(arrayIndexes[j]))
    }
  }
  return tokens
}
610709
function (path, data) {
        var i = 0,
            len = path.length;
        for (;i<len;i++) {
            if (isObject(data) && (path[i] in data)) {
                data = data[path[i]];
            } else {
                data = undefined;
                break;
            }
        }
        return data;
    }
1363729
function parse(path) {
  if (t.Array.is(path)) {
    return path.map(parse).filter(Boolean);
  }
  var component = getComponent(require(path));
  if (component) {
    var comments = getComments(path);
    var descriptions = getDescriptions(comments);
    var type = toObject(getPropsType(component));
    var props = type.kind === 'refinement' ? type.type.props : type.props;
    var defaultProps = getDefaultProps(component);
    var name = getComponentName(component);
    for (var prop in props) {
      if (props.hasOwnProperty(prop)) {
        if (defaultProps.hasOwnProperty(prop)) {
          props[prop].defaultValue = defaultProps[prop];
        }
        if (descriptions.props.hasOwnProperty(prop)) {
          props[prop].description = descriptions.props[prop];
        }
      }
    }
    return {
      name: name,
      description: descriptions.component,
      props: props
    };
  }
}
892421
function objPath(obj, path) {
  if (!path) {
    return obj;
  }
  path = path.split('.');
  let i = 0;
  while (obj && i < path.length) {
    obj = obj[path[i++]];
  }
  return obj;
}
1267430
function get(path) {
    var conf = this;

    if (typeof path !== 'string') {
        throw new Error('path should be a string!');
    } else if (path.length === 0) {
        throw new Error('path cannot be empty!');
    }

    var result = baseGet(conf, getPathArray(path));
    if (result === undefined) {
        throw new Error('the value is undefined!');
    } else {
        bindGetMethod(result);  // eslint-disable-line
    }

    return result;
}
317774
function(path){
      var fullPath = []; 
      try{
        var files = fs.readdirSync(path); 
        for(var i = 0; i < files.length; i++){
          fullPath.push(path + '/' + files[i]); 
        }
        return fullPath; 
      }catch(e){
        return [];
      }
    }
264084
function (path) {
        if (path[path.length - 1] === '/') {
            path = path.substr(0, path.length - 1);
        }
        return path;
    }
945799
function parseFilepath(path) {
  if (path === undefined) {
    return {filename: null, list: []};
  }

  var list = path.split('/'),
      isDir = (path[path.length - 1] === '/') || (list[list.length - 1].indexOf('.') === -1);

  return {
    filename: isDir ? null : list.pop(),
    list: list
  };
}
868058
function(path) {
      var t = this;

      // Get the parts
      var parts = Array.isArray(path) ? path : path.split('/').filter(function(item){return item;});

      // Return the item at this level
      if (parts.length === 1) {
        return t.get('leaves').get(parts[0]);
      }

      // Return the item from the tree below
      var sub = t.get('branches').get(parts[0]);
      if (sub) {
        return sub.getByPath(parts.slice(1));
      }

      // Branch not found
      return null;
    }
312611
function(path) {
		this.assertNotDestroyed('get', path);
		path = parsePath(path);

		switch (path[0]) {
			case '$this':
				if (path.length === 1)
					return this.data;
				break;
			case '$parent':
				this.assertHasParent(path);
				return this.parent.get(path.slice(1));
				break;
			case '$env':
				return this.env.get(path.slice(1));
		}
		return utils.getProp(this.data, path);
	}