Skip to content

codingwesley/find-imports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

find-imports

Find require and import dynamic-import files of JavaScript file by ast

Feature

  1. find imports by filename
  2. support dynamic import
  3. support files js jsx ts tsx
  4. find imports files and child by entry file, eg: webpack entry

Usage

Install package npm install qw-find-imports

import { findImports } from "qw-find-imports";

const strs2 = findImports(
  "XXXXXXXX/index.js",
  {
    findChild: true,
    log: false,
    baseUrl: ["XXXXXXXX"]
  }
);

console.log(JSON.stringify(strs2, null, 2));

About

Find require and import dynamic-import files of JavaScript file by ast

Resources

License

Stars

Watchers

Forks

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy