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

mswiper

v1.1.3

Published

A mini swiper for mobile, no dependent

Downloads

5

Readme

mSwiper.js · downloads license

View README in English

项目地址

移动端微型 swiper 插件,小而美,无依赖.

前言

mSwiper 相对于其他的swiper插件而言,最大的优势就是 ,压缩后仅 1.2k ,能满足部分开发需求。插件的开发采用 组合使用构造函数模式和原型模式,通过 Gulp 构建,感兴趣的可以阅读源码🦄。欢迎 star 🌟

若有问题,请提issue

效果演示

在线浏览Demo请戳这里

手机浏览请扫描下方二维码

在线浏览

开发

# 克隆本仓库
git clone https://github.com/JohnsenZhou/mSwiper.js.git

# 进入仓库目录
cd mSwiper.js

# 安装依赖
npm install

# 启动项目,本地浏览地址 => localhost:8080
gulp

# 打包压缩
gulp build

安装

前往 release 下载所需版本。

使用

<ul id="selector">
  <li>
    <img src="./img/1.jpg">
  </li>
  <li>
    <img src="./img/2.jpg">
  </li>
  <li>
    <img src="./img/3.jpg">
  </li>
  <li>
    <img src="./img/4.jpg">
  </li>
  <li>
    <img src="./img/5.jpg">
  </li>
</ul>
<script src="../src/mSwiper.js"></script>
<script>
  var options = {
    selector: "#selector",  // 节点选择
    isAutoPlay: true,       // 是否自动播放
    autoPlayTime: 3000,     // 设置自动播放时间
  }
  var mSwiper = new mSwiper(options);
</script>

mSwiper 同时也支持 AMDCommonJS 规范,你可以通过 require.js 进行加载使用:

require(['mSwiper'], function(mSwiper) {
  var options = {
    selector: "#selector",  // 节点选择
    isAutoPlay: true,       // 是否自动播放
    autoPlayTime: 3000,     // 设置自动播放时间
  }
  var mSwiper = new mSwiper(options);
})

Api

new mSwiper(options)

options 具体参数:

| 参数 | 类型 | 默认值 | 功能描述 | | ------------- |:-------------:| -----:| -----:| | selector | string | #selector | 容器选择器 | | isAutoPlay | bool | false| 是否自动播放 | | isManual | bool | false | 是否支持手指滑动 | | autoPlayTime | number | 5000 | 自动播放间隔时间 | | goDirection | string | left | 自动播放方向(left&right) |

License

MIT License