Closed insanicly closed 5 years ago
module exports statement is giving error when you just want to use this as a javascript function.
This module is not intended to be used outside of a build environment.
The way you have it, you'll be adding the following variables onto the window:
invalidPrototcolRegex
ctrlCharactersRegex
urlSchemeRegex
relativeFirstCharacters
isRelativeUrl
sanitizeUrl
The only bit you're intending to add is sanitizeUrl
.
We're not going to incorporate this into the repo, as this module is intended to be used within various Braintree npm modules. However, you are free to fork the repo and use it as a standalone script tag on your page. (I recommend wrapping the whole script in a function closure and attaching sanitizeUrl
to the window explicitly to avoid leaking the other variables I mentioned above)
I don't agree but ok. I already forked it.
thanks.
…ut a packaging app like browsify etc.