
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
Dynamic Language Scope
扩展你自己的 领域驱动语法 ,让动态编程更简单
DLS.JS是一个通过 领域驱动语法 去处理 复杂结构数据 的JavaScript库。
我参考了 JSON Schema 的索引规范,通过 ES6 的 Proxy 创建读写代理,支持了一种自定义读写语法;在那之后,我又围绕着这个语法,做了一些其他的工具函数,下面我会简单的介绍一下。
虽然你可能已经知道使用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'
借助这个特性,或者说类似的设计模式,我还提供了很多常用函数,比如:
访问 qwerjs.top 网站查看更详细的文档
npm install dlsjs --save
FAQs
domain-language for js
The npm package dlsjs receives a total of 137 weekly downloads. As such, dlsjs popularity was classified as not popular.
We found that dlsjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.