{"id":17987785,"url":"https://github.com/dirkluijk/typescript-essentials","last_synced_at":"2025-07-23T06:37:21.678Z","repository":{"id":72723251,"uuid":"291557031","full_name":"dirkluijk/typescript-essentials","owner":"dirkluijk","description":"Must-have utility types and functions for TypeScript","archived":false,"fork":false,"pushed_at":"2020-09-06T13:29:54.000Z","size":226,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T04:04:55.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dirkluijk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-08-30T21:46:01.000Z","updated_at":"2020-09-06T13:29:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"8174affc-2c7c-42ca-bdf3-9b5f2956d8f9","html_url":"https://github.com/dirkluijk/typescript-essentials","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dirkluijk/typescript-essentials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Ftypescript-essentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Ftypescript-essentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Ftypescript-essentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Ftypescript-essentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirkluijk","download_url":"https://codeload.github.com/dirkluijk/typescript-essentials/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirkluijk%2Ftypescript-essentials/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266631701,"owners_count":23959422,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-29T19:09:38.588Z","updated_at":"2025-07-23T06:37:21.651Z","avatar_url":"https://github.com/dirkluijk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript Essentials\n\n\u003e Must-have utility types and functions for TypeScript\n\n[![NPM version](http://img.shields.io/npm/v/typescript-essentials.svg?style=flat-square)](https://www.npmjs.com/package/typescript-essentials)\n[![NPM downloads](http://img.shields.io/npm/dm/typescript-essentials.svg?style=flat-square)](https://www.npmjs.com/package/typescript-essentials)\n[![Build status](https://img.shields.io/travis/dirkluijk/typescript-essentials.svg?style=flat-square)](https://travis-ci.org/dirkluijk/typescript-essentials)\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n\n## Overview\n\nThis is a small util library which contains several types and functions that may\nbe useful in your TypeScript project. \n\n## Getting started 🌩\n\n##### npm\n\n```\nnpm install typescript-essentials\n```\n\n##### yarn\n\n```\nyarn add typescript-essentials\n```\n\n## Contents\n\n### Predicates \u0026 type-guards\n\nUseful to compose simple predicates, or to narrow types in arrays or other data structures.\n\n* [`Predicate` and `TypeGuard` interfaces](projects/typescript-essentials/src/lib/predicates/predicates.md)\n* [`not()` function](projects/typescript-essentials/src/lib/predicates/predicates.md) to negate predicates\n* [`matchesDiscriminator()` function](projects/typescript-essentials/src/lib/predicates/predicates.md) that returns a type guard\n* [`isNull()` type guard](projects/typescript-essentials/src/lib/predicates/predicates.md)\n* [`isUndefined()` type guard](projects/typescript-essentials/src/lib/predicates/predicates.md)\n* [`isNullOrUndefined()` type guard](projects/typescript-essentials/src/lib/predicates/predicates.md)\n* [`isNotNull()` type guard](projects/typescript-essentials/src/lib/predicates/predicates.md)\n* [`isNotUndefined()` type guard](projects/typescript-essentials/src/lib/predicates/predicates.md)\n* [`isNotNullOrUndefined()` type guard](projects/typescript-essentials/src/lib/predicates/predicates.md)\n\n### Generics\n\n* [`DiscriminatedUnion`](projects/typescript-essentials/src/lib/generics/generics.md) to narrow a union type using a discriminator field\n* [`Narrowable`](projects/typescript-essentials/src/lib/generics/generics.md) to identify a type that can be narrowed\n* [`Subtract`](projects/typescript-essentials/src/lib/generics/generics.md) to subtract types from one another\n* [`WithOptional`](projects/typescript-essentials/src/lib/generics/generics.md) to make certain properties optional\n\n### Array utils\n\n* [`uniqueValues()`](projects/typescript-essentials/src/lib/arrays/arrays.md)\n* [`exclude()`](projects/typescript-essentials/src/lib/arrays/arrays.md)\n* [`partition()`](projects/typescript-essentials/src/lib/arrays/arrays.md)\n\n### Object utils\n\n* [`omit()`](projects/typescript-essentials/src/lib/objects/objects.md)\n\n### Ordered\n\n* [`Ordered\u003cT\u003e` interface](projects/typescript-essentials/src/lib/ordering/ordering.md)\n* [`compareByOrder()` comparator function](projects/typescript-essentials/src/lib/ordering/ordering.md)\n\n### \"Track by\" functions for Angular \n\n* [`trackByIndex`](projects/typescript-essentials/src/lib/angular/angular.md)\n* [`trackById`](projects/typescript-essentials/src/lib/angular/angular.md)\n* [`trackByValue`](projects/typescript-essentials/src/lib/angular/angular.md)\n* [`createTrackByFn`](projects/typescript-essentials/src/lib/angular/angular.md)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/dirkluijk\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/2102973?v=4\" width=\"100px;\" alt=\"Dirk Luijk\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDirk Luijk\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/dirkluijk/typescript-essentials/commits?author=dirkluijk\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/dirkluijk/typescript-essentials/commits?author=dirkluijk\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://craftsmen.nl/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/16564855?v=4\" width=\"100px;\" alt=\"Daan Scheerens\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaan Scheerens\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-dscheerens\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkluijk%2Ftypescript-essentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirkluijk%2Ftypescript-essentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirkluijk%2Ftypescript-essentials/lists"}