UNPKG

surrogate

Version:

Object method hooks made easy

68 lines (60 loc) 3.74 kB
import {determineWhich as $5a2a6178abf8fddd$export$8eec127a839d06d3, manageAsyncDecorator as $5a2a6178abf8fddd$export$96e2c81bb82b5871, manageDecorator as $5a2a6178abf8fddd$export$50613b79e775cc76} from "./surrogate.5a994c10.js"; import {SurrogateClassWrapper as $2d7781ab0a000147$export$192df6a0a4406daf} from "./surrogate.2bacf83e.js"; import {HookType as $96586206eab52612$export$b3a402ce9f993bc7} from "./surrogate.5d082a84.js"; import {asArray as $70Ex7$asArray} from "@jfrazx/asarray"; const $8c8dfddb277f0f53$export$77f5c3e0367f966c = (delegateOptions = {})=>(klass)=>(0, $2d7781ab0a000147$export$192df6a0a4406daf).wrap(klass, delegateOptions); const $8c8dfddb277f0f53$export$1f9b64d402a3fb21 = (forOptions)=>{ return (target, event)=>{ (0, $70Ex7$asArray)(forOptions).forEach((forOption)=>{ const { type: type, options: options } = forOption; const which = (0, $5a2a6178abf8fddd$export$8eec127a839d06d3)(type); which.forEach((type)=>(0, $5a2a6178abf8fddd$export$50613b79e775cc76)(type, options)(target, event)); }); }; }; const $8c8dfddb277f0f53$export$a8245ad049bb720d = (decoratorOptions)=>{ return (target, event)=>{ (0, $70Ex7$asArray)(decoratorOptions).forEach((options)=>$8c8dfddb277f0f53$export$1f9b64d402a3fb21({ options: options, type: (0, $96586206eab52612$export$b3a402ce9f993bc7).BOTH })(target, event)); }; }; const $8c8dfddb277f0f53$export$b5c512486cbae3c6 = (decoratorOptions)=>{ const forOptions = (0, $70Ex7$asArray)(decoratorOptions).map((options)=>({ options: options, type: (0, $96586206eab52612$export$b3a402ce9f993bc7).PRE })); return $8c8dfddb277f0f53$export$1f9b64d402a3fb21(forOptions); }; const $8c8dfddb277f0f53$export$93f947839a6a102 = (decoratorOptions)=>{ const forOptions = (0, $70Ex7$asArray)(decoratorOptions).map((options)=>({ options: options, type: (0, $96586206eab52612$export$b3a402ce9f993bc7).POST })); return $8c8dfddb277f0f53$export$1f9b64d402a3fb21(forOptions); }; const $8c8dfddb277f0f53$export$3ad5cc69cb842db3 = (decoratorOptions)=>{ const which = [ (0, $96586206eab52612$export$b3a402ce9f993bc7).PRE, (0, $96586206eab52612$export$b3a402ce9f993bc7).POST ]; return (target, event)=>{ which.forEach((type)=>$8c8dfddb277f0f53$var$surrogateAsyncHelper(type, decoratorOptions)(target, event)); }; }; const $8c8dfddb277f0f53$export$ffe0d28f562faea6 = (decoratorOptions)=>{ return $8c8dfddb277f0f53$var$surrogateAsyncHelper((0, $96586206eab52612$export$b3a402ce9f993bc7).POST, decoratorOptions); }; const $8c8dfddb277f0f53$export$2953b6adc68fccd3 = (decoratorOptions)=>{ return $8c8dfddb277f0f53$var$surrogateAsyncHelper((0, $96586206eab52612$export$b3a402ce9f993bc7).PRE, decoratorOptions); }; const $8c8dfddb277f0f53$var$surrogateAsyncHelper = (type, asyncOptions)=>{ return (target, event)=>{ (0, $70Ex7$asArray)(asyncOptions).forEach((options)=>{ (0, $5a2a6178abf8fddd$export$96e2c81bb82b5871)(type, options)(target, event); }); }; }; export {$8c8dfddb277f0f53$export$77f5c3e0367f966c as SurrogateDelegate, $8c8dfddb277f0f53$export$1f9b64d402a3fb21 as SurrogateFor, $8c8dfddb277f0f53$export$a8245ad049bb720d as SurrogatePreAndPost, $8c8dfddb277f0f53$export$b5c512486cbae3c6 as SurrogatePre, $8c8dfddb277f0f53$export$93f947839a6a102 as SurrogatePost, $8c8dfddb277f0f53$export$3ad5cc69cb842db3 as SurrogateAsyncPreAndPost, $8c8dfddb277f0f53$export$ffe0d28f562faea6 as SurrogateAsyncPost, $8c8dfddb277f0f53$export$2953b6adc68fccd3 as SurrogateAsyncPre}; //# sourceMappingURL=surrogate.a55adb21.js.map