Files
Philip Pfaffe ead3f105e7 node_modules: Add emscripten types and rollup node plugin
Includes a rerun of install-deps which updates some unrelated packages.

Bug: 1454724
Change-Id: I29651314ac40c985f42a3fb2bce73ece20b7236a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4632539
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kshitij Pancholi <panchok@google.com>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2023-07-28 09:28:45 +00:00

12 lines
568 B
JavaScript

// no idea what these regular expressions do,
// but i extracted it from https://github.com/yahoo/js-module-formats/blob/master/index.js#L18
var ES6ImportExportRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(import\s+['"]|(import|module)\s+[^"'\(\)\n;]+\s+from\s+['"]|export\s+(\*|\{|default|function|var|const|let|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*))/;
var ES6AliasRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(export\s*\*\s*from\s*(?:'([^']+)'|"([^"]+)"))/;
module.exports = function (sauce) {
return ES6ImportExportRegExp.test(sauce)
|| ES6AliasRegExp.test(sauce);
};