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

sendohjs

v0.0.2

Published

专注于 DOM 操作的迷你库

Readme

sendohjs

这是最近造的一个小轮子,一个用来操作 DOM 的库,API 基本上和 zepto 兼容的,先看一下怎么用的:

<html>
<head>
    <meta charset="utf-8">
    <title>playground</title>
</head>
<body>
    <div class="xxx">dedara</div>

    <div class="lorem">some</div>
    <div class="lorem">another</div>
    <a href="http://baidu.com", alt="baidu"></a>
    <a href="http://google.com", alt="google"></a>
    <script src="demo.dist.js"></script>
</body>
</html>
'use strict'

let $ = require('sendohjs')

$(function () {
     let $div = $('.xxx')
    $div.removeClass('xxx').addClass('yyy zzz').hasClass('zzz') // true

    let $link = $('a')
    console.log($link.attr('alt')) // 'baidu'
    $link.attr({ alt: '神', class: 'search', }).attr('href', function (idx, oldVal) {
        return oldVal + idx.toString()
    }).attr('target', '_blank')

    console.log($link.attr('alt'), $link.attr('class'), $link.attr('href'), $link.attr('target'))
    $link.removeAttr('href')
    console.log($link.attr('href')) // null
})

一些要点:

  • 目前构造函数还不支持从 html 字符串创建,比如 $('<p>hi</p>') 这种,其它的几种参数类型都支持
  • 单元测试是用 mocha 写的,但是为了兼容 zepto 基本上是从 zepto 的 test 目录下复制过来修改了一下。现在是半自动化的测试,打算过段时间用上 karma
  • 目前只支持 commonjs 格式,没有支持其它格式的打算
  • 代码还是 too young too simple, 还有很多需要改进的地方
  • 具体的用法见测试和代码