VforVendetta
V2EX  ›  Node.js

如何搜索 npm 包里的代码?

  •  
  •   VforVendetta · Dec 31, 2024 · 3447 views
    This topic created in 687 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
    g1vemep0wer
    Dec 31, 2024
    1
    试试 GitHub 的高级搜索功能
    musi
    musi
    Dec 31, 2024
    2
    这不是支持 ts 么,一般 ide 有提示的吧
    Jasonwxy
    Jasonwxy
    Dec 31, 2024
    5

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

    适用于开源
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4328 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 01:13 · PVG 09:13 · LAX 17:13 · JFK 20:13
    ♥ Do have faith in what you're doing.