</>PackageGraphPackageGraph

set-function-name

npmv2.0.2TypeScript

Set a function's name property

Adopt with care

set-function-name is usable, with caveats. Last published 933 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • DMaintenance: grade D, Poor — a real concern.

    Last published 933 days ago.

  • BWeight: grade B, Good.

    Pulls in 6 transitive packages, about 94 KB installed (at least — some of the tree is still being crawled).

  • ASupply chain: grade A, Excellent.

    No install scripts, 2 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding set-function-name to a project.

4
Direct dependencies

Runtime packages this one declares itself.

6
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

94 KB
Install size

Unpacked size of this package plus its entire runtime tree.

2
Tree depth

Longest resolved dependency chain below this package.

Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.

Licenses in the dependency tree

MIT

Every license you inherit by installing set-function-name, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >= 0.4
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the set-function-name README.

javascriptFull README ↗
var setFunctionName = require('set-function-name');
var assert = require('assert');

const obj = {
    concise() {},
    arrow: () => {},
    named: function named() {},
    anon: function () {},
};
assert.equal(obj.concise.name, 'concise');
assert.equal(obj.arrow.name, 'arrow');
assert.equal(obj.named.name, 'named');
assert.equal(obj.anon.name, 'anon');
Example truncated — see the full README.

set-function-name vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
set-function-namethis page01MIT2 years ago
set-function-length01MIT1 day ago
functions-have-names05MIT1 day ago
callsites136.7M1MIT1 day ago
once109.6M1ISC1 day ago
reusify91M1MIT1 day ago

Dependencies

Declared by set-function-name v2.0.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (31)

@ljharb/eslint-config ^21.1.0@types/call-bind ^1.0.5@types/define-properties ^1.1.5@types/es-value-fixtures ^1.4.4@types/for-each ^0.3.3@types/function.prototype.name ^1.1.3@types/functions-have-names ^1.2.2@types/has-property-descriptors ^1.0.3@types/make-arrow-function ^1.2.2@types/make-async-function ^1.0.2@types/make-async-generator-function ^1.0.3@types/make-generator-function ^2.0.3@types/object-inspect ^1.8.4@types/tape ^5.6.4aud ^2.0.4auto-changelog ^2.4.0es-value-fixtures ^1.4.2eslint =8.8.0evalmd ^0.0.19for-each ^0.3.3function.prototype.name ^1.1.6in-publish ^2.0.1make-arrow-function ^1.2.0make-async-function ^1.0.0make-async-generator-function ^1.0.0make-generator-function ^2.0.0npmignore ^0.3.1object-inspect ^1.13.1safe-publish-latest ^2.0.0tape ^5.7.5typescript next

Used by

Popular packages that depend on set-function-name.

Relationship graph

Dependencies (left) and dependents (right) of set-function-name.

Frequently installed together

Release history

No releases in the last two years, typically about 160 days apart.

Recent versions of set-function-name
VersionPublishedSizeLicense
2.0.2latest2 years ago16 KBMIT
2.0.13 years ago9.9 KBMIT
2.0.03 years ago9.7 KBMIT
1.0.09 years agoISC

Overview

set-function-name is an npm package that set a function's name property. It has 1 known dependents in the graph. The latest version is 2.0.2, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need set a function's name property and value a focused solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • Large dependency tree (35 direct dependencies) increases install size and audit surface.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use set-function-name?

set-function-name is usable, with caveats. Last published 933 days ago.

How do I install set-function-name?

Run `npm install set-function-name` to add set-function-name to your npm project.

How many dependencies does set-function-name have?

set-function-name declares 35 direct dependencies and pulls in 6 packages in total once its runtime tree is resolved totalling about 94 KB on disk.

What license is set-function-name released under?

set-function-name is distributed under the MIT license.

How popular is set-function-name?

npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on set-function-name.

Is set-function-name still maintained?

The most recent release of set-function-name (v2.0.2) was published 2 years ago.

Does set-function-name run install scripts?

No. set-function-name does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.