include-path-searcher

0.1.0 • Public • Published

include-path-searcher

Build Status

Utility functions for searching multiple include paths.

Installation

npm install --save include-path-searcher

Usage

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

findFileSync

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:

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    98,237
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    98,237

Package Sidebar

Install

npm i include-path-searcher

Weekly Downloads

98,237

Version

0.1.0

License

MIT

Last publish

Collaborators

  • joliss