Back to Explore

ljharb/set-function-length

GitHub
4 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 shows recent activity, with the last upstream push on 2025-12-30, which suggests it is not completely dormant, but the most recent published package updates in the provided feed are older (latest shown: v1.2.2 on 2024-03-09).
  • Update cadence appears slow and maintenance-oriented, with version bumps roughly every few months during early 2023 to early 2024, followed by a long stretch with no additional package updates shown after 2024-03-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.