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

dlsjs

v1.0.10

Published

domain-language for js

Readme

DLS.JS是一个通过 领域驱动语法 去处理 复杂结构数据 的JavaScript库。

我参考了 JSON Schema 的索引规范,通过 ES6Proxy 创建读写代理,支持了一种自定义读写语法;在那之后,我又围绕着这个语法,做了一些其他的工具函数,下面我会简单的介绍一下。

虽然你可能已经知道使用Proxy意味着什么,但我还是要强调一下。这个函数不支持IE11浏览器

import {RW} from 'dlsjs'

// 比如获取到一个对象,它的内容不固定
let ticketData = {}

// 现在需要给他的某个深层属性赋值,这就可以用到我们的 RW 函数
RW(ticketData)['#/assignInfo/assignUser/name'] = 'Tom'

// 上面这行语法等价于
if(!ticketData.assignInfo) ticketData.assignInfo = {}
if(!ticketData.assignInfo.assignUser) ticketData.assignInfo.assignUser = {}
ticketData.assignInfo.assignUser.name = 'Tom'

借助这个特性,或者说类似的设计模式,我还提供了很多常用函数,比如:

  • 🕒 不改变内存地址的赋值 (deepAssign, deepMerge)
  • 💪 深度对比数据的不同属性 (deepDiff)
  • 🔥 链式操作语法驱动 (Chain)
  • 🌐 领域JSON解析 (deepConvert)
  • 📦 树,表,维表 快捷操作 (list2Tree, treeFind, treeForEach)
  • 👫 值判断与特征判断 (isRangeIn, matchRules)

快速开始

文档

访问 qwerjs.top 网站查看更详细的文档

安装

npm install dlsjs --save

📚API 参考

V1.0.0

这是dlsjs的第一个正式版本。借助AI对所有函数进行了如下优化。 详细的JavaScriptDoc注释。 替换了所有的递归函数为迭代函数,避免了栈溢出问题。 优化了所有函数的性能,控制时间复杂度在O(n),避免了重复计算。 完善了参数校验,在参数错误时控制台返回警告日志。