src/core.js
// import IDENTIFIER from "MODULE"
import IDENTIFIER from "MODULE"
import IDENTIFIER from " MODULE "
function handleDefaultImport() {
    LOOKING_FOR = "import name for default import";
    const identifierStart = pos + 7; 
    const identifierEnd = str.indexWithin(" ", identifierStart, DISTANCE);
    LOOKING_FOR = "name of imported module for import*";
    let moduleStart =
      str.indexWithin("from ", identifierEnd + 1) + "from".length;
    moduleStart = str.indexWithin(quote, moduleStart + 1);
    const moduleEnd = str.indexWithin(quote, moduleStart + 1, lenModuleName);
    start = moduleEnd + 1;
    return {
      type: "importDefault",
      start: pos,
      end: moduleEnd,
      isDefaultImport: true,
      identifier: str.slice(identifierStart, identifierEnd),
      moduleName: str.slice(moduleStart, moduleEnd + 1)
    };
  }
function handleDefaultImport ( ) { LOOKING_FOR = "import name for default import" ; const identifierStart = pos + 7 ; const identifierEnd = str . indexWithin ( " " , identifierStart , DISTANCE ) ; LOOKING_FOR = "name of imported module for import*" ; let moduleStart = str . indexWithin ( "from " , identifierEnd + 1 ) + "from" . length ; moduleStart = str . indexWithin ( quote , moduleStart + 1 ) ; const moduleEnd = str . indexWithin ( quote , moduleStart + 1 , lenModuleName ) ; start = moduleEnd + 1 ; return { type : "importDefault" , start : pos , end : moduleEnd , isDefaultImport : true , identifier : str . slice ( identifierStart , identifierEnd ) , moduleName : str . slice ( moduleStart , moduleEnd + 1 ) } ; }
import IDENTIFIER from "MODULE"
import IDENTIFIER from " MODULE "
// 7 === "import ".length