timerify
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

⏱️ timerify

CI npm downloads size codecov docs license

A simple, zero-config wrapper for measuring the runtime of synchronous and asynchronous functions.

Installation

Install timerify via npm:

npm install timerify

Usage

JavaScript/TypeScript

Wrap a function to measure its runtime:

import { timerify } from 'timerify';

const slow = timerify(async () => await fetch(url), 'fetch');
await slow();

CLI

Measure the runtime of a function via the command line:

npx timerify src/job.ts runJob

Features

  • Zero-Config: No setup required; just wrap your function and measure.
  • Sync/Async Support: Works with both synchronous and asynchronous functions.
  • CLI Integration: Run measurements directly from the command line.

License

MIT License

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Support

If you encounter issues or have questions, file an issue on the GitHub repository.

Package Sidebar

Install

npm i timerify

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

360 kB

Total Files

45

Last publish

Collaborators

  • lwensveen