magica
Version:
ImageMagick for browser and Node.js, easy setup, high level API and Command Line Interface, including WASM binary for an easy setup.
25 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const misc_utils_of_mine_generic_1 = require("misc-utils-of-mine-generic");
let params;
let src;
/**
* This function and module needs to be loaded before of everything from index, If in the browser get this script src attribute (it's one of the way of configuring magick.wasm location).
*/
function getThisBrowserScriptTagSrc() {
if (!src && misc_utils_of_mine_generic_1.inBrowser()) {
var script = document.currentScript || document.querySelector('script[src*="myscript.js"]');
src = script ? script.src : undefined;
if (src) {
params = misc_utils_of_mine_generic_1.getParametersFromUrl(src);
}
}
return script;
}
exports.getThisBrowserScriptTagSrc = getThisBrowserScriptTagSrc;
function getThisBrowserScriptTagSrcParams() {
getThisBrowserScriptTagSrc();
return params;
}
exports.getThisBrowserScriptTagSrcParams = getThisBrowserScriptTagSrcParams;
//# sourceMappingURL=magicaWasm.js.map