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

url: extend url.format to support WHATWG URL #10857

Closed
wants to merge 2 commits into from

Commits on Feb 2, 2017

  1. url: extend url.format to support WHATWG URL

    Removes the non-standard options on WHATWG URL toString
    and extends the existing url.format() API to support
    customizable serialization of the WHATWG URL object.
    
    This does not yet include the documentation updates
    because the documentation for the new WHATWG URL object
    has not yet landed.
    
    Example:
    
    ```js
    const url = require('url');
    const URL = url.URL;
    const myURL = new URL('http://example.org/?a=b#c');
    const str = url.format(myURL, {fragment: false, search: false});
    console.log(str);
      // Prints: http://example.org/
    ```
    jasnell committed Feb 2, 2017
    Configuration menu
    Copy the full SHA
    889c5f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d1d7b02 View commit details
    Browse the repository at this point in the history