Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-toolbelt

Package Overview
Dependencies
Maintainers
1
Versions
916
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-toolbelt - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

2

package.json
{
"name": "ts-toolbelt",
"version": "0.0.12",
"version": "0.0.13",
"license": "AGPL-3.0-only",

@@ -5,0 +5,0 @@ "author": "Pierre-Antoine Mills",

@@ -16,5 +16,43 @@ <center>

type t = T.N.Minus<'0', '20'> // -20
// Do basic number operations
type test0 = T.N.Minus<'5', '20'> // -15
type O = {
a: {
b: {
c: 'hello'
d: 'goodbye'
}
}
}
// Deeply change a type
type test1 = T.O.P.Update<O, ['a', 'b', 'c' | 'd'], [1, 2, 3]>
// Or just merge them
type test2 = T.O.Merge<O, {x: 'hello'}>
```
And so much more... But before you start reading the docs:
The library is organized around TypeScript concepts:
- T.**A**: **A**ny types
- T.**B**: **B**oolean types
- T.**C**: **C**lass types
- T.**F**: **F**untion types
- T.**I**: **I**teration types
- T.**N**: **N**umber types
- T.**O**: **O**bject types
- T.**S**: **S**tring types
- T.**T**: **T**uple types
- T.**U**: **U**nion types
```ts
type test3 = T.A.Is<'hello', string> // true
type test4 = T.A.Concat<[1, 2], [3, 4]> // [1, 2, 3, 4]
```
# [Documentation](https://pirix-gh.github.io/ts-toolbelt/)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc