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 🙏

© 2025 – Pkg Stats / Ryan Hefner

medash

v3.4.1

Published

📦medash个人常用代码片段汇总💡,减少不必要重复coding,开箱即用🚀 🚀

Downloads

173

Readme

npm npm npm bundle size LICENSE MIT

前端JavaScipt业务代码工具库

业务常用代码片段汇总,高效率完成Task

业务开发过程中,经常用到日期格式化url参数转对象浏览器类型判断节流函数等常用函数,为避免不同项目多次复制粘贴的麻烦,这里统一封装,并发布到npm,以提高开发效率。如果你也有常用的代码,欢迎为本项目提交pr。

安装

CDN

<script src="https://unpkg.com/[email protected]/dist/medash.min.js"></script>

npm

推荐使用 npm 安装[1]

npm install medash
//或 yarn add  medash

完整导入

const medash = require('medash');
medash.eq('medash','medash');//true

按需导入

按需导入只会加载需要代码,减少文件体格

const eq = require('medash/lib/eq');
eq('medash','medash');//true

webpackRollup 模块打包器配合使用,可使用ES6模块化导入

import eq from 'medash/lib/eq';
eq('medash','medash');//true

注意点: 使用某个API时,如果报错请检查medash版本,确保为最新的版本

支持Tree shaking

构建时,去除无用代码,减少打包后的文件体积

import {eq} from "medash"
//...

:package: API文档

查看文档

协议

MIT

联系我