# noargs-wrapper

> Wrap a function to always call it with no arguments, ignoring all arguments passed in.

Latest version **1.1.4** (published 2026-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install noargs-wrapper
pnpm add noargs-wrapper
yarn add noargs-wrapper
bun add noargs-wrapper
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2026-04-10 |
| First published | 2025-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | me |
| Maintainers | tj-commits |
| Keywords | function, wrapper, arguments, utility, ignore, minimal |

## Links

- npm: https://www.npmjs.com/package/noargs-wrapper
- Repository: https://github.com/tj-commits/noargs-wrapper
- Homepage: https://github.com/tj-commits/noargs-wrapper#readme
- Issues: https://github.com/tj-commits/noargs-wrapper/issues
- npm.io page: https://npm.io/package/noargs-wrapper

## Dependencies (5)

- [ramda.nary](https://npm.io/package/ramda.nary.md) ^0.26.1
- [number-zero](https://npm.io/package/number-zero.md) ^1.0.3
- [get-intrinsic](https://npm.io/package/get-intrinsic.md) ^1.3.0
- [es-logical-not-operator](https://npm.io/package/es-logical-not-operator.md) ^1.0.0
- [@is-(unknown)/is-function](https://npm.io/package/@is-(unknown)/is-function.md) ^1.0.3

## 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.1.4 (latest) — 2026-04-10
- 1.1.3 — 2026-03-13
- 1.1.2 — 2026-02-14
- 1.1.1 — 2026-02-14
- 1.1.0 — 2025-07-09
- 1.0.0 — 2025-07-03

## README

# noargs-wrapper

Returns a wrapper that calls a function with no arguments.

## Installation

```bash
$ npm install noargs-wrapper
```

## Usage

This function takes in a function, and returns a wrapper that calls the passed-in function with no arguments, even if arguments are passed in to the wrapper. 
Here's an example:

```js
var noargs = require('noargs-wrapper');


var isOne = v => v === 1; // a simple function to check if a value is one

var wrappedIsOne = noargs(isOne);

console.log(wrappedIsOne(1)); // always returns false because no arguments are passed in, and undefined is not one.


var isUndefined = v => v === void 0; // a simple function to check if a value is undefined

var wrappedIsUndefined = noargs(isUndefined);

console.log(wrappedIsUndefined(1)); // always returns true because no arguments are passed in, so undefined is undefined, hence true
```

## Contributing

PRs and issues are welcome on the github repository!

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