octokat.js
octokat.js copied to clipboard
octo.fromUrl warns on query string params
It looks like fromUrl does not validate correctly query strings params. The following:
octo.fromUrl('https://api.github.com/user/repos?per_page=100&page=2')
outputs the validation warning:
BUG: Invalid Path. If this is actually a valid path then please update the URL_VALIDATOR. path=https://api.github.com/user/repos?per_page=100&page=2
Ah yes, that is a limitation of the regular expression used to match a path; it should not prevent you from being able to use Octokat (just an annoying message).
Would it make sense to only include the message when running in development mode (process.env['NODE_ENV'] !== 'production')?
Having this only for development sound great. Thanks.