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

lib: refactor bootstrap_node.js regular expression #10749

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 12, 2017

  • use + instead of * where one-or-more is required
  • switch from String.prototype.match() to RegExp.prototype.test()

This is a very minor refactor, but I end up on this line of code more often then I expect to and I always want to tighten it up a bit, so I'm giving in to that urge.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

lib

* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()
@Trott Trott added the lib / src Issues and PRs related to general changes in the lib or src directory. label Jan 12, 2017
@mscdex
Copy link
Contributor

mscdex commented Jan 12, 2017

@JacksonTian
Copy link
Contributor

LGTM

jasnell pushed a commit that referenced this pull request Jan 13, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: #10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
@jasnell
Copy link
Member

jasnell commented Jan 13, 2017

Landed in 20efbff

@jasnell jasnell closed this Jan 13, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: nodejs#10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 23, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: nodejs#10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: nodejs#10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: nodejs#10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: #10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* use `+` instead of `*` where one-or-more is required
* switch from String.prototype.match() to RegExp.prototype.test()

PR-URL: #10749
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
@Trott Trott deleted the bootstrap-refactor branch January 13, 2022 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants