# yanoop

> Yet another noop utility package.

Latest version **1.0.0** (published 2014-02-09) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2014-02-09 |
| First published | 2014-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bojan Djurkovic |
| Maintainers | bojand |
| Keywords | noop, callback, util |

## Links

- npm: https://www.npmjs.com/package/yanoop
- Repository: https://github.com/bojand/yanoop
- Issues: http://github.com/bojand/yanoop/issues
- npm.io page: https://npm.io/package/yanoop

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-02-09

## README

# yanoop

Yet another noop utility package.

Provides utility functions: `noop`, `throwop`, and `doop`

```
npm install yanoop
require('yanoop');
```

## API

### `noop`

Does nothing.

```
function noop() {}
```

Use it if you are not sure a function is valid. Something like:

```
someFn = someFn || noop;
someFn();
```

### `throwop(err)`

Throws if `err` is defined.

```
function throwop(err) {
  if (err) {
    throw err;
  }
}
```

### `doop(fn)`

Tests `fn` and and calls it with the remaining given `arguments`.

```
function doop(fn) {
  if ('function' === typeof fn) {
    var args = Array.prototype.slice.call(arguments, 1);
    return fn.apply(this, args);
  }
}
```

Similar use case as `noop`. Something like:

```
doop(someFn, 1, 2, 3);
```

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