<commit_before># query-string [![Build Status](https://secure.travis-ci.org/sindresorhus/query-string.png?branch=master)](http://travis-ci.org/sindresorhus/query-string)

> Parse and stringify URL [query strings](http://en.wikipedia.org/wiki/Query_string)


## Install

Download [manually](https://github.com/sindresorhus/query-string/releases) or with a package-manager.

#### [npm](https://npmjs.org/package/query-string)

```
npm install --save query-string
```

#### [Bower](http://bower.io)

```
bower install --save query-string
```

#### [Component](https://github.com/component/component)

```
component install sindresorhus/query-string
```


## Example using Node.js

```js
var queryString = require('query-string');

var url = 'http://sindresorhus.com?foo=bar'.split('?');
var parsed = queryString.parse(url[1]);
console.log(parsed);
// {foo: 'bar'}

parsed.foo = 'unicorn';
parsed.ilike = 'pizza';
console.log(url[0] + '?' + queryString.stringify(parsed));
// http://sindresorhus.com?foo=unicorn&ilike=pizza
```


## API

### queryString.parse()

Parse a query string into an object.

### queryString.stringify()

Stringify an object into a query string.


## License

MIT © [<NAME>](http://sindresorhus.com)<commit_msg>Add example for use with Bower and browser<commit_after># query-string [![Build Status](https://secure.travis-ci.org/sindresorhus/query-string.png?branch=master)](http://travis-ci.org/sindresorhus/query-string)

> Parse and stringify URL [query strings](http://en.wikipedia.org/wiki/Query_string)


## Install

Download [manually](https://github.com/sindresorhus/query-string/releases) or with a package-manager.

#### [npm](https://npmjs.org/package/query-string)

```
npm install --save query-string
```

#### [Bower](http://bower.io)

```
bower install --save query-string
```

#### [Component](https://github.com/component/component)

```
component install sindresorhus/query-string
```


## Examples

### Node.js

```js
var queryString = require('query-string');

var url = 'http://sindresorhus.com?foo=bar'.split('?');
var parsed = queryString.parse(url[1]);
console.log(parsed);
// {foo: 'bar'}

parsed.foo = 'unicorn';
parsed.ilike = 'pizza';
console.log(url[0] + '?' + queryString.stringify(parsed));
// http://sindresorhus.com?foo=unicorn&ilike=pizza
```

### Bower

```html
<script src="bower_components/query-string/query-string.js"></script>
```

```js
console.log(location.search);
// http://sindresorhus.com?foo=bar

var parsed = queryString.parse(location.search);
console.log(parsed);
// {foo: 'bar'}

parsed.foo = 'unicorn';
parsed.ilike = 'pizza';
location.search = queryString.stringify(parsed);

console.log(location.search);
// http://sindresorhus.com?foo=unicorn&ilike=pizza
```


## API

### queryString.parse()

Parse a query string into an object.

### queryString.stringify()

Stringify an object into a query string.


## License

MIT © [<NAME>](http://sindresorhus.com)
{'fraction_non_alphanumeric': 0.19658703071672354, 'fraction_numerical': 0.0013651877133105802, 'mean_word_length': 5.043298969072165, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2693799', 'n_tokens_mistral': 1047, 'n_tokens_neox': 1017, 'n_words': 176}