@faasjs/http 0.0.3-beta.105 → 0.0.3-beta.107

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
@@ -371,14 +371,16 @@ var HttpError = class _HttpError extends Error {
371
371
  };
372
372
  var Name = "http";
373
373
  function deepClone(obj) {
374
- if (obj === null || typeof obj !== "object" || Array.isArray(obj))
374
+ if (obj === null || typeof obj !== "object")
375
+ return obj;
376
+ if (Array.isArray(obj))
375
377
  return JSON.parse(JSON.stringify(obj));
376
378
  const clone = {};
377
379
  for (const key in obj) {
378
380
  if (!obj.hasOwnProperty(key))
379
381
  continue;
380
382
  if (typeof obj[key] === "function") {
381
- clone[key] = obj[key].bind(clone);
383
+ clone[key] = obj[key];
382
384
  continue;
383
385
  }
384
386
  clone[key] = deepClone(obj[key]);
package/dist/index.mjs CHANGED
@@ -369,14 +369,16 @@ var HttpError = class _HttpError extends Error {
369
369
  };
370
370
  var Name = "http";
371
371
  function deepClone(obj) {
372
- if (obj === null || typeof obj !== "object" || Array.isArray(obj))
372
+ if (obj === null || typeof obj !== "object")
373
+ return obj;
374
+ if (Array.isArray(obj))
373
375
  return JSON.parse(JSON.stringify(obj));
374
376
  const clone = {};
375
377
  for (const key in obj) {
376
378
  if (!obj.hasOwnProperty(key))
377
379
  continue;
378
380
  if (typeof obj[key] === "function") {
379
- clone[key] = obj[key].bind(clone);
381
+ clone[key] = obj[key];
380
382
  continue;
381
383
  }
382
384
  clone[key] = deepClone(obj[key]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/http",
3
- "version": "0.0.3-beta.105",
3
+ "version": "0.0.3-beta.107",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@faasjs/func": "0.0.3-beta.105",
26
- "@faasjs/logger": "0.0.3-beta.105"
25
+ "@faasjs/func": "0.0.3-beta.107",
26
+ "@faasjs/logger": "0.0.3-beta.107"
27
27
  },
28
28
  "engines": {
29
29
  "npm": ">=8.0.0",