# include-path-searcher

> Helper functions for searching for files in multiple include paths

Latest version **0.1.0** (published 2014-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install include-path-searcher
pnpm add include-path-searcher
yarn add include-path-searcher
bun add include-path-searcher
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-03-01 |
| First published | 2014-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jo Liss |
| Maintainers | joliss |

## Links

- npm: https://www.npmjs.com/package/include-path-searcher
- Repository: https://github.com/joliss/include-path-searcher
- Issues: https://github.com/joliss/include-path-searcher/issues
- npm.io page: https://npm.io/package/include-path-searcher

## Recent versions

- 0.1.0 (latest) — 2014-03-01

## README

# include-path-searcher

[![Build Status](https://travis-ci.org/joliss/include-path-searcher.png?branch=master)](https://travis-ci.org/joliss/include-path-searcher)

Utility functions for searching multiple include paths.

## Installation

```bash
npm install --save include-path-searcher
```

## Usage

```js
var includePathSearcher = require('include-path-searcher')
```

### findFileSync

```js
includePathSearcher.findFileSync(relativePath, includePaths) // => fullPath
```

Searches for the file identified by `relativePath` in any of the given
directories (`includePaths`). Returns the full path of the first file found,
or throws an error if none found. For example:

```js
includePathSearcher.findFileSync('foo.txt', ['dir1', 'dir2'])
```

This returns either `'dir1/foo.txt'` or `'dir2/foo.txt'`. If `foo.txt` does
not exist in either directory, it throws an error.

---
_Source: https://npm.io/package/include-path-searcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
