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

@ditto-community/typescript-sdk

v1.0.2

Published

Ditto Clipboard Manager Network SDK for TypeScript

Readme

English

[!CAUTION] 本项目仍在开发中,部分功能尚未完善或可能存在 Bug,不建议在生产环境中使用。

Ditto TypeScript SDK

Ditto 剪贴板管理器的 TypeScript 网络通信 SDK。用于在 Ditto 实例之间收发剪贴板数据,与 C++ 版 Ditto 客户端/服务端协议兼容。

功能

  • DittoClient — 连接远程 Ditto 实例,发送剪贴板数据
  • DittoServer — 监听并接收来自 Ditto 客户端的剪贴板数据
  • AES 加密 — 所有网络通信均通过共享密码加密

协议与原生 C++ 版 Ditto 完全兼容,可直接互通。

安装

npm install @ditto-community/typescript-sdk

快速上手

发送剪贴板:

import { ClipboardFormat, DittoClient } from '@ditto-community/typescript-sdk'

const client = new DittoClient({ password: 'secret' })
await client.connect('192.168.1.100', 23443)

await client.sendClipboard({
  description: 'Hello from TypeScript',
  formats: [ClipboardFormat.unicodeText('Hello World')]
})

接收剪贴板:

import { DittoServer } from '@ditto-community/typescript-sdk'

const server = new DittoServer({ password: 'secret', port: 23443 })

server.on('receive', (data) => {
  console.log('收到:', data.description)
})

await server.start()

构建

npm run build    # 输出到 dist/(ESM + CJS)
npm run dev      # 监听模式

协议

默认端口:23443,通信流程:

客户端 → 服务端: START → DATA → DATA_START → [格式数据] → DATA_END → END

所有消息通过共享密码进行 AES 加密。消息结构详见 src/protocol/ 源码。

许可证

GPL-3.0