@ideal-postcodes/core-browser
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -0,1 +1,8 @@ | ||
## [1.0.2](https://github.com/ideal-postcodes/core-browser/compare/1.0.1...1.0.2) (2019-10-22) | ||
### Bug Fixes | ||
* **async:** Remove async keywords ([e0327a7](https://github.com/ideal-postcodes/core-browser/commit/e0327a7632c3ba8e9badbef5d66fd4e41e6f2821)) | ||
## [1.0.1](https://github.com/ideal-postcodes/core-browser/compare/1.0.0...1.0.1) (2019-10-21) | ||
@@ -2,0 +9,0 @@ |
@@ -5,3 +5,11 @@ "use strict"; | ||
const timed_fetch_1 = require("./timed_fetch"); | ||
/** | ||
* @hidden | ||
*/ | ||
const { IdealPostcodesError } = core_interface_1.errors; | ||
/** | ||
* Rewrites `key` `value` to uri encoded query string component | ||
* | ||
* @hidden | ||
*/ | ||
const toParam = (key, value) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; | ||
@@ -8,0 +16,0 @@ /** |
@@ -5,2 +5,7 @@ "use strict"; | ||
const { IdealPostcodesError } = core_interface_1.errors; | ||
/** | ||
* Returns Ideal Postcode timeout error | ||
* | ||
* @hidden | ||
*/ | ||
const timeoutError = (timeout, request) => new IdealPostcodesError({ | ||
@@ -18,3 +23,3 @@ message: `Request timed out after ${timeout}ms`, | ||
*/ | ||
exports.timedFetch = (request, timeout, abortController) => new Promise(async (resolve, reject) => { | ||
exports.timedFetch = (request, timeout, abortController) => new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
@@ -21,0 +26,0 @@ if (abortController) |
{ | ||
"name": "@ideal-postcodes/core-browser", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Browser javascript client for api.ideal-postcodes.co.uk", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22940
266