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

arrow_filter

v1.1.1

Published

An ArrowSystem Plugin

Downloads

4

Readme

Arrow 系统 筛选器插件

开发文档

启动

安装node环境
下载并安装最新版本:https://nodejs.org/en/
安装依赖包
npm install
启动服务
npm run server

可在webpack.config.js配置服务端口。
此处已配置为1717
浏览器访问 localhost:1717
热更新已启用
打包
npm run dev-build 打包至dist目录,用于前端单独测试
npm run prod-build 打包至prod目录,不包含开发库和arrow系统已有的库

使用文档

1、在需要使用的模块的assets/javascripts中引入filter.js
2、$(elements).arrowFilter(options);
3、options项
    options = {
            search:true, //是否启用顶部关键词搜索
    		timeRange: false,//是否开启顶部时间筛选器,
    		virtualTag
    		onInitialized: ($filter) => {
    		    //初始化过后的回调函数
    		    //可用参数是刚刚初始化完成的filter
    		},
    		top:0,//filter距离页面顶部距离,有默认值,建议不传,若距离不合适,可传值,数字类型
    		fold: 10,//设置半展开时的block数目,不传则不使用半展开功能
    		selected: [],//默认选中的项
    		blocks: {//选项数据,以虚线隔开的块为单位,传入则启用该块。
    			normal: normal,//普通快
    			doubleTitle: doubleTitle,//双标题块
    			remote, remote,//远程块
    			subTitle: subTitle,//二级标题块(ECM 美元 人民币 那种)
    			dropDown: dropDown//下拉框块
    		},
    		onDataChange: (data) => {
    			//数据改变时(即选中或删除选中)的回调函数
    			//可用参数 : data : 当前选中的数据
    		}
    	}
    }
4、额外参数说明
- mutex:单选。作用处:item 。若在item中传入这一字段并且为真值。则该单元为单选。选中一项,其他项取消选中。
- persist:常驻。作用处:item 。若在item中传入这一字段并且为字符串。则该块常驻与顶部,并且hover时有说明文字,文字即传入的persist值
- size:该块儿内的item的大小。作用处:block 。可选值"large,middle,small"
5、blocks的传入格式请参考 src/data_simulator.js