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

xline

v1.0.19

Published

[email protected]

Readme

xline

Keyword

低代码(low code)、有向无环图(DAG)、代码生成器(Code generator)、依赖注入(Dependency injection)、JS,typescript、批处理(Batch processing)

Features

  • 它是一个节点管理框架,它可以组织控制一群节点的运行顺序,包含异步机制
  • 它的核心数据结构是一个有向无环图,可以通过本工具从有向无环图种搜索出相关的链路,关系树
  • 它的每个节点中,会注入它需要的关系节点
  • 它可以用到一些批量程序,具备异步同步机制,可以用于复杂的批处理任务调度,代码生成器设计中
  • 它可以对每个节点进行多种标记和描述,便于记忆,和管理

Install

yarn

yarn add xline

npm

npm install xline

Usage

它主要包含两个装饰器(LNode,Mark),一个加载器(Context),一个节点继承类(LineNode),一个常量配置参数(GLOBAL_TYPE)
  • Context 控制对象节点的加载,搜索,运行
  • LineNode 节点的父类
  • LNode 节点的关系信息,类型
  • Mark 节点的标记信息
  • GLOBAL_TYPE 常量参数

import { Context,LineNode,LNode,Mark,GLOBAL_TYPE } from 'xline';
  • 加载器(Context)

import { Context } from 'xline';//引入加载器
import objs from './objects/Index';//继承了LineNode的对象数组

//加载集合节点
//总共加载了三个节点,分别标记 node1,node2,node3 . 配置:node2 from node1, mode3 from node1
//每个节点的run 函数,打印 1,2,3
let ctx = new Context(objs);

//加载就绪
ctx.ready(()=>{
    //用节点标记描述需要的节点
    ctx.desc("node1","node2").then((res)=>{
        console.log("result:",res);
        /**
         * 1
         * 2
         * result:1
         */
    });
})

//描述结果信息
ctx.onDescMsg((msg)=>{
    console.log(msg);
    /*
        {
        "line": [0, 1],
        "link": [
            [0, 1]
        ],
        "names": ["节点1", "节点2"],
        "data": ["ready"],
        "describe": ["node1", "node2"],
        "code": 200,
        "msg": "success"
    }
        
    */
});

  • 对象

import {LNode,Mark,LineNode,GLOBAL_TYPE} from 'xline';
import Obj1 from './Obj1' ;
import Obj2 from './Obj2' ;
//对当前对象进行描述,名称,节点关系,关系类型
@LNode({
    name:"节点1",
    type:GLOBAL_TYPE.BRANCK_TYPE.COLLECT,
    from:[Obj1,Obj2]
})
@Mark("node1")//用于监听当前的对象,符合什么样的状态
export default class Ready  extends LineNode {
    //当前节点运行函数
    // 可以是异步函数
    public run() {
        console.log("1");
    }
}

Contributing

Emaiil

欢迎与我联系,讨论研究相关内容 [email protected]

Version

1.0.17 添加装饰器当前节点文件名及相对路径属性
1.0.16 添加分支互斥规则
1.0.14 修改描述文档,及相关类的命名
1.0.13 修复链路只有一条时,描述字段 反馈执行的链路不匹配
...