make-fetch 2.3.3 → 2.3.4

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +4 -2
package/index.js CHANGED
@@ -11,6 +11,8 @@ module.exports = function makeFetch (handler) {
11
11
  ...(init || {}),
12
12
  url: resource
13
13
  })
14
+ } else if (resource instanceof URL) {
15
+ return fetch(resource.href, init)
14
16
  }
15
17
 
16
18
  const {
@@ -67,7 +69,7 @@ class FakeResponse {
67
69
 
68
70
  async arrayBuffer () {
69
71
  const buffer = await collectBuffers(this.body)
70
- const {byteOffset, length} = buffer
72
+ const { byteOffset, length } = buffer
71
73
  const end = byteOffset + length
72
74
  return buffer.buffer.slice(buffer.byteOffset, end)
73
75
  }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "make-fetch",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Implement your own `fetch()` with node.js streams",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "node test"
7
+ "test": "node test",
8
+ "lint": "standard --fix"
8
9
  },
9
10
  "repository": {
10
11
  "type": "git",
@@ -30,6 +31,7 @@
30
31
  "web-streams-polyfill": "^3.0.0"
31
32
  },
32
33
  "devDependencies": {
34
+ "standard": "^17.0.0",
33
35
  "tape": "^5.0.1"
34
36
  }
35
37
  }