An open API service indexing awesome lists of open source software.

https://github.com/xlboy/type-toolkit

A TypeScript type utility library developed in the TypeZen language, aims for - "Super rich features and an excellent user experience"
https://github.com/xlboy/type-toolkit

type-tools type-utils typescript typezen

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# type-toolkit


npm downloads
npm version
License

English | [įŽ€äŊ“中文](./README.zh.md)

A TypeScript type utility library developed in the [TypeZen](https://www.github.com/xlboy/type-zen) language, aims for - **"Super rich features and an excellent user experience"**

## Features

- Written in [TypeZen](https://www.github.com/xlboy/type-zen), with types that are easy to understand, and it is maintainable and extensible

- Excellent user experience:

- Documents - **JSDoc, [Online API](https://type-toolkit-docs.vercel.app/)**
- 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

```bash
npm install type-toolkit -D
```

## Usege

```typescript
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

- [API Reference](https://type-toolkit-docs.vercel.app/)

## Motivation

- Practice [TypeZen](https://www.github.com/xlboy/type-zen)

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

## Thanks

- [type-fest](https://github.com/sindresorhus/type-fest)

- [ts-toolbelt](https://github.com/millsp/ts-toolbelt)

- [type-challenges](https://github.com/type-challenges/type-challenges)

- ...

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](https://github.com/xlboy)