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 🙏

© 2026 – Pkg Stats / Ryan Hefner

garbage-maker

v0.2.1

Published

garbage-maker,向 JS 和 TS 文件中添加垃圾代码

Readme

garbage-maker

GitHub

为项目中的所有 JavaScriptTypeScript 脚本添加垃圾代码。

背景

部分国内小游戏平台可能会对小游戏进行代码检测,未通过检测可能无法过审。

如果小游戏发布次数不多,可通过简单粗暴往代码里加垃圾代码的形式提交审核,这就是此项目的用途。

如果小游戏被多次发布,使用本项目进行过审的概率会大大降低,可以在本项目的源码中修改部分内容进行多次尝试,或者使用其他方式来完成您的需求,例如 代码混淆

快速使用

本项目需要安装 Node 环境。

使用你喜欢的包管理器全局安装 garbage-maker

npm install -g garbage-maker

添加垃圾代码:

garbage-maker add [文件或目录的绝对路径]

清理垃圾代码:

garbage-maker clean [文件或目录的绝对路径]

查看 garbage-maker 所有命令的帮助:

garbage-maker --help

查看指定命令的帮助:

garbage-maker add --help

自定义添加垃圾代码

使用 -c 或者 --code 标志(flag)来添加自定义的垃圾代码:

garbage-maker add [绝对路径] -c "console.log();"
# 或者
garbage-maker add [绝对路径] --code "console.log();"

注意:自定义添加的垃圾代码最好是未出现在已有代码中的。 在使用 clean 命令清理代码时,需要传入与 add 命令相同的 --code 标志,否则会清理默认的 (1+1); 垃圾代码。

使用 -r 或者 --ratio 标志(flag)控制添加垃圾代码的百分比,即根据文件的字符数量,来添加垃圾代码的字符数量。

garbage-maker add [绝对路径] -r 50
# 或者
garbage-maker add [绝对路径] --ratio 50

注意--ratio 标志的值为百分比的数字部分,即示例中的 50 相当于 50%

修改源码

该分支使用 oclif 作为 CLI 框架进行开发,如需对源码进行修改,按照以下方法进行:

  1. 安装依赖:

    npm install
  2. 调试命令:

    # Windows
    ./bin/dev.cmd --help
    # MacOS 或 Linux
    ./bin/dev.js --help
  3. 构建 CLI:

    npm link

分支说明

本项目以 main 作为默认分支,老版本的 JavaScript 代码仍包含在本项目中,可以查看 garbage-maker.js

如需查看老版本文档,可以切换至 master 分支查看 README.md

赞助

如果该项目对你有帮助,不妨点个 star 来支持我。

也可以通过其他方式来赞助我,从零开始将我培养成一个开源工具人。

爱发电主页

LICENSE

MIT License