From c5a461ee858ab25a2fa2ec674c899636655182fb Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Fri, 27 Oct 2023 02:42:29 +0300 Subject: [PATCH] squash! --- Source/Function/Integration.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Function/Integration.ts b/Source/Function/Integration.ts index 90713a2..4e26727 100644 --- a/Source/Function/Integration.ts +++ b/Source/Function/Integration.ts @@ -6,14 +6,14 @@ import __Critters from "critters"; * */ export default ((...[_Option = {}]: Parameters) => { - for (const Option in _Option) { - if ( - Object.prototype.hasOwnProperty.call(_Option, Option) && - _Option[Option] === true - ) { - _Option[Option] = Default[Option as keyof typeof Default]; - } - } + Object.entries(_Option).forEach(([Key, Value]) => + Object.defineProperty(_Option, Key, { + value: + Value === true + ? Default[Key as keyof typeof Default] + : _Option[Key as keyof typeof _Option], + }) + ); const { Action, Cache, Critters, Exclude, Logger, Path } = Merge( Default,