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

perf.eleip

v0.3.11

Published

search ip

Readme

Eleip

数据格式

/data/ip.dat buffer文件

|--------|-----...----|------------|
| Header| Record      |     Index      |

分为三个部分:Header、Record 及 Index 部分,分别为头信息、纪录区及索引区

Header 部分

|----|----|Record..

头信息部分指向了索引区的位置
分为两个部分,各4个字节,分别指向第一个索引位置和最后一个索引的位置

Record 部分

Header |--------0x00----0x00 ..... ---0x00-----0x00| Index

纪录区保存了我们从 csv 文件读取的需要的数据,以 /build/build.js 中 NEED_PROPERTY 常量数组为准,按序存储,每一段数据以 0x00 结尾标识

Index 部分

Record | ---- | ---- | ----| ...... --|

索引区保存了每个 ip 段的范围以及所属的纪录区的位置
每个索引包括三个字段,每个字段4个字节,共12字节长度
	| ---- | ---- | ---- |
第一个字段为当前数据的开始 ip, 第二个字段为结束 ip,第三个字段指向了纪录区数据的位置

生成数据

运行npm run build,将读取 /build/data.csv的数据生成数据文件/data/ip.csv

注:当前保存的字段仅为isp(运营商)数据。

注:如果要增加保存的数据,需要修改/build/build.js文件内NEED_PROPERTY 数组,相应的要修改/lib/eleip.js内的RECORD_PROPERTY ,保证正常保存和读取。

测试

输出 ip 搜索结果

npm test -- 1.0.0.1

benchmark

npm test -- -b   或者 npm test -- --benchmark