ts-toolbelt
Advanced tools
Comparing version 8.4.0 to 9.1.6-test.1611974721747
{ | ||
"name": "ts-toolbelt", | ||
"version": "8.4.0", | ||
"description": "Get the most out of TypeScript", | ||
"version": "9.1.6-test.1611974721747", | ||
"description": "TypeScript's largest utility library", | ||
"keywords": [ | ||
@@ -28,19 +28,19 @@ "safe", | ||
"scripts": { | ||
"build:clean": "bash scr/build/clean.sh", | ||
"build:code": "bash scr/build/code.sh", | ||
"build:docs": "bash scr/build/docs.sh", | ||
"build:types": "bash scr/build/types.sh", | ||
"ci:branch:ad": "bash scr/ci/branch/ad.sh", | ||
"ci:branch:bd": "bash scr/ci/branch/bd.sh", | ||
"ci:docs:ad": "bash scr/ci/docs/ad.sh", | ||
"ci:docs:bd": "bash scr/ci/docs/bd.sh", | ||
"ci:master:ad": "bash scr/ci/master/ad.sh", | ||
"ci:master:bd": "bash scr/ci/master/bd.sh", | ||
"ci:test:ad": "bash scr/ci/test/ad.sh", | ||
"ci:test:bd": "bash scr/ci/test/bd.sh", | ||
"release": "bash scr/release.sh", | ||
"test": "bash scr/test/all.sh", | ||
"test:code": "bash scr/test/code.sh", | ||
"test:lint": "bash scr/test/lint.sh", | ||
"test:types": "bash scr/test/types.sh" | ||
"build:clean": "bash scripts/build/clean.sh", | ||
"build:code": "bash scripts/build/code.sh", | ||
"build:docs": "bash scripts/build/docs.sh", | ||
"build:types": "bash scripts/build/types.sh", | ||
"ci:branch:ad": "bash scripts/ci/branch/ad.sh", | ||
"ci:branch:bd": "bash scripts/ci/branch/bd.sh", | ||
"ci:docs:ad": "bash scripts/ci/docs/ad.sh", | ||
"ci:docs:bd": "bash scripts/ci/docs/bd.sh", | ||
"ci:master:ad": "bash scripts/ci/master/ad.sh", | ||
"ci:master:bd": "bash scripts/ci/master/bd.sh", | ||
"ci:test:ad": "bash scripts/ci/test/ad.sh", | ||
"ci:test:bd": "bash scripts/ci/test/bd.sh", | ||
"release": "bash scripts/release.sh", | ||
"test": "bash scripts/test/all.sh", | ||
"test:code": "bash scripts/test/code.sh", | ||
"test:lint": "bash scripts/test/lint.sh", | ||
"test:types": "bash scripts/test/types.sh" | ||
}, | ||
@@ -63,4 +63,4 @@ "dependencies": {}, | ||
"typedoc": "^0.17.0", | ||
"typescript": "4.1.0-dev.20200917" | ||
"typescript": "4.1.3" | ||
} | ||
} |
213
README.md
<p align="center"> | ||
<a href="https://github.com/millsp/ts-toolbelt"> | ||
<img alt="logo" title="ts-toolbelt" src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/logo.png" width="175" alt="Logo"> | ||
<img alt="banner" title="ts-toolbelt" src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/banner.svg"> | ||
</a> | ||
<h1 align="center">ts-toolbelt</h1> | ||
<h4 align="center">Higher Type Safety for TypeScript. A collection of useful types.</h4> | ||
<h4 align="center">TypeScript's largest utility library</h4> | ||
</p> | ||
@@ -46,20 +45,5 @@ | ||
<p align="center"> | ||
<a href="https://www.buymeacoffee.com/millsp" > | ||
<img src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/donate.svg" height="20px" alt="Donate"> | ||
</a> | ||
<a href="https://patreon.com/pirix" > | ||
<img src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/patreon.svg" height="20px" alt="Support Me"> | ||
</a> | ||
<a href="https://issuehunt.io/r/millsp/ts-toolbelt" > | ||
<img src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/issuehunt.svg" height="20px" alt="Fund an Issue"> | ||
</a> | ||
<a href="https://tidelift.com/subscription/pkg/npm-ts-toolbelt?utm_source=npm-ts-toolbelt&utm_medium=referral&utm_campaign=readme" > | ||
<img src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/tidelift.svg" height="20px" alt="Join Tidelift"> | ||
</a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://millsp.github.io/ts-toolbelt/">๐ Read Docs</a> | ||
<a href="https://millsp.github.io/ts-toolbelt/">๐ Documentation</a> | ||
ยท | ||
<a href="#demo">๐ฎ View Demo</a> | ||
<a href="https://github.com/millsp/ts-toolbelt/issues?utf8=โ&q=is%3Aissue+label%3Aannouncement+sort%3Acreated-desc+">๐ฃ Announcements</a> | ||
ยท | ||
@@ -73,21 +57,4 @@ <a href="https://github.com/millsp/ts-toolbelt/issues/new?template=---bug-report.md" alt="Bug Report">๐ Report Bug</a> | ||
## Table of Contents | ||
## About | ||
* [๐ About](#-about) | ||
* [๐ฉ Features](#-features) | ||
* [๐ Getting started](#-getting-started) | ||
* [๐ Documentation](#-documentation-) | ||
* [๐ง Good to know](#-good-to-know-) | ||
* [๐ฃ Announcements](#-announcements-) | ||
* [๐ Contributing](#-contributing) | ||
* [๐ Running tests](#-running-tests) | ||
* [๐ง Compatibility](#-compatibility) | ||
* [๐ Sponsoring issues](#-sponsoring-issues) | ||
* [๐ฎ What's next](#-whats-next) | ||
* [๐ Acknowledgements](#-acknowledgements) | ||
## ๐ About | ||
<h4 align="center"><i>"Avoid bugs by writing high quality types"</i></h4><br> | ||
**ts-toolbelt** ships **utility types** that provide simple ways to **update**, **change**, and **compute** TypeScript types. | ||
@@ -99,2 +66,8 @@ It offers unique dynamic features, allowing you to write type-safe software more **easily** and in **less time** than you do today. | ||
<p align="center"> | ||
<a href="https://codesandbox.io/s/ts-toolbelt-x4jly?file=/src/index.ts"> | ||
<img alt="demo" title="ts-toolbelt" src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/demo.svg"> | ||
</a> | ||
</p> | ||
### Goals | ||
@@ -109,31 +82,11 @@ | ||
* This package aims to be the home of all **utility types** | ||
* [Answer questions about types and share knowledge](#-good-to-know-) | ||
* [Answer questions about types and share knowledge](#good-to-know-) | ||
You'll find all the types you can ever need in this single and **well organized** package. | ||
## Getting Started | ||
## ๐ฉ Features | ||
Here's some of the most useful utilities: | ||
* [Merge two types together](https://millsp.github.io/ts-toolbelt/modules/_object_merge_.html) | ||
* [Update the field of a type](https://millsp.github.io/ts-toolbelt/modules/_object_update_.html) | ||
* [Make some fields optional](https://millsp.github.io/ts-toolbelt/modules/_object_optional_.html) | ||
* [Change a type at any depth!](https://millsp.github.io/ts-toolbelt/modules/_object_p_update_.html) | ||
* [Concat two lists together](https://millsp.github.io/ts-toolbelt/modules/_list_concat_.html) | ||
* [Get the last item of a list](https://millsp.github.io/ts-toolbelt/modules/_list_last_.html) | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/demo.gif" id="demo" width="750px"> | ||
<p align="center"> | ||
> **`TIP`** If you don't find the type you are looking for, you are welcome to open a [feature request](https://github.com/millsp/ts-toolbelt/issues/new?template=---feature-request.md)! | ||
## ๐ Getting Started | ||
### Prerequisites | ||
Lowest TypeScript [support](#-compatibility) starts at v3.5 | ||
```sh | ||
npm install typescript@^3.8.0 --save-dev | ||
npm install typescript@^4.2.0 --save-dev | ||
``` | ||
@@ -151,7 +104,2 @@ | ||
"strict": true, | ||
// this is the lowest supported standard library | ||
"lib": [ | ||
"es2015", | ||
], | ||
} | ||
@@ -186,36 +134,4 @@ } | ||
## [๐ Documentation โคข](https://millsp.github.io/ts-toolbelt/) | ||
## [Documentation โคข](https://millsp.github.io/ts-toolbelt/) | ||
### Where to start | ||
To get you started, we recommend that you visit the documentation of the following essential tools. | ||
| Object | List | Function | Any | Union | | ||
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| | ||
| [Either](https://millsp.github.io/ts-toolbelt/modules/_object_either_.html) | [Append](https://millsp.github.io/ts-toolbelt/modules/_list_append_.html) | [NoInfer](https://millsp.github.io/ts-toolbelt/modules/_function_noinfer_.html) | [Compute](https://millsp.github.io/ts-toolbelt/modules/_any_compute_.html) | [Filter](https://millsp.github.io/ts-toolbelt/modules/_union_filter_.html) | | ||
| [Exclude](https://millsp.github.io/ts-toolbelt/modules/_object_exclude_.html) | [Concat](https://millsp.github.io/ts-toolbelt/modules/_list_concat_.html) | [Parameters](https://millsp.github.io/ts-toolbelt/modules/_function_parameters_.html) | [Promisable](https://millsp.github.io/ts-toolbelt/modules/_any_promisable_.html) | [IntersectOf](https://millsp.github.io/ts-toolbelt/modules/_union_intersectof_.html) | | ||
| [Filter](https://millsp.github.io/ts-toolbelt/modules/_object_filter_.html) | [Drop](https://millsp.github.io/ts-toolbelt/modules/_list_drop_.html) | [Promisify](https://millsp.github.io/ts-toolbelt/modules/_function_promisify_.html) | [Type](https://millsp.github.io/ts-toolbelt/modules/_any_type_.html) | [Merge](https://millsp.github.io/ts-toolbelt/modules/_union_merge_.html) | | ||
| [Merge](https://millsp.github.io/ts-toolbelt/modules/_object_merge_.html) | [Flatten](https://millsp.github.io/ts-toolbelt/modules/_list_flatten_.html) | [Return](https://millsp.github.io/ts-toolbelt/modules/_function_return_.html) | | [Select](https://millsp.github.io/ts-toolbelt/modules/_union_select_.html) | | ||
| [NonNullable](https://millsp.github.io/ts-toolbelt/modules/_object_nonnullable_.html) | [Pop](https://millsp.github.io/ts-toolbelt/modules/_list_pop_.html) | | | [Strict](https://millsp.github.io/ts-toolbelt/modules/_union_strict_.html) | | ||
| [Nullable](https://millsp.github.io/ts-toolbelt/modules/_object_nullable_.html) | [Prepend](https://millsp.github.io/ts-toolbelt/modules/_list_prepend_.html) | | | | | ||
| [Omit](https://millsp.github.io/ts-toolbelt/modules/_object_omit_.html) | [Remove](https://millsp.github.io/ts-toolbelt/modules/_list_remove_.html) | | | | | ||
| [Optional](https://millsp.github.io/ts-toolbelt/modules/_object_optional_.html) | [Reverse](https://millsp.github.io/ts-toolbelt/modules/_list_reverse_.html) | | | | | ||
| [Overwrite](https://millsp.github.io/ts-toolbelt/modules/_object_overwrite_.html) | [Tail](https://millsp.github.io/ts-toolbelt/modules/_list_tail_.html) | | | | | ||
| [P/Merge](https://millsp.github.io/ts-toolbelt/modules/_object_p/merge_.html) | | | | | | ||
| [P/Omit](https://millsp.github.io/ts-toolbelt/modules/_object_p/omit_.html) | | | | | | ||
| [P/Pick](https://millsp.github.io/ts-toolbelt/modules/_object_p/pick_.html) | | | | | | ||
| [P/Update](https://millsp.github.io/ts-toolbelt/modules/_object_p/update_.html) | | | | | | ||
| [Path](https://millsp.github.io/ts-toolbelt/modules/_object_path_.html) | | | | | | ||
| [Pick](https://millsp.github.io/ts-toolbelt/modules/_object_pick_.html) | | | | | | ||
| [Readonly](https://millsp.github.io/ts-toolbelt/modules/_object_readonly_.html) | | | | | | ||
| [Required](https://millsp.github.io/ts-toolbelt/modules/_object_required_.html) | | | | | | ||
| [Select](https://millsp.github.io/ts-toolbelt/modules/_object_select_.html) | | | | | | ||
| [Unionize](https://millsp.github.io/ts-toolbelt/modules/_object_unionize_.html) | | | | | | ||
| [UnionOf](https://millsp.github.io/ts-toolbelt/modules/_object_unionof_.html) | | | | | | ||
| [Update](https://millsp.github.io/ts-toolbelt/modules/_object_update_.html) | | | | | | ||
| [Writable](https://millsp.github.io/ts-toolbelt/modules/_object_writable_.html) | | | | | | ||
> **`TIP`** [Add something to this list](https://github.com/millsp/ts-toolbelt/edit/master/README.md) | ||
**The documentation is complete but it needs more examples**. So feel free to [ask for examples](https://github.com/millsp/ts-toolbelt/issues/new?template=---question.md). | ||
### Imports | ||
@@ -266,60 +182,10 @@ | ||
## [๐ง Good to Know โคข](https://github.com/millsp/ts-toolbelt/issues?q=label%3Aquestion+sort%3Areactions-%2B1-desc+label%3Awiki) | ||
## [Good to Know โคข](https://github.com/millsp/ts-toolbelt/discussions/q-a) | ||
In this wiki, you will find some extra resources for your learning, and understanding. | ||
**Are you missing something?** Participate to the open-wiki by [posting your questions](https://github.com/millsp/ts-toolbelt/issues/new?template=---question.md). | ||
**Are you missing something?** Participate to the open-wiki by [posting your questions](https://github.com/millsp/ts-toolbelt/discussions/new). | ||
## [๐ฃ Announcements โคข](https://github.com/millsp/ts-toolbelt/issues?utf8=โ&q=is%3Aissue+label%3Aannouncement+sort%3Acreated-desc+) | ||
## Running tests | ||
Stay up to date with the latest announcements with this regular digest of important changes. | ||
## ๐ Contributing | ||
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. There are many ways to contribute to the project: | ||
### Community | ||
* [Help the community with answers on Gitter](https://gitter.im/ts-toolbelt/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link) | ||
* [Reporting bugs or requesting new features](https://github.com/millsp/ts-toolbelt/issues/new/choose) | ||
### Codebase | ||
* Improving existing documentation | ||
* Adding new types to the collection | ||
* [Getting involved with things to do](#-whats-next) | ||
### Pull Requests | ||
1. [Read the tutorial](https://medium.com/free-code-camp/typescript-curry-ramda-types-f747e99744ab) | ||
2. Fork the project | ||
3. Clone your fork | ||
4. Create a pr/**feature** branch | ||
```sh | ||
git checkout -b pr/CoolFeature | ||
``` | ||
5. Commit your changes | ||
You **must** follow the [conventional commit](https://conventionalcommits.org) to be able to commit | ||
```sh | ||
git commit -m "feat(name): Added this CoolFeature" | ||
``` | ||
6. [Run the tests](#-running-tests) | ||
7. Push your changes | ||
```sh | ||
npm run release -- --no-tags | ||
``` | ||
8. Open a pull request | ||
## ๐ Running tests | ||
### For this project | ||
@@ -360,3 +226,3 @@ | ||
## ๐ง Compatibility | ||
## Compatibility | ||
@@ -367,26 +233,9 @@ The project is maintained to adapt to the constant [changes of TypeScript](https://github.com/Microsoft/TypeScript/wiki/Roadmap): | ||
|-------------|------------| | ||
| 8.x.x | ^4.0.x | | ||
| 6.x.x | ^3.7.x | | ||
| 4.x.x | ^3.5.x | | ||
| 2.x.x | ^3.5.x | | ||
| 3.x.x | ^3.5.x | | ||
| 1.x.x | ~3.5.x | | ||
| 9.x.x | ^4.2.x | | ||
Major version numbers will upgrade whenever TypeScript had breaking changes (it happened that TS had breaking changes on minor versions). Otherwise, the release versions will naturally follow the semantic versioning. | ||
Major version numbers will upgrade whenever TypeScript had breaking changes. | ||
Otherwise, the release versions will naturally follow the semantic versioning. | ||
## ๐ Sponsoring issues | ||
## What's next | ||
**Sponsored issues have higher priority over non-critical issues**. | ||
You can either request a new feature or a bug fix, and then fund it. | ||
**The money will be transparently split with an issue's assignees.** | ||
<a href="https://issuehunt.io/r/millsp/ts-toolbelt" > | ||
<img src="https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/issuehunt.svg" height="25px"> | ||
</a> | ||
<br> | ||
## ๐ฎ What's next | ||
* Automated performance tests | ||
@@ -400,16 +249,4 @@ ```sh | ||
## ๐ Acknowledgements | ||
## Related Projects | ||
Many, many thanks to all the [contributors](https://github.com/millsp/ts-toolbelt/graphs/contributors) and: | ||
* [Andrรฉ Staltz](https://github.com/staltz) | ||
* [Joe Calzaretta](https://github.com/jcalz) | ||
* [Matt McCutchen](https://github.com/mattmccutchen) | ||
* [Monroe Ekilah](https://github.com/ekilah) | ||
* [Nathan S.-Sanders](https://github.com/sandersn) | ||
* [Regev Brody](https://github.com/regevbr) | ||
* [Titian C.-Dragomir](https://github.com/dragomirtitian) | ||
## ๐ Friendly Projects | ||
* [`eledoc`](https://github.com/millsp/eledoc) - ๐ A material dark theme for TypeDoc | ||
@@ -420,2 +257,2 @@ * [`utility-types`](https://github.com/piotrwitek/utility-types) - Collection of utility types, complementing TypeScript built-in mapped types and aliases | ||
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fpirix-gh%2Fts-toolbelt.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fpirix-gh%2Fts-toolbelt?ref=badge_large) | ||
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fpirix-gh%2Fts-toolbelt.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fpirix-gh%2Fts-toolbelt?ref=badge_large) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1773461
6358
1
248