Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Add String.prototype.{trimStart/trimEnd} (+ trimLeft/trimRight) #1275

merged 2 commits into from Feb 20, 2019


Copy link

commented Jul 25, 2018

This is a pull request for the stage 3 proposal The proposal is/was championed by @sebmarkbage.

test262 tests: yes, tc39/test262@5931e31 and others


ES5 standardized String.prototype.trim. All major engines have also implemented corresponding trimLeft and trimRight functions - without any standard specification.
For consistency with padStart/padEnd we propose trimStart and trimEnd and trimLeft/trimRight as aliases required for web compatibility.

Review notes

I wasn't quite sure where to put TrimString, but this follows String.prototype.replace with GetSubstitution by putting it inline.

@evilpie evilpie referenced this pull request Jul 25, 2018
7 of 8 tasks complete
ljharb approved these changes Jul 25, 2018
@ljharb ljharb requested review from bterlson, sebmarkbage and bmeck Jul 25, 2018
@ljharb ljharb added the has tests label Jul 25, 2018
spec.html Show resolved Hide resolved

This comment has been minimized.

Copy link

commented Oct 18, 2018

Looks like this proposal is ready for Stage 4 (modulo editor reviews and @claudepache 's comment). Does anyone want to take on presenting it in the November 2018 TC39 meeting?


This comment has been minimized.

Copy link

commented Oct 18, 2018

@evilpie @sebmarkbage Feel free to reach out to me in case you cannot make it to the meeting. Happy to present it on your behalf.

@ljharb ljharb requested a review from tc39/ecma262-editors Oct 24, 2018
@mathiasbynens mathiasbynens referenced this pull request Dec 5, 2018
@targos targos referenced this pull request Jan 30, 2019
13 of 14 tasks complete
@ljharb ljharb added has stage 4 and removed pending stage 4 labels Jan 30, 2019
@ljharb ljharb requested review from zenparsing and tc39/ecma262-editors Jan 30, 2019
@ljharb ljharb added the es2019 label Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.