JSPM

dir-finder

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q30849F
  • License MIT

TypeScript Library for finding directory

Package Exports

  • dir-finder
  • dir-finder/dist/index.es.js
  • dir-finder/dist/index.umd.min.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dir-finder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dir-finder

TypeScript Library for finding directory.

By this library, you can find git/node root easily in your code.😉

install

$ npm i dir-finder

How to use

Find git root

function find by .git existing

import { find_git_root } from './index';

// find git root
const res = find_git_root(__dirname);

Find node root

function find by node_modules existing

import { find_git_root } from './index';

// find node root
const res = find_node_root(__dirname);