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

super-easy-mock

v2.0.4

Published

mock tool that is super easy

Readme

super-easy-mock

作者:张子元

super-easy-mock 旨在快速的,无侵略性,无耦合的切入到项目中使用mock数据,并为大家提供简单易用的前端假数据的解决方案。

安装

 # 使用 npm 安装方式安装:
 npm i super-easy-mock -g
 
 # 使用 yarn 安装方式安装:
 yarn global add super-easy-mock
 
 # 直接通过npx使用无需安装

 # 使用美菜npm源 mnpm
 mnpm i super-easy-mock -g

使用

# Show help
smock

# Initailization and start
smock init

# Start proxy server
smock server

# Add new url (example: 'mall/api/get/list')
smock add /path/to/server	

# Add mock floder to .gitignore
smock --ignore    

快速开始

1.项目根目录下执行
	smock init
2.根据提示,先输入完整URL, 需要包含协议、域名、端口

例如我想代理 http://www.baidu.com,那么就输入 https://www.baidu.com 例如我想代理 http://localhost:7777, 输入 http://localhost:7777

3.现在就可以开始享受 smock 带给你的便利了,super-easy-mock会自动启动一个端口为3000的本地mock服务,来代理目标链接的所有请求了

实际使用场景

1. 启动服务后,访问 localhost:3000, 就相当于访问代理的目标网站

比如此时有一个接口 /a/b/c, 需要使用本地的假数据,

可以先执行 smock add /a/b/c,smock会自动在mock文件夹中的 a=>b的目录内,生成一个 c.json

此时只要将后端的数据结构复制进来,访问 localhost:3000的时候,/a/b/c接口访问的就是本地的json数据了

2.当你不想使用这个接口时,只需将生产的json文件重命名即可,例如 a.json变成 _a.json,接口访问获得的数据就不再是本地的假数据了