# name-of-function

> Get the name of a function.

Latest version **1.0.2** (published 2026-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install name-of-function
pnpm add name-of-function
yarn add name-of-function
bun add name-of-function
```

## Health

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

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-03-07 |
| First published | 2026-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | me |
| Maintainers | tj-commits |
| Keywords | function, name, tj-commits, jsfruit |

## Links

- npm: https://www.npmjs.com/package/name-of-function
- Repository: https://github.com/enterprise-npm-ai/name-of-function
- Homepage: https://github.com/enterprise-npm-ai/name-of-function#readme
- Issues: https://github.com/enterprise-npm-ai/name-of-function/issues
- npm.io page: https://npm.io/package/name-of-function

## Dependencies (7)

- [assert-fn](https://npm.io/package/assert-fn.md) ^1.0.2
- [attempt-x](https://npm.io/package/attempt-x.md) ^1.1.3
- [@errorstream/err](https://npm.io/package/@errorstream/err.md) ^1.1.0
- [functions-have-names](https://npm.io/package/functions-have-names.md) ^1.2.3
- [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
- [@socketregistry/functions-have-names](https://npm.io/package/@socketregistry/functions-have-names.md) ^1.0.7

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2026-03-07
- 1.0.1 — 2026-03-07
- 1.0.0 — 2026-01-16

## README

# name-of-function
Get the name of a function. Returns undefined if functions don't have names.

## Installation
```sh
npm install name-of-function
```

## Usage
```js
const getFunctionName = require("name-of-function")
getFunctionName(getFunctionName) // "getFunctionName"
getFunctionName(function e() {}) // "e"
```

## Tests
There are no tests.

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