@avstantso/ts 1.3.2 → 1.3.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +44 -46
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.3] - 2026-01-15
4
+
5
+ ### Fixed
6
+
7
+ - Fixed AI hallucinations in README.md
3
8
 
4
9
  ## [1.3.2] - 2026-02-05
5
10
 
package/README.md CHANGED
@@ -82,7 +82,7 @@ The `@avstantso/ts` package provides a comprehensive suite of type-level utiliti
82
82
  - [TS.Union.ToIntersection](#tsuniontointersectionu) — Union → intersection
83
83
  - [TS.Union.Pop](#tsunionpopu) — Pop last from union
84
84
  - [TS.Union.ToTuple](#tsuniontotupleu) — Union → tuple
85
- - [TS.Union.IsUnion](#tsunionisuniont-iftrue--true-iffalse--false) — Test if union
85
+ - [TS.IsUnion](#tsisuniont-iftrue--true-iffalse--false) — Test if union
86
86
  - [TS.Array](#tsarray) — Array type utilities
87
87
  - Creation
88
88
  - [TS.Array.Create](#tsarraycreatel-item) — Create array of length
@@ -137,11 +137,11 @@ The `@avstantso/ts` package provides a comprehensive suite of type-level utiliti
137
137
  - [TS.ASCII.Map.Control](#tsasciimapcontrol) / [.Printable](#tsasciimapprintable) / [.Extended](#tsasciimapextended) — Subset maps
138
138
  - [TS.ASCII.Code](#tsasciicode) — Character → code lookup
139
139
  - [TS.ASCII.Character](#tsasciicharacter) — All ASCII characters union
140
- - [TS.Comparisons](#tscomparisons) — Type-level comparisons
141
- - [TS.Comparisons.LT](#tscomparisonslt) — Less than
142
- - [TS.Comparisons.LTE](#tscomparisonslte) — Less than or equal
143
- - [TS.Comparisons.GT](#tscomparisonsgt) — Greater than
144
- - [TS.Comparisons.GTE](#tscomparisonsgte) — Greater than or equal
140
+ - **Type-level comparisons**
141
+ - [TS.LT](#tslt) — Less than
142
+ - [TS.LTE](#tslte) — Less than or equal
143
+ - [TS.GT](#tsgt) — Greater than
144
+ - [TS.GTE](#tsgte) — Greater than or equal
145
145
  - [TS.String](#tsstring) — String type manipulation
146
146
  - [TS.String\<T, D\>](#tsstring-1) — Cast to string literal
147
147
  - [TS.String.Possible](#tsstringpossible) — Convertible types
@@ -189,11 +189,11 @@ The `@avstantso/ts` package provides a comprehensive suite of type-level utiliti
189
189
  - [Object.keysEx](#objectkeyso)
190
190
  - [Object.valuesEx](#objectvaluesexo)
191
191
  - [Object.entriesEx](#objectentriesexo)
192
- - [TS.Boolean](#tsboolean) — Boolean logic types
192
+ - **Boolean logic types**
193
193
  - [TS.If](#tsifcondition-iftrue--true-iffalse--false) — Conditional
194
- - [TS.If.And](#tsifandconditions-iftrue--true-iffalse--false) — Logical AND
195
- - [TS.If.Or](#tsiforconditions-iftrue--true-iffalse--false) — Logical OR
196
- - [TS.If.Xor](#tsifxorconditions-iftrue--true-iffalse--false) — Logical XOR
194
+ - [TS.And](#tsandconditions-iftrue--true-iffalse--false) — Logical AND
195
+ - [TS.Or](#tsorconditions-iftrue--true-iffalse--false) — Logical OR
196
+ - [TS.Xor](#tsxorconditions-iftrue--true-iffalse--false) — Logical XOR
197
197
  - [TS.Numeric](#tsnumeric) — Numeric literal utilities
198
198
  - Domain-Independent
199
199
  - [TS.Numeric.IsPositive](#tsnumericispositive) / [.IsNegative](#tsnumericisnegative) — Sign tests
@@ -239,7 +239,7 @@ The `@avstantso/ts` package provides a comprehensive suite of type-level utiliti
239
239
  - [TS.Type.KeyDef()](#tstypekeydefkey-type) — Create keyed def (runtime)
240
240
  - [TS.Type.KLD()](#tstypekldkey-type-def) — Create KLD (runtime)
241
241
  - [TS.Resolve](#tsresolve) — Type literal resolution
242
- - [TS Utility Types](#ts-utility-types) — Miscellaneous utility types
242
+ - **Utility Types** — Miscellaneous utility types
243
243
  - [TS.Alt](#tsaltt) — Alternative fields
244
244
  - [TS.Flat](#tsflatt-depth--1) — Flatten structure
245
245
  - [TS.IfDef](#tsifdef) / [TS.IfDefKey](#tsifdefkey) — Defined selection
@@ -419,7 +419,7 @@ type Union = 'a' | 'b' | 'c';
419
419
  type Tuple = TS.Union.ToTuple<Union>; // ['a', 'b', 'c'] (order may vary)
420
420
  ```
421
421
 
422
- ### `TS.Union.IsUnion<T, IfTrue = true, IfFalse = false>`
422
+ ### `TS.IsUnion<T, IfTrue = true, IfFalse = false>`
423
423
 
424
424
  Test if type is a union.
425
425
 
@@ -430,10 +430,10 @@ import { TS } from '@avstantso/ts';
430
430
  type MyUnion = 'a' | 'b' | 'c';
431
431
  type NotUnion = string;
432
432
 
433
- type Check1 = TS.Union.IsUnion<MyUnion>; // true
434
- type Check2 = TS.Union.IsUnion<NotUnion>; // false
435
- type Check3 = TS.Union.IsUnion<never>; // false
436
- type Check4 = TS.Union.IsUnion<number | boolean>; // true
433
+ type Check1 = TS.IsUnion<MyUnion>; // true
434
+ type Check2 = TS.IsUnion<NotUnion>; // false
435
+ type Check3 = TS.IsUnion<never>; // false
436
+ type Check4 = TS.IsUnion<number | boolean>; // true
437
437
  ```
438
438
 
439
439
  ---
@@ -804,7 +804,7 @@ type Idx2 = TS.Array.Max.Index<[1, undefined, 2]>; // 2
804
804
 
805
805
  #### `TS.Array.Sort<TArr, Asc = true>`
806
806
 
807
- Sort array items. Allows sorting array of `Sort.Pair<K>` to sort any data by key. Based on [TS.Comparisons](#tscomparisons).
807
+ Sort array items. Allows sorting array of `Sort.Pair<K>` to sort any data by key. Based on [type-level comparisons](#type-level-comparisons).
808
808
 
809
809
  **Example:**
810
810
  ```typescript
@@ -867,7 +867,7 @@ if (Field.version === field) {
867
867
 
868
868
  ## TS.ASCII
869
869
 
870
- ASCII character types and utilities based on [ascii-code.com](https://www.ascii-code.com/). Used in [TS.Comparisons](#tscomparisons) for string comparison operations.
870
+ ASCII character types and utilities based on [ascii-code.com](https://www.ascii-code.com/). Used in [type-level comparisons](#type-level-comparisons) for string comparison operations.
871
871
 
872
872
  ### ASCII Types
873
873
 
@@ -976,15 +976,13 @@ console.log(TS.ASCII.length); // 256
976
976
 
977
977
  ---
978
978
 
979
- ## TS.Comparisons
979
+ ## Type-level Comparisons
980
980
 
981
981
  Type-level number and string comparisons.
982
982
 
983
983
  String comparison is based on [TS.ASCII](#tsascii) character-to-number conversion. Number comparison splits numbers into digit arrays, compares lengths, then iterates through digits from most to least significant.
984
984
 
985
- ### Comparison Types
986
-
987
- #### `TS.Comparisons.LT<A, B, IfTrue = true, IfFalse = false>`
985
+ ### `TS.LT<A, B, IfTrue = true, IfFalse = false>`
988
986
 
989
987
  Test if `A < B`.
990
988
 
@@ -992,12 +990,12 @@ Test if `A < B`.
992
990
  ```typescript
993
991
  import { TS } from '@avstantso/ts';
994
992
 
995
- type NumLess = TS.Comparisons.LT<1, 2>; // true
996
- type NumNotLess = TS.Comparisons.LT<2, 1>; // false
997
- type StrLess = TS.Comparisons.LT<'a', 'b'>; // true
993
+ type NumLess = TS.LT<1, 2>; // true
994
+ type NumNotLess = TS.LT<2, 1>; // false
995
+ type StrLess = TS.LT<'a', 'b'>; // true
998
996
  ```
999
997
 
1000
- #### `TS.Comparisons.LTE<A, B, IfTrue = true, IfFalse = false>`
998
+ ### `TS.LTE<A, B, IfTrue = true, IfFalse = false>`
1001
999
 
1002
1000
  Test if `A <= B`.
1003
1001
 
@@ -1005,11 +1003,11 @@ Test if `A <= B`.
1005
1003
  ```typescript
1006
1004
  import { TS } from '@avstantso/ts';
1007
1005
 
1008
- type NumLessEq = TS.Comparisons.LTE<1, 1>; // true
1009
- type StrLessEq = TS.Comparisons.LTE<'a', 'a'>; // true
1006
+ type NumLessEq = TS.LTE<1, 1>; // true
1007
+ type StrLessEq = TS.LTE<'a', 'a'>; // true
1010
1008
  ```
1011
1009
 
1012
- #### `TS.Comparisons.GT<A, B, IfTrue = true, IfFalse = false>`
1010
+ ### `TS.GT<A, B, IfTrue = true, IfFalse = false>`
1013
1011
 
1014
1012
  Test if `A > B`.
1015
1013
 
@@ -1017,11 +1015,11 @@ Test if `A > B`.
1017
1015
  ```typescript
1018
1016
  import { TS } from '@avstantso/ts';
1019
1017
 
1020
- type NumGreater = TS.Comparisons.GT<2, 1>; // true
1021
- type StrGreater = TS.Comparisons.GT<'b', 'a'>; // true
1018
+ type NumGreater = TS.GT<2, 1>; // true
1019
+ type StrGreater = TS.GT<'b', 'a'>; // true
1022
1020
  ```
1023
1021
 
1024
- #### `TS.Comparisons.GTE<A, B, IfTrue = true, IfFalse = false>`
1022
+ ### `TS.GTE<A, B, IfTrue = true, IfFalse = false>`
1025
1023
 
1026
1024
  Test if `A >= B`.
1027
1025
 
@@ -1029,8 +1027,8 @@ Test if `A >= B`.
1029
1027
  ```typescript
1030
1028
  import { TS } from '@avstantso/ts';
1031
1029
 
1032
- type NumGreaterEq = TS.Comparisons.GTE<2, 2>; // true
1033
- type StrGreaterEq = TS.Comparisons.GTE<'b', 'b'>; // true
1030
+ type NumGreaterEq = TS.GTE<2, 2>; // true
1031
+ type StrGreaterEq = TS.GTE<'b', 'b'>; // true
1034
1032
  ```
1035
1033
 
1036
1034
  ---
@@ -1711,7 +1709,7 @@ const stringified = mapObjectValues(user, (key, value) => {
1711
1709
 
1712
1710
  ---
1713
1711
 
1714
- ## TS.Boolean
1712
+ ## Boolean Logic Types
1715
1713
 
1716
1714
  Boolean type utilities and logical operations.
1717
1715
 
@@ -1727,7 +1725,7 @@ type Yes = TS.If<true, 'yes', 'no'>; // 'yes'
1727
1725
  type No = TS.If<false, 'yes', 'no'>; // 'no'
1728
1726
  ```
1729
1727
 
1730
- ### `TS.If.And<Conditions, IfTrue = true, IfFalse = false>`
1728
+ ### `TS.And<Conditions, IfTrue = true, IfFalse = false>`
1731
1729
 
1732
1730
  Logical AND on array of conditions.
1733
1731
 
@@ -1735,11 +1733,11 @@ Logical AND on array of conditions.
1735
1733
  ```typescript
1736
1734
  import { TS } from '@avstantso/ts';
1737
1735
 
1738
- type AllTrue = TS.If.And<[true, true, true]>; // true
1739
- type OneFalse = TS.If.And<[true, false, true]>; // false
1736
+ type AllTrue = TS.And<[true, true, true]>; // true
1737
+ type OneFalse = TS.And<[true, false, true]>; // false
1740
1738
  ```
1741
1739
 
1742
- ### `TS.If.Or<Conditions, IfTrue = true, IfFalse = false>`
1740
+ ### `TS.Or<Conditions, IfTrue = true, IfFalse = false>`
1743
1741
 
1744
1742
  Logical OR on array of conditions.
1745
1743
 
@@ -1747,11 +1745,11 @@ Logical OR on array of conditions.
1747
1745
  ```typescript
1748
1746
  import { TS } from '@avstantso/ts';
1749
1747
 
1750
- type HasTrue = TS.If.Or<[false, true, false]>; // true
1751
- type AllFalse = TS.If.Or<[false, false, false]>; // false
1748
+ type HasTrue = TS.Or<[false, true, false]>; // true
1749
+ type AllFalse = TS.Or<[false, false, false]>; // false
1752
1750
  ```
1753
1751
 
1754
- ### `TS.If.Xor<Conditions, IfTrue = true, IfFalse = false>`
1752
+ ### `TS.Xor<Conditions, IfTrue = true, IfFalse = false>`
1755
1753
 
1756
1754
  Logical XOR on array of conditions (true if exactly one condition is true).
1757
1755
 
@@ -1759,9 +1757,9 @@ Logical XOR on array of conditions (true if exactly one condition is true).
1759
1757
  ```typescript
1760
1758
  import { TS } from '@avstantso/ts';
1761
1759
 
1762
- type OnlyOne = TS.If.Xor<[false, true, false]>; // true
1763
- type Multiple = TS.If.Xor<[true, true, false]>; // false
1764
- type None = TS.If.Xor<[false, false, false]>; // false
1760
+ type OnlyOne = TS.Xor<[false, true, false]>; // true
1761
+ type Multiple = TS.Xor<[true, true, false]>; // false
1762
+ type None = TS.Xor<[false, false, false]>; // false
1765
1763
  ```
1766
1764
 
1767
1765
  ---
@@ -2398,7 +2396,7 @@ type OnlyType = TS.Resolve<{ T: Function }>; // Function
2398
2396
 
2399
2397
  ---
2400
2398
 
2401
- ## TS Utility Types
2399
+ ## Utility Types
2402
2400
 
2403
2401
  Miscellaneous utility types for advanced type manipulation.
2404
2402
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@avstantso/ts",
3
3
  "license": "MIT",
4
4
  "author": "avstantso",
5
- "version": "1.3.2",
5
+ "version": "1.3.3",
6
6
  "description": "TypeScript helpers",
7
7
  "keywords": [
8
8
  "TypeScript"