Skip to content

Commit

Permalink
add comments with regexr links
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Dec 15, 2024
1 parent d7d34d2 commit 9b72301
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/livecodes/compiler/import-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ import {
} from '../utils/utils';
import { compileInCompiler } from './compile-in-compiler';

// https://regexr.com/8a2j7
export const importsPattern =
/(import\s+?(?:(?:(?:[\w*\s{},\$]*)\s+from\s+?)|))((?:".*?")|(?:'.*?'))([\s]*?(?:;|$|))/g;

// https://regexr.com/8a2ja
export const dynamicImportsPattern = /(import\s*?\(\s*?((?:".*?")|(?:'.*?'))\s*?\))/g;

export const getImports = (code: string, removeSpecifier = false) =>
Expand Down

0 comments on commit 9b72301

Please sign in to comment.