@ahoo-wang/fetcher 1.3.2 → 1.3.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.es.js CHANGED
@@ -16,7 +16,7 @@ function _(r, e, t) {
16
16
  return encodeURIComponent(i);
17
17
  }) : r;
18
18
  }
19
- function g(r, e) {
19
+ function q(r, e) {
20
20
  const t = [];
21
21
  let s;
22
22
  for (; (s = e.exec(r)) !== null; )
@@ -48,7 +48,7 @@ const a = class a {
48
48
  * ```
49
49
  */
50
50
  extractPathParams(e) {
51
- return g(
51
+ return q(
52
52
  e,
53
53
  a.PATH_PARAM_REGEX
54
54
  );
@@ -120,7 +120,7 @@ const L = new T(), h = class h {
120
120
  * ```
121
121
  */
122
122
  extractPathParams(e) {
123
- return g(
123
+ return q(
124
124
  e,
125
125
  h.PATH_PARAM_REGEX
126
126
  );
@@ -257,7 +257,7 @@ function G(r, e) {
257
257
  }
258
258
  async function M(r) {
259
259
  const e = r.url, t = r.timeout, s = r;
260
- if (!t)
260
+ if (r.signal || !t)
261
261
  return fetch(e, s);
262
262
  const n = new AbortController(), i = {
263
263
  ...s,
@@ -267,8 +267,8 @@ async function M(r) {
267
267
  const c = new Promise((se, N) => {
268
268
  o = setTimeout(() => {
269
269
  o && clearTimeout(o);
270
- const q = new y(r);
271
- n.abort(q), N(q);
270
+ const g = new y(r);
271
+ n.abort(g), N(g);
272
272
  }, t);
273
273
  });
274
274
  try {
@@ -1075,7 +1075,7 @@ export {
1075
1075
  M as timeoutFetch,
1076
1076
  p as toSorted,
1077
1077
  L as uriTemplateResolver,
1078
- g as urlTemplateRegexExtract,
1078
+ q as urlTemplateRegexExtract,
1079
1079
  _ as urlTemplateRegexResolve
1080
1080
  };
1081
1081
  //# sourceMappingURL=index.es.js.map