Comparing version 1.0.0 to 1.0.1
@@ -12,6 +12,8 @@ const queryString = require('query-string'); | ||
); | ||
if (hash) { | ||
query = query + '#' + hash || ''; | ||
} | ||
return query; | ||
}; |
{ | ||
"name": "g-string", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Manages query string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,2 +7,5 @@ # g-string | ||
## What does it do? | ||
Combines your current URL query with the object you pass it and returns a new query string. | ||
## Install | ||
@@ -20,6 +23,10 @@ | ||
gString({ foo: bar }) | ||
//=> http://yourcurrentdomain.com/?foo=bar | ||
//=> foo=bar | ||
gString({ foo: bar }, 'world') | ||
//=> http://yourcurrentdomain.com/?foo=bar#world | ||
gString({ hello: world }) | ||
//=> foo=bar&hello=world | ||
gString({}, 'hash') | ||
//=> foo=bar&hello=world#hash | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124838
31