Skip to content

xlboy/type-toolkit

Repository files navigation

type-toolkit

npm downloads npm version License

English | 简体中文

A TypeScript type utility library developed in the TypeZen language, aims for - "Super rich features and an excellent user experience"

Features

  • Written in TypeZen, with types that are easy to understand, and it is maintainable and extensible

  • Excellent user experience:

    • Documents - JSDoc, Online API
    • Use cases are provided for reference
  • Abundant APIs that are used like Vanilla JS, lodash (coming soon)

  • High unit test coverage to ensure the accuracy of each API

Installation

npm install type-toolkit -D

Usege

import type tt from 'type-toolkit';

type T0 = tt.String.Repeat<'a', 3>; // 'aaa'
type T1 = tt.String.Split<'a-b-c', '-'>; // ['a', 'b', 'c']
type T2 = tt.String.Substring<'0123456789', 3, 5>; // '34'
type T3 = tt.String.Trim<'  abc  '>; // 'abc'
type T4 = tt.Number.Range<0, 10>; // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Documentation

Motivation

  • Practice TypeZen

  • Fill the gap in the community with the positioning of "Super rich features & an excellent experience"

Thanks

Without these excellent projects, this project may not have been born, and I am very grateful to the developers who have silently contributed to these projects. 💛

And thank you to all the friends who have been there for me~ 💛

License

MIT License © 2023-PRESENT xlboy

About

A TypeScript type utility library developed in the TypeZen language, aims for - "Super rich features and an excellent user experience"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published