Back to Explore

ljharb/set-function-length

GitHub
2 watchersOpen source

Last release:

set-function-length lets you set a JavaScript function’s `length` property, taking a function, a new integer length (0 to 2**32), and an optional `loose` flag. It returns the same function after attempting the update, useful in code that needs to adjust reported arity.

Project status

  • The repository appears mostly in maintenance mode today, with the most recent tagged published update shown in the provided summaries from 2024-03-09 (v1.2.2), even though there was an upstream push on 2025-12-30. This suggests low outward-facing activity rather than active, frequent maintenance.
  • The apparent updates cadence is infrequent. Based on the listed tags, updates came in a cluster during 2023-10 to 2024-03, then there is a long gap with no further published updates in the provided information (from 2024-03-09 to at least 2026-06-09).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.2.2

    v1.2.2 has no publisher release notes provided, but the diff shows it is mainly about TypeScript declaration handling (new handwritten .d.ts files, build script changes), CI/workflow updates, and several dependency version bumps. There are no clearly visible runtime logic changes in the main implementation file from the provided diff snippet.

  • v1.2.1

    Release v1.2.1 contains a small internal refactor and dependency bumps. There are no functional API or export changes shown in the provided diff, but the way the module obtains the TypeError intrinsic has been altered.

  • v1.2.0

    Release v1.2.0 was published on 2024-01-14. No release notes were provided by the publisher, so the developer impact of this upgrade (new features, bug fixes, or breaking changes) is not documented.

  • v1.1.1

    No release notes were provided for v1.1.1, so changes are inferred from the actual diff. This release mainly updates dependency configuration and adjusts the package version, with no application code changes shown in the diff.

  • v1.1.0

    v1.1.0 of set-function-length introduces a new `./env` entry point and adjusts the core logic used by `setFunctionLength(fn, length, loose)` when deciding whether it can update a function's `length` property. It also updates tests to account for cases where the `length` descriptor is writable even if it is not configurable, and adds coverage tooling.

    Features
  • v1.0.1

    This release (v1.0.1) has no publisher-provided release notes. The code diff shows a small internal refactor in index.js plus a packaging change (adding a package.json exports map) and a new dependency (get-intrinsic).

  • v1.0.0

    This release is tagged v1.0.0, but the publisher did not provide any release notes or details about changes. As a result, the developer-visible impact (features, fixes, breaking changes, security or dependency updates) cannot be determined from the provided information alone.