@selkirk-systems/fetch 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,12 @@ function _checkFetchStatus(response) {
20
20
  }
21
21
  }
22
22
 
23
+ function _parseJSON(response) {
24
+ return response.text().then(function (text) {
25
+ return text ? JSON.parse(text) : {};
26
+ });
27
+ }
28
+
23
29
  function _invokeFetch(url, props) {
24
30
  if (!url) {
25
31
  throw new Error("fetch:Missing Parameter - URL");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selkirk-systems/fetch",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "A wrapper on fetch-polyfill that will work for server and client environments",
5
5
  "selkirk": {
6
6
  "bambooDeploy": "npm",
package/src/index.js CHANGED
@@ -18,6 +18,12 @@ function _checkFetchStatus(response) {
18
18
  }
19
19
  }
20
20
 
21
+ function _parseJSON(response) {
22
+ return response.text().then(function(text) {
23
+ return text ? JSON.parse(text) : {}
24
+ });
25
+ }
26
+
21
27
  function _invokeFetch(url,props) {
22
28
  if(!url) {
23
29
  throw new Error("fetch:Missing Parameter - URL");