# time-object

> Wrap an object&#39;s functions such that each one logs execution time

Latest version **1.0.2** (published 2016-05-27) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2016-05-27 |
| First published | 2016-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dustin Specker |
| Maintainers | dustinspecker |
| Keywords | time, object, debug |

## Links

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

## Dependencies (1)

- [is-plain-obj](https://npm.io/package/is-plain-obj.md) ^1.1.0

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

- 1.0.2 (latest) — 2016-05-27
- 1.0.1 — 2016-05-26
- 1.0.0 — 2016-05-26

## README

# time-object
[![NPM version](https://badge.fury.io/js/time-object.svg)](https://badge.fury.io/js/time-object)
[![Build Status](https://travis-ci.org/dustinspecker/time-object.svg?branch=master)](https://travis-ci.org/dustinspecker/time-object)
[![Coverage Status](https://img.shields.io/coveralls/dustinspecker/time-object.svg)](https://coveralls.io/r/dustinspecker/time-object?branch=master)

[![Code Climate](https://codeclimate.com/github/dustinspecker/time-object/badges/gpa.svg)](https://codeclimate.com/github/dustinspecker/time-object)
[![Dependencies](https://david-dm.org/dustinspecker/time-object.svg)](https://david-dm.org/dustinspecker/time-object/#info=dependencies&view=table)
[![DevDependencies](https://david-dm.org/dustinspecker/time-object/dev-status.svg)](https://david-dm.org/dustinspecker/time-object/#info=devDependencies&view=table)

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

> Wrap an object's functions such that each one logs execution time

## Install
```
npm install --save time-object
```

## Usage
```javascript
import timeObject from 'time-object'

const obj = {
  value: 'hello',
  func1() {
    return 'hello'
  },
  func2() {
    return 'bye'
  }
}

timeObject(obj)

obj.func1()
// func1: 0.052ms
// => 'hello'

obj.func2()
// func2: 0.052ms
// => 'bye'
```

## API
### timeObject(obj)

Wraps the functions on an object such that each one logs execution time.

#### obj

type: `object`

The object to wrap.

## LICENSE
MIT © [Dustin Specker](https://github.com/dustinspecker)

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