# query-paths

> Small library to get all paths that contains one or multiple file names.

Latest version **1.0.2** (published 2017-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install query-paths
pnpm add query-paths
yarn add query-paths
bun add query-paths
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-01-15 |
| First published | 2017-01-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ricardo Canastro |
| Maintainers | canastro |
| Keywords | git, path |

## Links

- npm: https://www.npmjs.com/package/query-paths
- Repository: https://github.com/canastro/query-paths
- Homepage: https://github.com/canastro/query-paths#readme
- Issues: https://github.com/canastro/query-paths/issues
- npm.io page: https://npm.io/package/query-paths

## Dependencies (1)

- [bluebird](https://npm.io/package/bluebird.md) ^3.4.7

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-01-15
- 1.0.1 — 2017-01-15

## README

![build status](https://travis-ci.org/canastro/query-paths.svg?branch=master)
[![npm version](https://badge.fury.io/js/query-paths.svg)](https://badge.fury.io/js/query-paths)
[![codecov](https://codecov.io/gh/canastro/query-paths/branch/master/graph/badge.svg)](https://codecov.io/gh/canastro/query-paths)

# query-paths
Small library to get all paths that contains one or multiple file names.

## How it works
This module is a composed by a recursive function that will travel down the root directory gathering the ones that match all the query.

## Usage
```js
var queryPaths = require('../src/index');

const first = queryPaths('/Users/username/dev', 'notfound');
first.on('data', (path) => {
    console.log('first: ', path);
});
first.on('end', () => {
    console.log('first ended');
});

const second = queryPaths('/Users/username/dev', 'package.json');
second.on('data', (path) => {
    console.log('second: ', path);
});
second.on('end', () => {
    console.log('second ended');
});

const third = queryPaths('/Users/username/dev', ['.git', 'package.json']);
third.on('data', (path) => {
    console.log('third: ', path);
});
third.on('end', () => {
    console.log('third ended');
});
```

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