mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-23 16:44:59 +03:00
рефакторинг
This commit is contained in:
parent
c3525905d2
commit
e607b0cd6b
22
dist/1.crypto-pro.js
vendored
22
dist/1.crypto-pro.js
vendored
@ -604,26 +604,32 @@ webpackJsonpCryptoPro([1],[
|
||||
];
|
||||
|
||||
function execute(cb) {
|
||||
var canAsync = cadesplugin.CreateObjectAsync;
|
||||
|
||||
cb = String(cb);
|
||||
|
||||
var args = cb.match(/^function\s*?\((.*?)\)/);
|
||||
|
||||
args = (args && args[1]) || '';
|
||||
|
||||
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
|
||||
function GeneratorFunction() {
|
||||
return (new Function('', 'return Object.getPrototypeOf(function*(){}).constructor'))();
|
||||
}
|
||||
|
||||
if (cadesplugin.CreateObjectAsync) {
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
cb = String(new (canAsync ? GeneratorFunction() : Function)(args, cb));
|
||||
|
||||
cb = String(new (GeneratorFunction())(args, cb));
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'cadesplugin.CreateObject' + (canAsync ? 'Async' : '') + '$1');
|
||||
cb = cb.replace(/("|')(yield)(\1)\s*?\+\s*?\b/gm, canAsync ? '$2 ' : '');
|
||||
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'cadesplugin.CreateObjectAsync$1');
|
||||
cb = cb.replace(/("|')(yield)(\1)\s*?\+\s*?\b/gm, '$2 ');
|
||||
|
||||
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||
if (!canAsync) {
|
||||
cb = cb.replace(/propset_(.*?)\((.*?)\)/gm, '.$1 = $2');
|
||||
}
|
||||
|
||||
return canAsync ?
|
||||
'cadesplugin.async_spawn(' + cb + ');'
|
||||
: '(' + cb + ')();';
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
dist/1.crypto-pro.js.map
vendored
2
dist/1.crypto-pro.js.map
vendored
File diff suppressed because one or more lines are too long
22
dist/2.crypto-pro.js
vendored
22
dist/2.crypto-pro.js
vendored
@ -47,26 +47,32 @@ webpackJsonpCryptoPro([2],[
|
||||
];
|
||||
|
||||
function execute(cb) {
|
||||
var canAsync = cadesplugin.CreateObjectAsync;
|
||||
|
||||
cb = String(cb);
|
||||
|
||||
var args = cb.match(/^function\s*?\((.*?)\)/);
|
||||
|
||||
args = (args && args[1]) || '';
|
||||
|
||||
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
|
||||
function GeneratorFunction() {
|
||||
return (new Function('', 'return Object.getPrototypeOf(function*(){}).constructor'))();
|
||||
}
|
||||
|
||||
if (cadesplugin.CreateObjectAsync) {
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
cb = String(new (canAsync ? GeneratorFunction() : Function)(args, cb));
|
||||
|
||||
cb = String(new (GeneratorFunction())(args, cb));
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'cadesplugin.CreateObject' + (canAsync ? 'Async' : '') + '$1');
|
||||
cb = cb.replace(/("|')(yield)(\1)\s*?\+\s*?\b/gm, canAsync ? '$2 ' : '');
|
||||
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'cadesplugin.CreateObjectAsync$1');
|
||||
cb = cb.replace(/("|')(yield)(\1)\s*?\+\s*?\b/gm, '$2 ');
|
||||
|
||||
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||
if (!canAsync) {
|
||||
cb = cb.replace(/propset_(.*?)\((.*?)\)/gm, '.$1 = $2');
|
||||
}
|
||||
|
||||
return canAsync ?
|
||||
'cadesplugin.async_spawn(' + cb + ');'
|
||||
: '(' + cb + ')();';
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
dist/2.crypto-pro.js.map
vendored
2
dist/2.crypto-pro.js.map
vendored
File diff suppressed because one or more lines are too long
@ -38,26 +38,32 @@ var subjectNameTagsTranslations = [
|
||||
];
|
||||
|
||||
function execute(cb) {
|
||||
var canAsync = cadesplugin.CreateObjectAsync;
|
||||
|
||||
cb = String(cb);
|
||||
|
||||
var args = cb.match(/^function\s*?\((.*?)\)/);
|
||||
|
||||
args = (args && args[1]) || '';
|
||||
|
||||
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
|
||||
function GeneratorFunction() {
|
||||
return (new Function('', 'return Object.getPrototypeOf(function*(){}).constructor'))();
|
||||
}
|
||||
|
||||
if (cadesplugin.CreateObjectAsync) {
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
cb = String(new (canAsync ? GeneratorFunction() : Function)(args, cb));
|
||||
|
||||
cb = String(new (GeneratorFunction())(args, cb));
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'cadesplugin.CreateObject' + (canAsync ? 'Async' : '') + '$1');
|
||||
cb = cb.replace(/("|')(yield)(\1)\s*?\+\s*?\b/gm, canAsync ? '$2 ' : '');
|
||||
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'cadesplugin.CreateObjectAsync$1');
|
||||
cb = cb.replace(/("|')(yield)(\1)\s*?\+\s*?\b/gm, '$2 ');
|
||||
|
||||
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||
if (!canAsync) {
|
||||
cb = cb.replace(/propset_(.*?)\((.*?)\)/gm, '.$1 = $2');
|
||||
}
|
||||
|
||||
return canAsync ?
|
||||
'cadesplugin.async_spawn(' + cb + ');'
|
||||
: '(' + cb + ')();';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user