get-file-path

1.0.0 • Public • Published

get-file-path

Retrieve a file path from an initial path. A common example is to get the path of a package.json.

How it works? If the file isn't at the initial path, it will search in the parent folder, etc.

Installation

npm i get-file-path

Usage

getFilePath(initialPath, fileToReach)

By default fileToReach is package.json

e.g

import getFilePath from "get-file-path"

const packagePath = getFilePath("./", "package.json")

// packagePath: '/Users/username/Desktop/getFile/package.json'

License

get-file-path is [MIT-licensed].

Readme

Keywords

Package Sidebar

Install

npm i get-file-path

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.5 kB

Total Files

4

Last publish

Collaborators

  • schrax