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

yyx-list

v0.3.0

Published

js list implements

Downloads

3

Readme

yyx-list

基于ECMAscript 2015 的Array Api 封装的类似java的List集合 把平时业务中常用的方法封装到一起,主要目的简化业务代码,结构更清晰。 希望大家提出宝贵意见,使它更加完善。

travis dep npm downloads

##install: npm install yyx-list

Tips

这些API将挂载到全局JavaScript环境,所有数组将默认实现这些api,请在应用启动时予以引用;


Usage yyx-list

require('yyx-list');
 
let ins = [1,2,3]; 
 
//添加元素
ins.add();
return list;
 
//移除元素
ins.remove(item)
return boolean;
 
//list 长度
ins.size();
return length;
 
//查询object list
ins.queryItem({field:'field',value:555});
return queryObject;
 
//统计某个字段的集合
ins.getCollection({field:'field'});
return arrayList;
 
//查询某个元素位置
ins.pos({field:'field',value:555} || 'string')
return position;
 
//清空list
ins.clear()
return empty list;

//排序
/**
 * type 排序方法类型
 * 目前支持bubbles selectSort
 * 
 * dc 升序、降序
 * asc 、des
 * 默认升序
 * /
ins.sort(type,dc)