url-factory
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Set a base url and encode params with minimum fuss. Especially useful with JSON API.", | ||
@@ -10,0 +10,0 @@ "main": "lib/index.js", |
@@ -6,3 +6,3 @@ ###Getting started: | ||
For example, at foo company, make a new file: `app/utils/fooUrl.js` | ||
``` | ||
```js | ||
import urlFactory from 'url-factory' | ||
@@ -16,3 +16,3 @@ | ||
``` | ||
```js | ||
import fetch from 'isomorphic-fetch' | ||
@@ -34,3 +34,3 @@ import fooUrl from 'app/utils/fooUrl' | ||
In `app/utils/json-api-url.js`: | ||
``` | ||
```js | ||
import urlFactory from 'url-factory' | ||
@@ -44,3 +44,3 @@ | ||
``` | ||
```js | ||
import fetch from 'isomorphic-fetch' | ||
@@ -64,3 +64,3 @@ import jsonApiUrl from 'app/utils/json-api-url' | ||
If you're just interested in the params encoding you can also import that helper by itself: | ||
``` | ||
```js | ||
import fetch from 'isomorphic-fetch' | ||
@@ -67,0 +67,0 @@ import { encodeParams } from 'url-factory' |
6825