# simple-walker

> simple-walker is a nodejs synchronous walker to search files inside dirs. It's specially designed to load dynamic files, like routes, modules, etc.

Latest version **0.2.2** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-walker
pnpm add simple-walker
yarn add simple-walker
bun add simple-walker
```

## 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.2.2 |
| Published | 2019-04-16 |
| First published | 2016-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Francisco Hidalgo |
| Maintainers | lammoth |
| Keywords | walk, tree, directory, files, walker, path, search, match |

## Links

- npm: https://www.npmjs.com/package/simple-walker
- Repository: https://github.com/lammoth/simple-walker
- Homepage: https://github.com/lammoth/simple-walker#readme
- Issues: https://github.com/lammoth/simple-walker/issues
- npm.io page: https://npm.io/package/simple-walker

## Dependencies (2)

- [walk](https://npm.io/package/walk.md) ^2.3.9
- [minimist](https://npm.io/package/minimist.md) ^1.2.0

## 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

- 0.2.2 (latest) — 2019-04-16
- 0.2.1 — 2019-04-03
- 0.2.0 — 2019-04-03
- 0.1.2 — 2016-08-19
- 0.1.1 — 2016-08-18
- 0.1.0 — 2016-08-18

## README

# simple-walker

simple-walker is a nodejs synchronous walker to search files inside dirs. It's specially designed to load dynamic files, like routes, modules, etc. 

### Installation

You can download the repository or simply install this module through npm:

    npm install simple-walker

### Usage

Include the module through `import`: 

    import walker from 'simple-walker';

You then have a reference to a function, which takes the following arguments:

    walker ( path, dirname, filename );

Whereas `path` is the location to inspect, `dirname` is the dirname to search and `filename` is the filename to search inside dirname.

### Example

```javascript
  // Import the package
  import walker from 'simple-walker';
  
  // Apps endopoints
  const appsRoutes = walker(
    path.join('/project_name', '/apps'),
    'endpoints',
    'routes.js'
  );
  
  export default function(app) {
    // Initialize Express's routes
    for (let route of appsRoutes) {
      app.use(`/api/v1/`, require(route.path));
    }
  }
```

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