Skip to content

Can I use version 7 in the browser? #140

@charbugs

Description

@charbugs

The readme says:

If you need to use this in the browser, use version 4: npm i normalize-url@4

I scanned the index.js of version 7 and it seems to me that there are no Node-specific APIs involved. I also did a quick check which seems to work at first glance:

<script type="module">
    import normalizeUrl from './node_modules/normalize-url/index.js'
    console.log(normalizeUrl('foo.bar'))
</script>

So is it save to use version 7 in the browser?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions