# timeload

> Get time required to load your locally installed modules

Latest version **0.0.3** (published 2023-09-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install timeload
pnpm add timeload
yarn add timeload
bun add timeload
```

Provides the command `timeload`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-09-07 |
| First published | 2023-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mrozio13pl |
| Maintainers | mrozio |
| Keywords | time, load, require, execute, import, module, cli |

## Links

- npm: https://www.npmjs.com/package/timeload
- Repository: https://github.com/mrozio13pl/timeload
- Homepage: https://github.com/mrozio13pl/timeload#readme
- Issues: https://github.com/mrozio13pl/timeload/issues
- npm.io page: https://npm.io/package/timeload

## Dependencies (8)

- [unwin](https://npm.io/package/unwin.md) ^1.0.2
- [has-flag](https://npm.io/package/has-flag.md) 4.0.0
- [nice-try](https://npm.io/package/nice-try.md) ^3.0.1
- [pretty-ms](https://npm.io/package/pretty-ms.md) 7.0.1
- [ansi-regex](https://npm.io/package/ansi-regex.md) 5.0.1
- [picocolors](https://npm.io/package/picocolors.md) ^1.0.0
- [text-table](https://npm.io/package/text-table.md) ^0.2.0
- [clear-module](https://npm.io/package/clear-module.md) ^4.1.2

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2023-09-07
- 0.0.2 — 2023-09-03
- 0.0.1 — 2023-09-03

## README

# timeload

> Simply get the load time of your locally installed modules.

<img src="https://raw.githubusercontent.com/mrozio13pl/timeload/main/assets/preview.png" width="50%" height="50%" alt="preview">

## Install

Locally

```bash
$ npm i --save-dev timeload
```

or globally

```bash
$ npm i -g timeload
```

## Usage

Run this command in your current working directory:

```bash
$ timeload [options]
```

Basic example:

```bash
$ timeload

unwin        | 241µs |  7.03%
nice-try     | 266µs |  7.75%
has-flag     | 280µs |  8.15%
text-table   | 367µs | 10.67%
picocolors   | 536µs | 15.57%
pretty-ms    | 562µs | 16.33%
clear-module | 1ms   | 34.51%
Performed 5 runs.

Average load time: 3ms 443µs 960ns
Total load time: 17ms 219µs 800ns
```

## Options

### `--runs [number]`

Determine how many times should all modules be loaded to better estimate their average load time. Default is set to **5** runs.

### `--dev`

If set, it will also include `devDependencies` from your `package.json` and attempt loading them as well. Default is `false`.

### `--esm` (experimental)

If set, it will attempt to load all modules using dynamic [import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import). By default each module will be loaded using `require` unless it is an esm module.

## License

MIT

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