Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ysuzuki19/dir-finder
TypeScript Library for finding directory
https://github.com/ysuzuki19/dir-finder
Last synced: 2 days ago
JSON representation
TypeScript Library for finding directory
- Host: GitHub
- URL: https://github.com/ysuzuki19/dir-finder
- Owner: ysuzuki19
- License: mit
- Created: 2022-07-14T15:12:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-14T16:16:15.000Z (over 2 years ago)
- Last Synced: 2024-12-16T18:15:35.247Z (11 days ago)
- Language: TypeScript
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dir-finder
TypeScript Library for finding directory.
By this library, you can find git/node root easily in your code.😉
# install
```bash
$ npm i dir-finder
```# How to use
## Find git root
function find by `.git` existing
```typescript
import { find_git_root } from './index';// find git root
const res = find_git_root(__dirname);
```## Find node root
function find by `node_modules` existing
```typescript
import { find_git_root } from './index';// find node root
const res = find_node_root(__dirname);
```