@inzero/ts-ut 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.1] 15-10-2026
3
+ ## [0.1.0] 2026-10-19
4
+
5
+ ### Added
6
+
7
+ - Added `Split<T, S>` and `Join<T, S>` string utility types.
8
+
9
+ ## [0.0.1] 2026-10-15
4
10
 
5
11
  First release.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # ts-ut
1
+ # @inzero/ts-ut
2
2
 
3
3
  A TypeScript utility types library.
4
4
 
5
5
  ## Quick Examples
6
6
 
7
7
  ```ts
8
- import { Param } from "ts-ut";
9
- import { GetDeep } from "ts-ut/dict"; // Or category-specific imports
8
+ import { Param } from "@inzero/ts-ut";
9
+ import { GetDeep } from "@inzero/ts-ut/dict"; // Or category-specific imports
10
10
 
11
11
  type Handler = (foo: string, bar: number) => boolean;
12
12
  type LastParam = Param<Handler, -1>; // number [!code highlight]
@@ -17,8 +17,8 @@ type Target = GetDeep<Config, "b.c">; // 4 [!code highlight]
17
17
 
18
18
  ## Installation
19
19
 
20
- ```npm
21
- npm install -D ts-ut
20
+ ```sh
21
+ pnpm add -D @inzero/ts-ut
22
22
  ```
23
23
 
24
24
  ## Docs
@@ -0,0 +1,6 @@
1
+ import type { ROList } from "../list";
2
+ export type Split<T extends string, S extends string> = T extends "" ? [] : T extends `${infer L}${S}${infer R}` ? [L, ...Split<R, S>] : [T];
3
+ export type Join<T extends ROList<string>, S extends string = ""> = T extends readonly [
4
+ infer F extends string,
5
+ ...infer R extends ROList<string>
6
+ ] ? R["length"] extends 0 ? F : `${F}${S}${Join<R, S>}` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzero/ts-ut",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "TypeScript Utility Types",
5
5
  "keywords": [
6
6
  "typescript",