mnemonica 0.9.942 → 0.9.943
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.
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, '__esModule', { value : true });
|
|
3
3
|
const compileNewModificatorFunctionBody = function (FunctionName, asClass = false) {
|
|
4
|
+
const dt = `${Date.now()}_${`${Math.random()}`.split('.')[1]}`;
|
|
4
5
|
const modString = asClass ?
|
|
5
|
-
`class ${FunctionName} extends
|
|
6
|
+
`class ${FunctionName} extends ConstructHandler_${dt} {
|
|
6
7
|
constructor(...args) {
|
|
7
8
|
const answer = super(...args);
|
|
8
|
-
return
|
|
9
|
+
return CreationHandler_${dt}.call(this, answer);
|
|
9
10
|
}
|
|
10
11
|
}`
|
|
11
12
|
:
|
|
12
13
|
`const ${FunctionName} = function (...args) {
|
|
13
|
-
const answer =
|
|
14
|
-
return
|
|
14
|
+
const answer = ConstructHandler_${dt}.call(this, ...args);
|
|
15
|
+
return CreationHandler_${dt}.call(this, answer);
|
|
15
16
|
};`;
|
|
16
|
-
return new Function(
|
|
17
|
+
return new Function(`ConstructHandler_${dt}`, `CreationHandler_${dt}`, 'SymbolConstructorName', `return function () {
|
|
17
18
|
|
|
18
19
|
${modString}
|
|
19
20
|
|