feat(isURL): add `allow_fragments` and `allow_query_components` by cowboy-bebug ยท Pull Request #1721 ยท validatorjs/validator.js

@cowboy-bebug

Hi there ๐Ÿ‘‹

Contributing a couple of options for isURL to make it more flexible:

  • allow_fragments
    • true by default
    • if set to false, isURL returns false if # is present in url
  • allow_query_components
    • true by default
    • if set to false, isURL returns false if ? or & is present in url

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@cowboy-bebug

@codecov

@cowboy-bebug

tux-tn

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @cowboy-bebug and congrats for your first contribution here ๐Ÿ‘ !
LGTM ๐ŸŽ‰

@cowboy-bebug

Thanks @tux-tn!
When could I expect this to be published? I'd like to consume it as soon as we can ๐Ÿ˜„

profnandaa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contrib! ๐ŸŽ‰