# within-time

> Run Node.js files with a set timeout

Latest version **0.2.1** (published 2020-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install within-time
pnpm add within-time
yarn add within-time
bun add within-time
```

Provides the command `within-time`.

## 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.1 |
| Published | 2020-03-16 |
| First published | 2020-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | kwak123 |
| Maintainers | kwakles |
| Keywords | cli |

## Links

- npm: https://www.npmjs.com/package/within-time
- Repository: https://github.com/kwak123/within-time
- Homepage: https://github.com/kwak123/within-time#readme
- Issues: https://github.com/kwak123/within-time/issues
- npm.io page: https://npm.io/package/within-time

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2020-03-16
- 0.2.0 — 2020-03-16
- 0.1.0 — 2020-03-11
- 0.0.4 — 2020-03-11
- 0.0.3 — 2020-03-10
- 0.0.2 — 2020-03-10
- 0.0.1 — 2020-03-10

## README

![version-badge](https://img.shields.io/npm/v/within-time)

# Within Time

Within-Time was made to facilitate handling time constraints when running Node.js files. Really, it's because I got tired of using my fans as an indicator of a broken recursive function.

## Usage

With how small and focused in scope Within-Time is, I'd advise using good ol' [npx](https://www.npmjs.com/package/npx) to handle it.

### Recommended

`npx within-time <path>`

### Global

Of course, sometimes it's nice to not have to write `npx` every time, or perhaps you want to alias for maximum convenience. In that case, install via `yarn` globally and you can simply run the command.

```
yarn global add within-time
within-time <file-name>
```

You can also pass relative paths to the file

```
within-time test/scenarios/doesNotClose.js
```

```
within-time ./test/scenarios/doesNotClose.js
```

You can also pass directory paths!

```
within-time test/scenarios
```

## Upcoming

- Nested directories
  - Will need to consider resource limits, given nature of `child_process.fork`
- Configure time constraint via cli
- Prettier outputting
- Relevant examples?

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