npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

anti-debugger

v0.2.0

Published

Web反调试工具

Downloads

36

Readme

anti-debugger

Web反调试工具

安装

  • pnpm
$ pnpm add -D anti-debugger
  • yarn
$ yarn add -D anti-debugger
  • npm
$ npm install -D anti-debugger

使用

  • main.ts中引入并开启
import antiDebugger from 'anti-debugger'

antiDebugger()
  • 测试阶段可以屏蔽,推荐使用环境变量控制。
import antiDebugger from 'anti-debugger'

antiDebugger({
    /**
     * 轮询时间, 默认1000
     */
    // timeout: 1000,
    /**
     * 是否立即执行一次, 默认true
     */
    // immediate: true,
    /**
     * 是否开启deactivate breakpoints的判定条件, 默认100
     * 仅正数生效
     */
    // dbDiff: 100,
    /**
     * 是否输出开发日志
     */
    devLog: true,
    /**
     * 是否关闭debugger
     */
    deactivateDebugger: false,
    /**
     * localStorage中保存的是否关闭debugger key
     * 如果传递了该值,则在localStorage中读取该值
     * 如果该值为true,则关闭debugger
     * 如果该值为false,则检查deactivateDebugger,决定是否关闭debugger
     */
    // debuggerLocalStorageKey: 'ANTI-DEBUGGER',
})

提示 devLogdeactivateDebugger最好通过环境变量设置, 更多参数请自行查找。

警告 由于使用了eval,可能会收到如下提示:

Use of eval in "****" is strongly discouraged as it poses security risks and may cause issues with minification.

版本

v0.2.0

  • 添加性能分析,判断Undock状态。
  • 优化检测模式,引入动态时间间隔检查。

v0.1.0

  • 实现基本的反调试功能