<commit_before>jfetch
=======

jfetch is a small library that assumes that all fetch calls are json based.


# Install

```javascript
npm install --save jfetch
```

# Usage

```javascript

import jfetch from 'jfetch';

jfetch.get('/somewhere').then ( res => {
    console.log('res here is json' , res);
});

jfetch.post('/post/path', {id:1, name: 'Name', data: []}).then ( res => {
    console.log('res here is result of the post' , res);
});

```

By default jfetch auto busts get requests. If needed you can build that will have a different config.

```javascript
import { createjFetch } from 'jfetch';

const jfetch = createJFetch({autoBust: false});
jfetch.get('/somewhere'); # no url busts
```<commit_msg>updated documentation<commit_after>jfetch
=======

jfetch is a small library that assumes that all fetch calls are json based.


# Install

```javascript
npm install --save jfetch
```

# Usage

```javascript

import jfetch from 'jfetch';

jfetch.get('/somewhere').then ( res => {
    console.log('res here is json object' , res);
});

jfetch.post('/post/path', {id:1, name: 'Name', data: []}).then ( res => {
    console.log('res here is result of the post - translated to json' , res);
});

```

By default jfetch auto busts get requests. If needed you can build that will have a different config.

```javascript
import { createjFetch } from 'jfetch';

const jfetch = createJFetch({autoBust: false});
jfetch.get('/somewhere'); # no url busts
```
{'fraction_non_alphanumeric': 0.1559065934065934, 'fraction_numerical': 0.0013736263736263737, 'mean_word_length': 4.203571428571428, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4679125', 'n_tokens_mistral': 467, 'n_tokens_neox': 446, 'n_words': 165}