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 🙏

© 2025 – Pkg Stats / Ryan Hefner

lite-ts-parser

v11.19.11

Published

- 字段必须为英文字母且支持层级 例如: a.b.c.d

Readme

Version

规范

  • 字段必须为英文字母且支持层级 例如: a.b.c.d

页签

  • 页签名必须与程序定义的类名一致

单元格

  • 当单元格不包含:类型或只有字段:时 则表示该列仅作为显示 不会导入

字段名:array.子类型[.正则]

  • 奖励数组(Reward[][])

| 字段名:array:rewards.\n\n\n | | :-: | | 字段说明 | | 支付余额*1*11支付余额*2*22支付余额*3*33 |

[{
    字段名: [
        [
            [{
                count: 1,
                valueType: 4,
                weight: 11,
            }],
            [{
                count: 2,
                valueType: 4,
                weight: 22,
            }],
        ],
        [
            [{
                count: 3,
                valueType: 4,
                weight: 33,
            }],
        ]
    ]
}]
  • 数值数组(Value[])

| 字段名:array:value | | :-: | | 字段说明 | | 支付余额*1支付余额*2支付余额*3 |

[{
    字段名: [{
        count: 1,
        valueType: 4,
    },
    {
        count: 2,
        valueType: 4,
    },
    {
        count: 3,
        valueType: 4,
    }],
}]
  • 枚举名数组

| 字段名:array:config.enum.config.ValueTypeData.text | | :-: | | 字段说明 | | 支付余额支付余额 |

[{
    字段名: [4, 4],
}]

字段名:bool

| 字段名:bool | | :-: | | 字段说明 | | TRUE |

[{
    字段名: true
}]

字段:enum:应用.枚举名[.字段(默认value)]

| 字段名:enum:config.ValueTypeData.text | | :-: | | 字段说明 | | 支付余额 |

[{
    字段名: 4
}]

字段名:json

| 字段名:json | | :-: | | 字段说明 | | [1,2] |

[{
    字段名: [1,2]
}]

字段名:number

| 字段名:number | | :-: | | 字段说明 | | 100 |

[{
    字段名: 100
}]

字段名:rewards

| 字段名:rewards | | :-: | | 字段说明 | | 支付余额*100*1支付余额*10*99支付余额*99 |

// 支付余额编号: 1
[{
    字段名: [
        [{
            count: 100,
            valueType: 4,
            weight: 1,
        }, {
            count: 10,
            valueType: 4,
            weight: 99,
        }],
        [{
            count: 99,
            valueType: 4,
        }],
    ]
}]

字段名:string

| 字段名:string | | :-: | | 字段说明 | | aa |

[{
    字段名: "aa"
}]

字段名:unix

| 字段名:unix | | :-: | | 字段说明 | | 2022-12-09 |

[{
    字段名: 1670515200
}]

字段名:value

| 字段名:value | | :-: | | 字段说明 | | 支付余额*99 |

[{
    字段名: {
        count: 99,
        valueType: 4,
    }
}]

字段名:valueConditions

| 字段名:valueConditions | | :-: | | 字段说明 | | 支付余额>=9支付余额<100支付余额=1000 |

[{
    字段名: [
        [{
            count: 9,
            op: '>=',
            valueType: 4,
        }, {
            count: 100,
            op: '<',
            valueType: 4,
        }],
        [{
            count: 1000,
            op: '=',
            valueType: 4,
        }],
    ]
}]

字段名:#:页签.筛选字段

  • A页签

| xx:#:aa.no | | :-: | | 字段说明 | | 1 |

  • aa页签

| no:int | text:string | | :-: | :-: | | 编号 | 文本 | | 1 | 你好 | | 1 | 欢迎 |

[{
    xx: [{
        text: '你好'
    }, {
        text: '欢迎'
    }]
}]

[字段名]:类型

| value:number | a.[b]:string | a.b.c:number | a.b.d:bool | | :-: | :-: | :-: | :-: | | 编号 | 键 | 数字值 | 布尔值 | | 1 | aa | 11 | false | | 1 | bb | 22 | true |

[{
    value: 1,
    a: {
        aa: {
            c: 11,
            d: false,
        },
        bb: {
            c: 22,
            d: true
        }
    }
}]

代码

ParserFactoryBase - 解析工厂

const factory: ParserFactoryBase;

const parser = facotry.build<T>('类型');
const res = await parser.parse(原始值);
// res is T
  • ParserFactory - 默认工厂
const enumFactory: EnumFactoryBase;
const factory: ParserFactoryBase = new ParserFactory(enumFactory, {
    // 扩展解析器
    类型: IParser,
    ...
});