{"id":13496154,"url":"https://github.com/gvergnaud/hotscript","last_synced_at":"2025-05-15T00:06:26.737Z","repository":{"id":65828196,"uuid":"600849732","full_name":"gvergnaud/hotscript","owner":"gvergnaud","description":"A library of composable functions for the type-level! Transform your TypeScript types in any way you want using functions you already know.","archived":false,"fork":false,"pushed_at":"2024-12-28T03:19:05.000Z","size":813,"stargazers_count":3592,"open_issues_count":31,"forks_count":59,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-05-15T00:04:15.125Z","etag":null,"topics":["type-level-programming","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gvergnaud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-12T19:25:57.000Z","updated_at":"2025-05-10T08:02:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"34b0b5b5-bdec-442f-89ea-b9e757efd43b","html_url":"https://github.com/gvergnaud/hotscript","commit_stats":{"total_commits":261,"total_committers":11,"mean_commits":"23.727272727272727","dds":0.3793103448275862,"last_synced_commit":"fccfc2fbc581f5ba93e05688697f1421dca66906"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvergnaud%2Fhotscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvergnaud%2Fhotscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvergnaud%2Fhotscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gvergnaud%2Fhotscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gvergnaud","download_url":"https://codeload.github.com/gvergnaud/hotscript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249199,"owners_count":22039029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["type-level-programming","typescript"],"created_at":"2024-07-31T19:01:43.112Z","updated_at":"2025-05-15T00:06:26.666Z","avatar_url":"https://github.com/gvergnaud.png","language":"TypeScript","readme":"# Higher-Order TypeScript (HOTScript)\n\nA library of composable functions for the type level!\n\nTransform your TypeScript types in any way you want using functions you already know.\n\n![image](https://user-images.githubusercontent.com/9265418/223854503-b54f6a62-9f21-4953-aaa3-5d54699516a7.png)\n\n## Features\n\n- Type-level higher-order functions (`Tuples.Map`, `Tuples.Filter`, `Objects.MapValues`, etc).\n- Type-level pattern matching with `Match`.\n- Performant math operations (`Numbers.Add`, `Numbers.Sub`, `Numbers.Mul`, `Numbers.Div`, etc).\n- Custom \"lambda\" functions.\n\n🚧 work in progress 🚧\n\n## Installation\n\nYou can find HotScript on npm:\n\n```ts\nnpm install -D hotscript\n```\n\nHotScript is a work-in-progress library, so expect **breaking changes** in its API.\n\n## Examples\n\n#### Transforming a list\n\n[Run this as a TypeScript Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgBWGApgGjgFQK5gA26AztgMoxTAB2A5mXAHJ4gBG6UJcAvnAGZQIIOACIAFhBgkAxtTAxRAbgBQKmAE8McKKQCMcALwo06ADwq4cAPTWrAPQD8cAGwAmS3ADae7G+wAzNgALAC6mJ5enlb4RKQAdACyAIZgZizsnCTxAIIAJnlmAQB8xdhWFTZ2XsHYAKzYLtgA7KHRuATE2QBSELRmovGiZZWjY1a2YsHxdfEu8c2i7ZTU9NnkRMAwA0Mj4+OTXqLBotiidadiLpeii22VsV1JqWYrtAzxyLoYNIWiesMRod-icznoLmDrmC7u1HgkUmk3mt4jgIBkOFA9hVDnpanBwdg9E18a1YZ0EuRWPtqQc7O5PG1ikogA)\n\n\u003c!-- prettier-ignore --\u003e\n```ts\nimport { Pipe, Tuples, Strings, Numbers } from \"hotscript\";\n\ntype res1 = Pipe\u003c\n  //  ^? 62\n  [1, 2, 3, 4],\n  [\n    Tuples.Map\u003cNumbers.Add\u003c3\u003e\u003e,       // [4, 5, 6, 7]\n    Tuples.Join\u003c\".\"\u003e,                 // \"4.5.6.7\"\n    Strings.Split\u003c\".\"\u003e,               // [\"4\", \"5\", \"6\", \"7\"]\n    Tuples.Map\u003cStrings.Prepend\u003c\"1\"\u003e\u003e, // [\"14\", \"15\", \"16\", \"17\"]\n    Tuples.Map\u003cStrings.ToNumber\u003e,     // [14, 15, 16, 17]\n    Tuples.Sum                        // 62\n  ]\n\u003e;\n```\n\n#### Defining a first-class function\n\n[Run this as a TypeScript Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgYQIYBt0Bo4DEB2OAKgK5joCmAznAL5wBmUEIcARABYQxUDGUwMDDYBuAFBiA9JLhEOwGgrio4MAJ5gKAWkoA3CunbpUIAEYATVGwCEY4PhgUoDVLwpwAImXTBeqR3AUAB6O+OY0BIhicHBQFDAkUPgAXHAA2jDyVGlsqFAA5gAMbAC6OJkKOXlFpSXitBLqmrHUJOgwAIxwALwoGOgAPKTk1AB0ALKoYANe5L7+FAB8OGkdOABMOADMOAAsJYvi0jEnAHoA-I0a7nFUbTDrPX2YQ95juMYwk9OzPn6Oy3SazgmzgOzg+0OUhkJzgFyAA)\n\n```ts\nimport { Call, Fn, Tuples } from \"hotscript\";\n\n// This is a type-level \"lambda\"!\ninterface Duplicate extends Fn {\n  return: [this[\"arg0\"], this[\"arg0\"]];\n}\n\ntype result1 = Call\u003cTuples.Map\u003cDuplicate\u003e, [1, 2, 3, 4]\u003e;\n//     ^? [[1, 1], [2, 2], [3, 3], [4, 4]]\n\ntype result2 = Call\u003cTuples.FlatMap\u003cDuplicate\u003e, [1, 2, 3, 4]\u003e;\n//     ^? [1, 1, 2, 2, 3, 3, 4, 4]\n```\n\n#### Transforming an object type\n\n[Run this as a TypeScript Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgBWGApgGjgeQEYBW6AxjAM7YBCEEANugIYB2ZcAvnAGZQQhwBEACwjliUNDH4BuAFAyA9PLgAZdDADkrYr0hl0cMr32cArk1LAILODAg2ozMp2h9mcCIRLwYATwwAuGV8MOAAVCABBZABJZAYfWggGABMAHlCAPjgAXhQ0dFSZODDMIrgAbTLi-CJSMgA6HBBgGEofVOo6RhZ6gFEARxMGWjJUsh8QPDoMjNLi6s86+oiyMmAAcyZUpBA1FIYYBn9EOCZ0AHcAVT0oY5goE30ONlmq3EXyeoBlJgYAa3QAGEGHoACLodBgObzGpeBorNabbZwYDJY5ke7AJjrdgZMoAXRkGVkwX0UWi13QUByYUiMTiCSSaQQZUU8wAegB+Mqo9ETKa0WTFTjAKAYgByDF26Mx2KFcFoIJgkulBll61kL1kbIASmoTFAWIFSWEaSziry1eI5WVdodkgcjiczucAPomG53B5PeUisUwV2-VUY60asqKjGBqXoGWhzVSIA)\n\n```ts\nimport { Pipe, Objects, Booleans } from \"hotscript\";\n\n// Let's compose some functions to transform an object type:\ntype ToAPIPayload\u003cT\u003e = Pipe\u003c\n  T,\n  [\n    Objects.OmitBy\u003cBooleans.Equals\u003csymbol\u003e\u003e,\n    Objects.Assign\u003c{ metadata: { newUser: true } }\u003e,\n    Objects.SnakeCaseDeep,\n    Objects.Assign\u003c{ id: string }\u003e\n  ]\n\u003e;\ntype T = ToAPIPayload\u003c{\n  id: symbol;\n  firstName: string;\n  lastName: string;\n}\u003e;\n// Returns:\ntype T = {\n  id: string;\n  metadata: { new_user: true };\n  first_name: string;\n  last_name: string;\n};\n```\n\n#### Parsing a route path\n\n[Run this as a TypeScript Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgBWGApgGjgeQEYBW6AxjAM7YDKMUwAdgOYVwDCE4EZ6AMugGYxsAFQCuYADbpmAWQCGMYgAs4AXzh8o7OACJFEcsVpgY2gNwAoczACeGOFCkBWOAF4UadAB5zcOAHo-X18APQB+Hx0-ES4oMj9PYAATAC4yGnoGAD4-SDS4hLpE9AAPZLoREDx0KEztTAiAbQjfalpGMgA6SglgGE9tP21M+qC4UQkpDoAxYHEYas9WjM7qWVgyAHVexX7+zOHmsbFJTrkwb1HfNg4uXgFPJsugpfaOoVoQXe04AB8dWoOTxa6Ve3XEvX6ySGI0uAF1ModAUFxic3hAAKp0YAQOgw3z4IikTpTTQgACidHSUjxuEIJHIHTOADVZOIRFILpc5Aodo8gdylB0tjAdto0m0GHU4OKMkingLFELtv1ypVqlLVVUaodfPDERFYeZMqYgA)\n\nhttps://user-images.githubusercontent.com/2315749/222081717-96217cd2-ac89-4e06-a942-17fbda717cd2.mp4\n\n```ts\nimport { Pipe, Objects, Strings, ComposeLeft, Tuples, Match } from \"hotscript\";\n\ntype res5 = Pipe\u003c\n  //    ^? { id: string, index: number }\n  \"/users/\u003cid:string\u003e/posts/\u003cindex:number\u003e\",\n  [\n    Strings.Split\u003c\"/\"\u003e,\n    Tuples.Filter\u003cStrings.StartsWith\u003c\"\u003c\"\u003e\u003e,\n    Tuples.Map\u003cComposeLeft\u003c[Strings.Trim\u003c\"\u003c\" | \"\u003e\"\u003e, Strings.Split\u003c\":\"\u003e]\u003e\u003e,\n    Tuples.ToUnion,\n    Objects.FromEntries,\n    Objects.MapValues\u003c\n      Match\u003c[Match.With\u003c\"string\", string\u003e, Match.With\u003c\"number\", number\u003e]\u003e\n    \u003e\n  ]\n\u003e;\n```\n### Make querySelector typesafe\n\n[Run this as a TypeScript Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wBJwGZQiOAcgAsIZUBjKYMGQgKHoBMBTCgG2ShZwFcA7CjGAR+cAI68WUAJ4BlFuzYxoAHgAqcFgA8YLfk3SoY1fgHMAfAApUi5dABccdQEonAUSUh9MAGJ4QBSUhNXULOAAfOH5ednZGYH49KGxkCh51agIdPQN0DAA6XzEAb3o4CrhuGF4ofgdyyphiYFQAbQAiLjMABg6AXS1dfUM4AAMAEhLE7Gk4AAVuADcAXzgAGimZuYA5HJWxuAB+RorCiY0s9fGpxZZVzZK93QPwhsq4ZtbO7r7BnJG6Em034sygC2WK2uW1Bu32hxOH3Ol1A12BdweU2eMFecHeTRa7S6UF6AyGuVGwO24IxKwcrSsMLBcE8KxcTLmACUWMYDsdTpgChdMqibiVaVNWVNubyxm8BV8ib8yQC8mLqRD7nSAO7EaQsRkg5ms9lGrk8nEIgXIkUgNG3SGS9graUW3H4iqKn4kv7kwHq2Hg1mG4ymMxsjngmWW-lIoUou1iqUlaPuhWE72k-7DNVUwMs51tKahxLh-qRuCpq1x4VXJPO12y+UfL3ErP0FaMGAyMA8TwsbxJfz4IL2KAacIAXkF8xoLA01zaAtt62tBTkJlLqHXYHYwBgqkIRAsq7j6l4u55BQAMmgYKfKoUN2Ht3Jd-vD+tCCe1+fL9v1AgABVfgRH4B8znXTdzFfd8Dw6BwOkiOAOk6ZCOgKJCog6ABiDofzPC8lG3ABBA8egIx8CgAWWQGAKGIVQlw+ONaPo4gCgAdX3RiAGsWBkCBsEwdRqOvftBxgdRkDMHZkG8WiwGuQoAHkACMACtlG3ABxFgD0KAB9ZTRPErwfGk2T5JYRSLEoljBTYhiuJ41RkH4GQTLEiSfAsAV+j8gLGHoChRGMKoeR6OBp0kaR5DsEIoCsDoEA6FwAG56AAeiyliAD0TlC-hwu4VAAEZookKRZFHRLkrANLMpy-LCrC+BSoAJkq2KaoSlQko6JhgCWAoODQVA5O8Rrstyj4CpCtqItQABmbrqvi4J+uSoaljgcJkGm5q5ta4r2p5AAWNa4tqraOjANo6JMfpDtmyp5qKkqeQAViu3rNugbbhrgMACj0XQUDaYhuGwSdCBwwhnoymaWoW06loANl+jax2SnDgCYF6UY+s7UAAdixm6AcG4aHpgJ6HGINArDAPa4FDUQzBcQnjtRz7UAADgpvqqfpVArB22mnuuMAuaRo63pOvmAE4hf+gaJceqB+mlyWtYZpmWfCdnzFlprXoqd7FtKsqopi9bKfVoG3kZsXkFZ0WrDU64KBcWXkZ54L6CAA)\n```ts\nimport * as H from 'hotscript'\n\ndeclare function querySelector\u003cT extends string\u003e(selector: T): ElementFromSelector\u003cT\u003e | null\n\ninterface Trim extends H.Fn {\n    return:\n    this[\"arg0\"] extends `${infer Prev} ,${infer Next}` ?\n    H.$\u003cTrim, `${Prev},${Next}`\u003e :\n    this[\"arg0\"] extends `${infer Prev}, ${infer Next}` ?\n    H.$\u003cTrim, `${Prev},${Next}`\u003e :\n    this[\"arg0\"] extends `${infer Prev}:is(${infer El})${infer Rest}` ?\n    H.$\u003cTrim, `${Prev}${El}${Rest}`\u003e :\n    this[\"arg0\"] extends `${infer Prev}:where(${infer El})${infer Rest}` ?\n    H.$\u003cTrim, `${Prev}${El}${Rest}`\u003e :\n    this[\"arg0\"] extends `${infer El}(${string})${infer Rest}` ?\n    H.$\u003cTrim, `${El}${Rest}`\u003e :\n    this[\"arg0\"] extends `${infer El}[${string}]${infer Rest}` ?\n    H.$\u003cTrim, `${El}${Rest}`\u003e :\n    this[\"arg0\"]\n}\n\ntype ElementFromSelector\u003cT\u003e = H.Pipe\u003cT, [\n    Trim,\n    H.Strings.Split\u003c' '\u003e,\n    H.Tuples.Last,\n    H.Strings.Split\u003c','\u003e,\n    H.Tuples.ToUnion,\n    H.Strings.Split\u003c\":\" | \"[\" | \".\" | \"#\"\u003e,\n    H.Tuples.At\u003c0\u003e,\n    H.Match\u003c[\n        H.Match.With\u003ckeyof HTMLElementTagNameMap, H.Objects.Get\u003cH._, HTMLElementTagNameMap\u003e\u003e,\n        H.Match.With\u003cany, HTMLElement\u003e\n    ]\u003e\n]\u003e\n```\n![image](https://github.com/gvergnaud/hotscript/assets/633115/d75fe58e-e677-4ead-9cd2-b82a32d0cec7)\n\n\n## API\n\n- [x] Core\n  - [x] `Pipe\u003cInput, Fn[]\u003e`: Pipes a type through several functions.\n  - [x] `PipeRight\u003cFn[], Input\u003e`: Pipe a type from right to left.\n  - [x] `Call\u003cFn, ...Arg\u003e`: Call a type level `Fn` function.\n  - [x] `Apply\u003cFn, Arg[]\u003e`: Apply several arguments to an `Fn` function.\n  - [x] `PartialApply\u003cFn, Arg[]\u003e`: Make an `Fn` partially applicable.\n  - [x] `Compose\u003cFn[]\u003e`: Compose `Fn` functions from right to left.\n  - [x] `ComposeLeft\u003cFn[]\u003e`: Compose `Fn` functions from left to right.\n  - [x] `args`, `arg0`, `arg1`, `arg2`, `arg3`: Access piped parameters (Useful in combination with `Objects.Create`).\n  - [x] `_`: Placeholder to partially apply any built-in functions, or functions created with `PartialApply`.\n- [x] Function\n  - [x] `ReturnType\u003cFunctionType\u003e`: Extract the return type from a function type.\n  - [x] `Parameters\u003cFunctionType\u003e`: Extract the parameters from a function type as a tuple.\n  - [x] `Parameter\u003cN, FunctionType\u003e`: Extract the parameter at index `N` from a function type.\n  - [x] `MapReturnType\u003cFn, FunctionType\u003e`: Transform the return type of a function type using an `Fn`.\n  - [x] `MapParameters\u003cFn, FunctionType\u003e`: Transform the tuple of parameters of a function type using an `Fn`.\n- [x] Tuples\n  - [x] `Create\u003cX\u003e -\u003e [X]`: Create a unary tuple from a type.\n  - [x] `Partition\u003cFn, Tuple\u003e`: Using a predicate `Fn`, turn a list of types into two lists `[Passing[], Rejected[]]`.\n  - [x] `IsEmpty\u003cTuple\u003e`: Check if a tuple is empty.\n  - [x] `Zip\u003c...Tuple[]\u003e`: Zips several tuples together. For example. it would turn `[[a,b,c], [1,2,3]]` into `[[a, 1], [b, 2], [c, 3]]`.\n  - [x] `ZipWith\u003cFn, ...Tuple[]\u003e`: Zip several tuples by calling a zipper `Fn` with one argument per input tuple.\n  - [x] `Sort\u003cTuple\u003e`: Sorts a tuple of number literals.\n  - [x] `Head\u003cTuple\u003e`: Returns the first element from a tuple type.\n  - [x] `Tail\u003cTuple\u003e`: Drops the first element from a tuple type.\n  - [x] `At\u003cN, Tuple\u003e`: Returns the `N`th element from a tuple.\n  - [x] `Last\u003cTuple\u003e`: Returns the last element from a tuple.\n  - [x] `FlatMap\u003cFn, Tuple\u003e`: Calls an `Fn` function returning a tuple on each element of the input tuple, and flattens all of the returned tuples into a single one.\n  - [x] `Find\u003cFn, Tuple\u003e`: Finds an element from a tuple using a predicate `Fn`.\n  - [x] `Drop\u003cN, Tuple\u003e`: Drops the `N` first elements from a tuple.\n  - [x] `Take\u003cN, Tuple\u003e`: Takes the `N` first elements from a tuple.\n  - [x] `TakeWhile\u003cFn, Tuple\u003e`: Take elements while the `Fn` predicate returns `true`.\n  - [x] `GroupBy\u003cFn, Tuple\u003e`: Transform a list into an object containing lists. The `Fn` function takes each element and returns the key it should be added to.\n  - [x] `Join\u003cStr, Tuple\u003e`: Joins several strings together using the `Str` separator string.\n  - [x] `Map\u003cFn, Tuple\u003e`: Transforms each element in a tuple.\n  - [x] `Filter\u003cFn, Tuple\u003e`: Removes elements from a tuple if the `Fn` predicate function doesn't return `true`.\n  - [x] `Reduce\u003cFn, Init, Tuple\u003e`: Iterates over a tuple a reduce it to a single function using a reducer `Fn`.\n  - [x] `ReduceRight\u003cFn, Init, Tuple\u003e`: like `Reduce`, but starting from the end of the list.\n  - [x] `Reverse\u003cTuple\u003e`: Reverses the tuple.\n  - [x] `Every\u003cFn, Tuple\u003e`: Checks if all element passes the `Fn` predicate.\n  - [x] `Some\u003cFn, Tuple\u003e`: Checks if at least one element passes the `Fn` predicate.\n  - [x] `SplitAt\u003cN, Tuple\u003e`: Split a tuple into a left and a right tuple using an index.\n  - [x] `ToUnion\u003cTuple\u003e`: Turns a tuple into a union of elements.\n  - [x] `ToIntersection\u003cTuple\u003e`: Turns a tuple into an intersection of elements.\n  - [x] `Prepend\u003cX, Tuple\u003e`: Adds a type at the beginning of a tuple.\n  - [x] `Append\u003cX, Tuple\u003e`: Adds a type at the end of a tuple.\n  - [x] `Concat\u003cT1, T2\u003e`: Merges two tuples together.\n  - [x] `Min\u003cTuple\u003e`: Returns the minimum number in a list of number literal types.\n  - [x] `Max\u003cTuple\u003e`: Returns the maximum number in a list of number literal types.\n  - [x] `Sum\u003cTuple\u003e`: Add all numbers in a list of number literal types together.\n- [x] Object\n  - [x] `Readonly\u003cObj\u003e`: Makes all object keys `readonly`.\n  - [x] `Mutable\u003cObj\u003e`: Removes `readonly` from all object keys.\n  - [x] `Required\u003cObj\u003e`: Makes all keys required.\n  - [x] `Partial\u003cObj\u003e`: Makes all keys optional.\n  - [x] `ReadonlyDeep\u003cObj\u003e`: Recursively makes all object keys `readonly`.\n  - [x] `MutableDeep\u003cObj\u003e`: Recursively removes `readonly` from all object keys.\n  - [x] `RequiredDeep\u003cObj\u003e`: Recursively makes all keys required.\n  - [x] `PartialDeep\u003cObj\u003e`: Recursively makes all keys optional.\n  - [x] `Update\u003cPath, Fn | V, Obj\u003e`: Immutably update an object's field under a certain path. Paths are dot-separated strings: `a.b.c`.\n  - [x] `Record\u003cKey, Value\u003e`: Creates an object type with keys of type `Key` and values of type `Value`.\n  - [x] `Keys\u003cObj\u003e`: Extracts the keys from an object type `Obj`.\n  - [x] `Values\u003cObj\u003e`: Extracts the values from an object type `Obj`.\n  - [x] `AllPaths\u003cObj\u003e`: Extracts all possible paths of an object type `Obj`.\n  - [x] `Create\u003cPattern, X\u003e`: Creates an object of type Pattern with values of type X.\n  - [x] `Get\u003cPath, Obj\u003e`: Gets the value at the specified path `Path` in the object `Obj`.\n  - [x] `FromEntries\u003c[Key, Value]\u003e`: Creates an object from a union of key-value pairs.\n  - [x] `Entries\u003cObj\u003e`: Extracts the union of key-value pairs from an object type `Obj`.\n  - [x] `MapValues\u003cFn, Obj\u003e`: Transforms the values of an object type `Obj` using a mapper function `Fn`.\n  - [x] `MapKeys\u003cFn, Obj\u003e`: Transforms the keys of an object type `Obj` using a mapper function `Fn`.\n  - [x] `Assign\u003c...Obj\u003e`: Merges multiple objects together.\n  - [x] `Pick\u003cKey, Obj\u003e`: Picks specific keys `Key` from an object type `Obj`.\n  - [x] `PickBy\u003cFn, Obj\u003e`: Picks keys from an object type `Obj` based on a predicate function `Fn`.\n  - [x] `Omit\u003cKey, Obj\u003e`: Omits specific keys `Key` from an object type `Obj`.\n  - [x] `OmitBy\u003cFn, Obj\u003e`: Omits keys from an object type `Obj` based on a predicate function `Fn`.\n  - [x] `CamelCase\u003cObj\u003e`: Converts the keys of an object type `Obj` to camelCase.\n  - [x] `CamelCaseDeep\u003cObj\u003e`: Recursively converts the keys of an object type `Obj` to camelCase.\n  - [x] `SnakeCase\u003cObj\u003e`: Converts the keys of an object type `Obj` to snake_case.\n  - [x] `SnakeCaseDeep\u003cObj\u003e`: Recursively converts the keys of an object `type` Obj to snake_case.\n  - [x] `KebabCase\u003cObj\u003e`: Converts the keys of an object type `Obj` to kebab-case.\n  - [x] `KebabCaseDeep\u003cObj\u003e`: Recursively converts the keys of an object type Obj to kebab-case.\n- [x] Union\n  - [x] `Map\u003cFn, U\u003e`: Transforms each member of a union type `U` using a mapper function `Fn`.\n  - [x] `Extract\u003cT, U\u003e`: Extracts the subset of a union type `U` that is assignable to type `T`.\n  - [x] `ExtractBy\u003cFn, U\u003e`: Extracts the subset of a union type`U`that satisfies the predicate function `Fn`.\n  - [x] `Exclude\u003cT, U\u003e`: Excludes the subset of a union type`U`that is assignable to type `T`.\n  - [x] `ExcludeBy\u003cFn, U\u003e`: Excludes the subset of a union type`U`that satisfies the predicate function `Fn`.\n  - [x] `NonNullable\u003cU\u003e`: Removes null and undefined from a union type `U`.\n  - [x] `ToTuple\u003cU\u003e`: Converts a union type`U`to a tuple type.\n  - [x] `ToIntersection\u003cU\u003e`: Converts a union type`U`to an intersection type.\n- [x] String\n  - [x] `Length\u003cStr\u003e`: Returns the length of a string type `Str`.\n  - [x] `TrimLeft\u003cChar, Str\u003e`: Removes the specified character from the left side of a string type `Str`.\n  - [x] `TrimRight\u003cChar, Str\u003e`: Removes the specified character from the right side of a string type `Str`.\n  - [x] `Trim\u003cChar, Str\u003e`: Removes the specified character from both sides of a string type `Str`.\n  - [x] `Join\u003cSep, Str\u003e`: Joins multiple string type `Str` with a separator `Sep`.\n  - [x] `Replace\u003cFrom, To, Str\u003e`: Replaces all occurrences of a substring `From` with another substring `To` in a string type `Str`.\n  - [x] `Slice\u003cStart, End, Str\u003e`: Extracts a portion of a string type `Str` from index `Start` to index `End`.\n  - [x] `Split\u003cSep, Str\u003e`: Splits a string type `Str` into a tuple of substrings using a separator `Sep`.\n  - [x] `Repeat\u003cN, Str\u003e`: Repeats a string type `Str` `N` times.\n  - [x] `StartsWith\u003cS, Str\u003e`: Checks if a string type `Str` starts with a substring `S`.\n  - [x] `EndsWith\u003cE, Str\u003e`: Checks if a string type `Str` ends with a substring `E`.\n  - [x] `ToTuple\u003cStr\u003e`: Converts a string type `Str` to a tuple type.\n  - [x] `ToNumber\u003cStr\u003e`: Converts a string type `Str` to a number type.\n  - [x] `ToString\u003cT\u003e`: Converts any literal type `T` to a string literal type.\n  - [x] `Prepend\u003cStart, Str\u003e`: Prepends a string type `Start` to the beginning of a string type `Str`.\n  - [x] `Append\u003cEnd, Str\u003e`: Appends a string type `End` to the end of a string type `Str`.\n  - [x] `Uppercase\u003cStr\u003e`: Converts a string type `Str` to uppercase.\n  - [x] `Lowercase\u003cStr\u003e`: Converts a string type `Str` to lowercase.\n  - [x] `Capitalize\u003cStr\u003e`: Capitalizes the first letter of a string type `Str`.\n  - [x] `Uncapitalize\u003cStr\u003e`: Converts the first letter of a string type `Str` to lowercase.\n  - [x] `SnakeCase\u003cStr\u003e`: Converts a string type `Str` to snake_case.\n  - [x] `CamelCase\u003cStr\u003e`: Converts a string type `Str` to camelCase.\n  - [x] `KebabCase\u003cStr\u003e`: Converts a string type `Str` to kebab-case.\n  - [x] `Compare\u003cStr1, Str2\u003e`: Compares two string types `Str1` and `Str2` and returns a number indicating their relative order.\n  - [x] `Equal\u003cStr1, Str2\u003e`: Checks if two string types `Str1` and `Str2` are equal.\n  - [x] `NotEqual\u003cStr1, Str2\u003e`: Checks if two string types `Str1` and `Str2` are not equal.\n  - [x] `LessThan\u003cStr1, Str2\u003e`: Checks if `Str1` is less than `Str2` in lexicographical order.\n  - [x] `LessThanOrEqual\u003cStr1, Str2\u003e`: Checks if `Str1` is less than or equal to `Str2` in lexicographical order.\n  - [x] `GreaterThan\u003cStr1, Str2\u003e`: Checks if `Str1` is greater than `Str2` in lexicographical order.\n  - [x] `GreaterThanOrEqual\u003cStr1, Str2\u003e`: Checks if `Str1` is greater than or equal to `Str2` in lexicographical order.\n- [x] Number\n  - [x] `Add\u003cN, M\u003e`: Adds two number types `N` and `M`.\n  - [x] `Multiply\u003cN, M\u003e`: Multiplies two number types `N` and `M`.\n  - [x] `Subtract\u003cN, M\u003e`: Subtracts the number type `M` from `N`.\n  - [x] `Negate\u003cN\u003e`: Negates a number type `N` by changing its sign.\n  - [x] `Power\u003cN, M\u003e`: Raises a number type `N` to the power of `M`.\n  - [x] `Div\u003cN, M\u003e`: Divides a number type `N` by `M`.\n  - [x] `Mod\u003cN, M\u003e`: Calculates the remainder of dividing a number type `N` by `M`.\n  - [x] `Abs\u003cN\u003e`: Returns the absolute value of a number type `N`.\n  - [x] `Compare\u003cN, M\u003e`: Compares two number types `N` and `M` and returns a number indicating their relative order.\n  - [x] `GreaterThan\u003cN, M\u003e`: Checks if the number type `N` is greater than `M`.\n  - [x] `GreaterThanOrEqual\u003cN, M\u003e`: Checks if the number type `N` is greater than or equal to `M`.\n  - [x] `LessThan\u003cN, M\u003e`: Checks if the number type `N` is less than `M`.\n  - [x] `LessThanOrEqual\u003cN, M\u003e`: Checks if the number type `N` is less than or equal to `M`.\n- [x] Boolean\n  - [x] `And\u003cBool1, Bool2\u003e`: Performs a logical AND operation between two boolean types `Bool1` and `Bool2`.\n  - [x] `Or\u003cBool1, Bool2\u003e`: Performs a logical OR operation between two boolean types `Bool1` and `Bool2`.\n  - [x] `XOr\u003cBool1, Bool2\u003e`: Performs a logical XOR (exclusive OR) operation between two boolean types `Bool1` and `Bool2`.\n  - [x] `Not\u003cBool\u003e`: Performs a logical NOT operation on a boolean type `Bool`.\n  - [x] `Extends\u003cA, B\u003e`: Checks if type `A` extends or is equal to type `B`.\n  - [x] `Equals\u003cA, B\u003e`: Checks if type `A` is equal to type `B`.\n  - [x] `DoesNotExtend\u003cA, B\u003e`: Checks if type `A` does not extend type `B`.\n","funding_links":[],"categories":["TypeScript","typescript","Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvergnaud%2Fhotscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgvergnaud%2Fhotscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgvergnaud%2Fhotscript/lists"}