Back to Explore

es-shims/String.prototype.trim

GitHub
1 updates · last 90 days2 watchersOpen source

Last release:

This ES5 spec-compliant shim provides `String.prototype.trim` for JavaScript environments where it is missing. It also includes a “shim” method (`trim.shim()`) to apply the polyfill when needed, and it corrects implementations that trim zero-width spaces incorrectly.

Project status

  • The repository is actively maintained as of today, the most recent upstream push and published update are both on 2026-06-05 (v1.2.11), with code changes focused on performance improvements (right-trimming) and tooling/dependency updates.
  • The apparent update cadence is irregular: after v1.2.10 in 2024-12-11, the next update arrives about 1.5 years later on 2026-06-05, suggesting periodic maintenance rather than frequent releases.

AI summary generated

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

Recent updates

  • v1.2.11

    The publisher provided no release notes for v1.2.11. The code changes indicate a fix/refactor to improve the performance characteristics of String.prototype.trim, specifically for right-trimming, plus updates to development tooling and dependencies.

  • v1.2.10

    No release notes were provided for v1.2.10. The diff shows mostly internal refactors and dependency updates, plus CI workflow changes to expand the Node test matrix beyond Node 10-20.

  • v1.2.9

    v1.2.9 does not include publisher release notes (none provided). The shipped code changes are a refactor of internal abstract-ops dependencies plus dependency version bumps, with no apparent API surface changes.

  • v1.2.8

    Release v1.2.8 was published on 2023-09-07, but the publisher did not provide any release notes. No specific changes, breaking changes, bug fixes, or security updates can be identified from the provided information alone.

  • v1.2.7

    v1.2.7 primarily updates internal dependency usage by switching es-abstract imports from the 2021 intrinsics to the 2022 versions, and bumps related dependency versions. It also changes publishing/packaging behavior by adding an npmignore auto-generation step and updating publishConfig to ignore .github/workflows.

  • v1.2.6

    v1.2.6 changes how the String.prototype.trim shim validates the receiver and how it determines whitespace handling for U+180E (Mongolian Vowel Separator). The release notes section in the provided data is empty, so these behavioral changes are not explained there.

  • v1.2.5

    v1.2.5 updates the project mainly around CI workflow steps, README badges, and several dependency versions. In the runtime code (implementation.js), it also changes which `es-abstract` year-version modules are required.

  • v1.2.4

    v1.2.4 appears to be a maintenance release with no publisher release notes provided. The diff shows CI/workflow adjustments, documentation badge URL updates, a new .npmignore to exclude certain files from the npm package, dependency version bumps, and a small change to the test harness for shimmed behavior.

  • v1.2.3

    v1.2.3 primarily updates internal wiring for bound built-in method access (switching from es-abstract helpers to call-bind) and bumps related dependencies. There were also CI and tooling changes (GitHub Actions workflows, nyc invocation, and lint script adjustments), but no release-note text was provided to describe any of it.

  • v1.2.2

    v1.2.2 is a patch release with no release notes provided. The code changes are primarily an internal refactor to newer es-abstract helpers (2019/5 paths to 2020 paths) plus updates to test, linting, and CI configuration.

    Security
  • v1.2.1

    Release v1.2.1 was published on 2019-12-16, but the publisher did not provide any release notes. As a result, there is no actionable information here about new functionality, fixes, breaking changes, or dependency updates.