Travis build: 391

This commit is contained in:
Travis CI
2017-12-28 08:30:19 +00:00
parent ae7fbdc16d
commit 3cbd7040e9
141 changed files with 1389 additions and 1044 deletions

View File

@ -7,11 +7,11 @@ Pass `location.search` as the argument to apply to the current `url`.
```js
const getURLParameters = url =>
url.match(/([^?=&]+)(=([^&]*))/g).reduce(
(a, v) => (a[v.slice(0, v.indexOf('='))] = v.slice(v.indexOf('=') + 1), a), {}
);
url
.match(/([^?=&]+)(=([^&]*))/g)
.reduce((a, v) => ((a[v.slice(0, v.indexOf('='))] = v.slice(v.indexOf('=') + 1)), a), {});
```
```js
getURLParameters('http://url.com/page?name=Adam&surname=Smith') // {name: 'Adam', surname: 'Smith'}
getURLParameters('http://url.com/page?name=Adam&surname=Smith'); // {name: 'Adam', surname: 'Smith'}
```