@feathersjs/hooks
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -6,4 +6,4 @@ # Change Log | ||
# [0.8.0](https://github.com/feathersjs/hooks/compare/v0.7.6...v0.8.0) (2023-02-07) | ||
## [0.8.1](https://github.com/feathersjs/hooks/compare/v0.8.0...v0.8.1) (2023-02-10) | ||
**Note:** Version bump only for package @feathersjs/hooks |
@@ -16,2 +16,14 @@ import { copyProperties } from './utils.js'; | ||
} | ||
toJSON() { | ||
const keys = Object.keys(this); | ||
let proto = Object.getPrototypeOf(this); | ||
while (proto) { | ||
keys.push(...Object.keys(proto)); | ||
proto = Object.getPrototypeOf(proto); | ||
} | ||
return keys.reduce((result, key) => { | ||
result[key] = this[key]; | ||
return result; | ||
}, {}); | ||
} | ||
} | ||
@@ -18,0 +30,0 @@ export class HookManager { |
@@ -6,3 +6,3 @@ { | ||
"name": "@feathersjs/hooks", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Async middleware for JavaScript and TypeScript", | ||
@@ -44,3 +44,3 @@ "homepage": "https://feathersjs.com", | ||
}, | ||
"gitHead": "d1ba68f78e76d1722b6e6945ffef6a14ecd5a9c3" | ||
"gitHead": "55b910c31da8a6ad1d6e6120c38f96354fd7ae24" | ||
} |
@@ -19,2 +19,14 @@ "use strict"; | ||
} | ||
toJSON() { | ||
const keys = Object.keys(this); | ||
let proto = Object.getPrototypeOf(this); | ||
while (proto) { | ||
keys.push(...Object.keys(proto)); | ||
proto = Object.getPrototypeOf(proto); | ||
} | ||
return keys.reduce((result, key) => { | ||
result[key] = this[key]; | ||
return result; | ||
}, {}); | ||
} | ||
} | ||
@@ -21,0 +33,0 @@ exports.BaseHookContext = BaseHookContext; |
@@ -13,2 +13,3 @@ import { AsyncMiddleware } from './compose.js'; | ||
constructor(data?: HookContextData); | ||
toJSON(): this; | ||
} | ||
@@ -15,0 +16,0 @@ export interface HookContext<T = any, C = any> extends BaseHookContext<C> { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40192
1015