VforVendetta
V2EX  ›  Node.js

如何搜索 npm 包里的代码?

  •  
  •   VforVendetta · Dec 31, 2024 · 2964 views
    This topic created in 510 days ago, the information mentioned may be changed or developed.

    例如我想搜索 prisma/client 这个包代码里是否有这个方法 findUnique 。

    只能下载 npm 安装后搜索吗

    7 replies    2024-12-31 10:29:36 +08:00
    g1vemep0wer
        1
    g1vemep0wer  
       Dec 31, 2024
    试试 GitHub 的高级搜索功能
    musi
        2
    musi  
       Dec 31, 2024
    这不是支持 ts 么,一般 ide 有提示的吧
    subframe75361
        3
    subframe75361  
       Dec 31, 2024 via Android
    Jasonwxy
        5
    Jasonwxy  
       Dec 31, 2024

    左边的 sourcegraph
    右边 github 自带的搜索
    或者直接项目主页按.打开在线 vscode 搜
    lisxour
        6
    lisxour  
       Dec 31, 2024
    楼上说的方法不靠谱,有的 npm 包没开源的,不一定在 github 上面有
    catinsides
        7
    catinsides  
       Dec 31, 2024   ❤️ 2
    1.找到 github 仓库
    2.按 `.` (逗号旁边的)
    3.进入 web editor 搜索

    适用于开源
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6185 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 64ms · UTC 02:58 · PVG 10:58 · LAX 19:58 · JFK 22:58
    ♥ Do have faith in what you're doing.