We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a86ce05 commit 78a0088Copy full SHA for 78a0088
1 file changed
index.js
@@ -0,0 +1,11 @@
1
+
2
+// no idea what these regular expressions do,
3
+// but i extracted it from https://github.com/yahoo/js-module-formats/blob/master/index.js#L18
4
+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]*))/;
5
6
+var ES6AliasRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(export\s*\*\s*from\s*(?:'([^']+)'|"([^"]+)"))/;
7
8
+module.exports = function (sauce) {
9
+ return ES6ImportExportRegExp.test(sauce)
10
+ || ES6AliasRegExp.test(sauce);
11
+};
0 commit comments