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

@yxim/nim-web-sdk-lite

v10.0.0

Published

NIM Web SDK Lite - IM SDK for web

Readme

网易云信即时通讯 Lite 版本 sdk,为 web sdk 的 v3 代版本,提供完善的即时通信功能开发框架,屏蔽其内部复杂细节,对外提供较为简洁的 API 接口,方便第三方应用快速集成即时通信功能。

Lite 版本, 对接 v10 版本的 API, 保持兼容. 精简了 API 为更小体积的场景准备, 更加易用.

  • basic 已实现提供, 产物控制体积为 200kb 以内, 支持发文本/自定义消息, 有会话/好友/用户/订阅的模块能力.
  • standard 标准产物, 待实现
  • professional 扩展产物, 待实现

官方使用指引: https://doc.yunxin.163.com/messaging2/guide/DcyMjA1Njk?platform=client

安装

如果你是新用户,推荐使用 V2 API 的 SDK,安装方式为:

npm install @yxim/nim-web-sdk-lite"

基础引入例子

// 默认引入 basic 基础版本 sdk
import NIM, { V2NIMConst } from '@yxim/nim-web-sdk-lite'

const nim = NIM.getInstance(
  {
    appkey: 'YOUR_APPKEY',
    debugLevel: 'debug',
  },
  {}
)

nim.V2NIMLoginService.on('onLoginStatus', function (arg1) {
  console.log('收到 V2NIMLoginService 模块的 onLoginStatus 事件', arg1)
})

async function init() {
  try {
    await nim.V2NIMLoginService.login('YOUR_ACCOUNT', 'YOUR_TOKEN', {
      authType: 0
    })
  } catch (err) {
    console.error('login failed cause', err)
  }
}

init()

浏览器、微信/QQ/抖音/百度/支付宝小程序、uni-app 三端由 SDK 运行时自动识别环境适配,零配置接入。RN / Node 等未内置支持的环境请通过 [[NIMLiteSDK.setAdapters]] 注入对应 adapter (当前尚未支持, 敬请期待)

basic 支持的服务模块

| 服务模块 | 描述 | | ------------------------------- | -------------------------------- | | V2NIMLoginService | 登录服务 | | V2NIMMessageService | 消息服务(发送/接收消息/查消息历史) | | V2NIMLocalConversationService | 本地会话服务 | | V2NIMUserService | 用户服务 | | V2NIMFriendService | 好友服务 | | V2NIMSubscriptionService | 监听上下线状态的服务 |