🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

g-string

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g-string - npm Package Compare versions

Comparing version

to
1.0.1

2

index.js

@@ -12,6 +12,8 @@ const queryString = require('query-string');

);
if (hash) {
query = query + '#' + hash || '';
}
return query;
};

2

package.json
{
"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
```