Skip to content

url: use private properties for brand check

Rodrigo Muino Tomonari requested to merge github/fork/anonrig/url-context into main

Follow-up for the recommendation from @joyeecheung and @aduh95.

This pull request changes the error code from ERR_INVALID_THIS to error name TypeError. This is mostly done to improve the performance and reduce the branches while calling any getter of the URL class. Additionally, this pull request merges isURL and isURLInstance methods.

cc @nodejs/url @nodejs/performance

Merge request reports

Loading