Skip to content

doc: URL and URLSearchParams are global in node > 8.10 #139

@anchnk

Description

@anchnk

In the Stylistic Issues section, it's mentioned that both URLSearchParams and URL are defined as global variables.

I think this was introduced by this commit nodejs/node@312414662b which match release 10.0.0.

My current runtime is 8.10 (the latest version supported by AWS lambda atm). It seems that this variables were added to the global scope after that release. Should the documentation mention the version in which that was introduced ?

Also, even thought this is totally personal, I find that this sentence:

It will be readable if we use either Buffer consistently.

Would be less confusing like this (a suggestion):

Your application code base will be more readable if you use either Buffer consistently.

I am willing to do a PR in order to update the prefer-global doc to include both changes if this is relevant.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions