{"id":27944913,"url":"https://github.com/es-shims/string.prototype.trimend","last_synced_at":"2025-10-24T00:25:50.757Z","repository":{"id":54735992,"uuid":"114682758","full_name":"es-shims/String.prototype.trimEnd","owner":"es-shims","description":"ES2019 spec-compliant String.prototype.trimEnd shim","archived":false,"fork":false,"pushed_at":"2024-12-11T18:20:42.000Z","size":128,"stargazers_count":5,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T12:55:04.695Z","etag":null,"topics":["ecmascript","es6","es7","es8","polyfill","proposal","string","tc39","trim"],"latest_commit_sha":null,"homepage":"https://github.com/tc39/proposal-string-left-right-trim","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/es-shims.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["ljharb"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"npm/es5-shim","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-12-18T20:04:00.000Z","updated_at":"2024-12-11T18:20:46.000Z","dependencies_parsed_at":"2022-08-14T01:10:52.957Z","dependency_job_id":"da0d97c1-98f5-44c6-a512-b2f024b00bc4","html_url":"https://github.com/es-shims/String.prototype.trimEnd","commit_stats":{"total_commits":64,"total_committers":2,"mean_commits":32.0,"dds":0.078125,"last_synced_commit":"f46c829985a3c78e92482247fe30800781b4a9e3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FString.prototype.trimEnd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FString.prototype.trimEnd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FString.prototype.trimEnd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/es-shims%2FString.prototype.trimEnd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/es-shims","download_url":"https://codeload.github.com/es-shims/String.prototype.trimEnd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252882789,"owners_count":21819154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecmascript","es6","es7","es8","polyfill","proposal","string","tc39","trim"],"created_at":"2025-05-07T12:55:11.263Z","updated_at":"2025-10-24T00:25:50.639Z","avatar_url":"https://github.com/es-shims.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ljharb","https://tidelift.com/funding/github/npm/es5-shim"],"categories":[],"sub_categories":[],"readme":"# String.prototype.trimEnd \u003csup\u003e[![Version Badge][npm-version-svg]][package-url]\u003c/sup\u003e\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ES2019-spec-compliant `String.prototype.trimEnd` shim. Invoke its \"shim\" method to shim `String.prototype.trimEnd` if it is unavailable.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s.\n\nMost common usage:\n```js\nvar trimEnd = require('string.prototype.trimend');\n\nassert(trimEnd(' \\t\\na \\t\\n') === 'a \\t\\n');\n\nif (!String.prototype.trimEnd) {\n\ttrimEnd.shim();\n}\n\nassert(trimEnd(' \\t\\na \\t\\n ') === ' \\t\\na \\t\\n '.trimEnd());\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.com/package/string.prototype.trimend\n[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimEnd.svg\n[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimEnd.svg\n[deps-url]: https://david-dm.org/es-shims/String.prototype.trimEnd\n[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimEnd/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimEnd#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/string.prototype.trimend.png?downloads=true\u0026stars=true\n[license-image]: https://img.shields.io/npm/l/string.prototype.trimend.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimend.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimend\n[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimEnd/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimEnd/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimEnd\n[actions-url]: https://github.com/es-shims/String.prototype.trimEnd/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fstring.prototype.trimend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fes-shims%2Fstring.prototype.trimend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fes-shims%2Fstring.prototype.trimend/lists"}