# noop-ts

> A very simple "do nothing" JavaScript function, compatible with TypeScript.

Latest version **1.0.7** (published 2023-10-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install noop-ts
pnpm add noop-ts
yarn add noop-ts
bun add noop-ts
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2023-10-01 |
| First published | 2019-04-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Maxime Julian |
| Maintainers | maxime.julian |

## Links

- npm: https://www.npmjs.com/package/noop-ts
- Repository: https://github.com/therealemjy/noop-ts
- Homepage: https://github.com/therealemjy/noop-ts#readme
- Issues: https://github.com/therealemjy/noop-ts/issues
- npm.io page: https://npm.io/package/noop-ts

## Recent versions

- 1.0.7 (latest) — 2023-10-01
- 1.0.6 — 2023-01-26
- 1.0.5 — 2023-01-26
- 1.0.4 — 2022-09-23
- 1.0.3 — 2019-08-04
- 1.0.2 — 2019-04-17
- 1.0.1 — 2019-04-17
- 1.0.0 — 2019-04-17

## README

# noop-ts

A very simple "do nothing" JavaScript function, compatible with TypeScript.
Since the noop accepts any arguments (and does nothing in return), it can be used as a replacement of any function passed as a parameter to another function or a property of a web/React/Angular/(...) component.

That can be particularly useful for unit tests, for example to test a React component:

```javascript
import noop from 'noop-ts';

describe('MyComponent', () => {
  it('does what I want it to do', () => {
    const component = shallow(<MyComponent onChange={noop} />);
    expect(component).toMatchSnapshot();
  });
});
```

## Installation

### npm

```
npm install noop-ts --save-dev
```

### yarn

```
yarn add noop-ts --dev
```

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