bare-url 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/parse.js CHANGED
@@ -95,7 +95,7 @@ module.exports = function parse (
95
95
  } else if (!stateOverride) {
96
96
  buffer = ''
97
97
  state = constants.STATE_NO_SCHEME
98
- pointer = 0
98
+ pointer = -1
99
99
  } else {
100
100
  throw errors.INVALID_URL()
101
101
  }
package/lib/serialize.js CHANGED
@@ -2,7 +2,7 @@
2
2
  module.exports = function serialize (url, excludeFragment = false) {
3
3
  let output = url.scheme + ':'
4
4
 
5
- if (url.host) {
5
+ if (url.host !== null) {
6
6
  output += '//'
7
7
 
8
8
  if (url.username !== '' || url.password !== '') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-url",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "URL parser for JavaScript",
5
5
  "main": "index.js",
6
6
  "files": [