npm/npm-package-arg — pull request #5 by TheAlphaNerd (2014-08-19 08:43:56+00:00)
Title: [fix #4] Modify maybeGitHubShorthand regex

the regex in maybeGitHubShorthand current fails when provided a branch with multiple slashes. This is due to the current regex testing for a spec that only ever had a single slash.

I have added a second regular expression that checks for a pattern with multiple slashes following a hash. I believe this could potentially be done more elegantly, as a single regular expression, but was unable to figure it out.

There are two tests included in test/basic.js to ensure that the provided regex works as expected.