{"name":"ts-toolbelt","version":"9.1.6-test.1611974721747","description":"TypeScript's largest utility library","keywords":["safe","tools","types","typesafe","typescript"],"homepage":"https://github.com/millsp/ts-toolbelt","repository":{"type":"git","url":"git+https://github.com/millsp/ts-toolbelt.git"},"license":"Apache-2.0","author":{"name":"Pierre-Antoine Mills","url":"https://github.com/millsp"},"main":"out/index.js","types":"out/index.d.ts","scripts":{"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"},"dependencies":{},"devDependencies":{"@commitlint/cli":"^8.3.0","@commitlint/config-conventional":"^8.3.0","@typescript-eslint/parser":"^3.9.1","eledoc":"^0.2.0","eslint":"^7.0.0","eslint-plugin-fp":"^2.3.0","eslint-plugin-react":"^7.20.0","husky":"^4.2.5","npx":"^10.2.0","sort-package-json":"^1.42.0","standard-version":"^8.0.0","ts-node":"^8.10.0","tslib":"^2.0.0","typedoc":"^0.17.0","typescript":"4.1.3"},"gitHead":"dc22e36dee1e2a71551f782c143279e45bdee610","readme":"<p align=\"center\">\n  <a href=\"https://github.com/millsp/ts-toolbelt\">\n    <img alt=\"banner\" title=\"ts-toolbelt\" src=\"https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/banner.svg\">\n  </a>\n  <h4 align=\"center\">TypeScript's largest utility library</h4>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/ts-toolbelt\" >\n    <img src=\"https://img.shields.io/npm/v/ts-toolbelt.svg\">\n  </a>\n  <a href=\"https://travis-ci.org/millsp/ts-toolbelt\" >\n    <img src=\"https://img.shields.io/travis/millsp/ts-toolbelt.svg\">\n  </a>\n  <a href=\"#\">\n    <img src=\"https://img.shields.io/npm/dm/ts-toolbelt.svg\">\n  </a>\n  <a href=\"https://lgtm.com/projects/g/millsp/ts-toolbelt/context:javascript\">\n    <img alt=\"Language grade: JavaScript\" src=\"https://img.shields.io/lgtm/grade/javascript/g/millsp/ts-toolbelt.svg?logo=lgtm&logoWidth=-2\"/>\n  </a>\n  <a href=\"#\">\n    <img src=\"http://isitmaintained.com/badge/resolution/millsp/ts-toolbelt.svg\"/>\n  </a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://gitter.im/ts-toolbelt/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link\" >\n    <img src=\"https://img.shields.io/gitter/room/ts-toolbelt/community.svg\">\n  </a>\n  <a href=\"http://makeapullrequest.com\" >\n    <img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\">\n  </a>\n  <a href=\"https://conventionalcommits.org\" >\n    <img src=\"https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg\">\n  </a>\n  <a href=\"https://github.com/millsp/ts-toolbelt/blob/master/CODE_OF_CONDUCT.md\" >\n    <img src=\"https://img.shields.io/badge/CoC-Contributor%20Covenant-green.svg\">\n  </a>\n  <a href=\"#\">\n    <img src=\"https://img.shields.io/npm/l/ts-toolbelt.svg\">\n  </a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://millsp.github.io/ts-toolbelt/\">📖 Documentation</a>\n  ·\n  <a href=\"https://github.com/millsp/ts-toolbelt/issues?utf8=✓&q=is%3Aissue+label%3Aannouncement+sort%3Acreated-desc+\">📣 Announcements</a>\n  ·\n  <a href=\"https://github.com/millsp/ts-toolbelt/issues/new?template=---bug-report.md\" alt=\"Bug Report\">🐞 Report Bug</a>\n  ·\n  <a href=\"https://github.com/millsp/ts-toolbelt/issues/new?template=---feature-request.md\" alt=\"Request Feature\">🍩 Request Feature</a>\n  ·\n  <a href=\"https://github.com/millsp/ts-toolbelt/issues/new?template=---question.md\" alt=\"Ask Questions\">🤔 Ask Questions</a>\n</p>\n\n## About\n\n**ts-toolbelt** ships **utility types** that provide simple ways to **update**, **change**, and **compute** TypeScript types.\nIt offers unique dynamic features, allowing you to write type-safe software more **easily** and in **less time** than you do today.\n\nIts programmatic API brings **new capabilities** to TypeScript with **+200** tested type utilities. This makes it the largest and the most reliable type collection out there.\nIt uses the type system itself for TypeScript to compute complex types. So its API exposes types that trade **CPU & RAM** for higher type safety.\n\n<p align=\"center\">\n  <a href=\"https://codesandbox.io/s/ts-toolbelt-x4jly?file=/src/index.ts\">\n    <img alt=\"demo\" title=\"ts-toolbelt\" src=\"https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/demo.svg\">\n  </a>\n</p>\n\n### Goals\n\n* Answer the question to **\"How can I do this in TypeScript?\"**\n* Provide a programmatic **standard API** for the type system\n* Promote type **evolution**/**reusability** within your codebase\n* Software that is more **type-safe**, **flexible**, and **robust**\n* Bring a whole new set of extra **features** to TypeScript\n* Extensively tested type utilities for maximum type safety\n* This package aims to be the home of all **utility types**\n* [Answer questions about types and share knowledge](#good-to-know-)\n\nYou'll find all the types you can ever need in this single and **well organized** package.\n## Getting Started\n\n### Prerequisites\n\n```sh\nnpm install typescript@^4.2.0 --save-dev\n```\n\nFor best results, add this to your `tsconfig.json`\n\n```ts\n{\n  \"compilerOptions\": {\n    // highly recommended (required by few utilities)\n    \"strictNullChecks\": true,\n\n    // this is optional, but enable whenever possible\n    \"strict\": true,\n  }\n}\n```\n\n### Installation\n\n```sh\nnpm install ts-toolbelt --save\n```\n\n### Hello World\n\n```ts\nimport {Object} from \"ts-toolbelt\"\n// Check the docs below for more\n\n// Merge two `object` together\ntype merge = Object.Merge<{name: string}, {age?: number}>\n// {name: string, age?: number}\n\n// Make a field of an `object` optional\ntype optional = Object.Optional<{id: number, name: string}, \"name\"}>\n// {id: number, name?: string}\n```\n\n> **`TIP`** You can also grab the demo [over here](https://gist.github.com/millsp/f7f7d18773f79bf0618fb5cd55bd48f8).\n\nYou can [**level-up, and re-code this library from scratch**](https://medium.com/free-code-camp/typescript-curry-ramda-types-f747e99744ab).\n\n## [Documentation ⤢](https://millsp.github.io/ts-toolbelt/)\n\n### Imports\n\nThe project is organized around TypeScript's main concepts:\n\n|            |             |                  |              |               |          |\n|------------|-------------|------------------|--------------|---------------|----------|\n| **A**ny    | **B**oolean | **C**lass        | **F**unction | **I**teration | **L**ist |\n| **N**umber | **O**bject  | **O**bject.**P** | **S**tring   | **U**nion     | Test     |\n\n> **`TIP`** How to choose categories? Match your type with them.\n\nThere are many ways to import the types into your project:\n\n* **Explicit**\n  ```ts\n  import {Any, Boolean, Class, Function, Iteration, List, Number, Object, String, Union} from \"ts-toolbelt\"\n  ```\n\n* **Compact**\n  ```ts\n  import {A, B, C, F, I, L, N, O, S, U} from \"ts-toolbelt\"\n  ```\n\n* **Portable**\n  ```ts\n  import tb from \"ts-toolbelt\"\n  ```\n\nYou can also import our non-official API from the community:\n  ```ts\n  import {Community} from \"ts-toolbelt\"\n  ```\n\n> **`TIP`** The community API is for our community to publish useful types that don't see fit in the standard API.\n\n### Internal Docs\n\nIf you're interested to **learn** how the internals work, [this tutorial](https://medium.com/free-code-camp/typescript-curry-ramda-types-f747e99744ab) will get you on track to start writing your own types.\n\n### [Archives ⤢](https://github.com/millsp/ts-toolbelt/tree/gh-pages)\n\nAccess older docs at https://millsp.github.io/ts-toolbelt/version/\n\n> **`EXAMPLE`** https://millsp.github.io/ts-toolbelt/4.2.1/\n\n## [Good to Know ⤢](https://github.com/millsp/ts-toolbelt/discussions/q-a)\n\nIn this wiki, you will find some extra resources for your learning, and understanding.\n\n**Are you missing something?** Participate to the open-wiki by [posting your questions](https://github.com/millsp/ts-toolbelt/discussions/new).\n\n## Running tests\n\n### For this project\n\nTo run the `lint` & `type` tests, simply run:\n\n```sh\nnpm test\n```\n\n### For your project\n\nWant to test your own types? Let's get started:\n\n```ts\nimport {Number, Test} from \"ts-toolbelt\"\n\nconst {checks, check} = Test\n\nchecks([\n    check<Number.Plus<\"1\", \"30\">, \"31\", Test.Pass>(),\n    check<Number.Plus<\"5\", \"-3\">, \"2\",  Test.Pass>(),\n])\n```\n\n> **`TIP`** Place it in a file that won't be executed, it's just for TypeScript to test types.\n\n### Continuous Integration\n\nThe releases are done with Travis CI in stages & whenever a branch or PR is pushed:\n\n- Tests are run with `npm test`\n- Tests against [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/)\n- Releases to npm@[branch-name]\n\nIf you wrote tests & would like your project to be tested too, please open an issue.\n\n## Compatibility\n\nThe project is maintained to adapt to the constant [changes of TypeScript](https://github.com/Microsoft/TypeScript/wiki/Roadmap):\n\n| ts-toolbelt | typescript |\n|-------------|------------|\n| 9.x.x       | ^4.2.x     |\n\nMajor version numbers will upgrade whenever TypeScript had breaking changes. \nOtherwise, the release versions will naturally follow the semantic versioning.\n\n## What's next\n\n* Automated performance tests\n  ```sh\n  # performance is checked manually with \n  npx tsc --noEmit --extendedDiagnostics\n  ```\n\n* Need to write more examples\n\n## Related Projects\n\n* [`eledoc`](https://github.com/millsp/eledoc) - 🌒 A material dark theme for TypeDoc \n* [`utility-types`](https://github.com/piotrwitek/utility-types) - Collection of utility types, complementing TypeScript built-in mapped types and aliases\n\n## License\n\n[![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)\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/millsp/ts-toolbelt/issues"},"_id":"ts-toolbelt@9.1.6-test.1611974721747","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-PYNBh/itV/vuFe6xscWzwFqtJMUuajMuI681hGoQbZg1vJBu5gCoSn5AWfvLQFxmt4HA0yaUyYpKwsR8pslJ1g==","shasum":"9212e77638f5c878ba3ca630d2b01d89f4cd5922","tarball":"http://registry-npm.ywwl.com/ts-toolbelt/download/ts-toolbelt-9.1.6-test.1611974721747.tgz","fileCount":6,"unpackedSize":1773461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFMhQCRA9TVsSAnZWagAACzoP/jK7TNaRA2TUi0pru6yC\nz4JRXzDi22U0Ir4pF1ieFssHCnFdrEeF/FaSDXX9SlvjQFhXW/w9Gbo1tH52\ns8Xi3JYh+X3lvwsVZszYJKXwj9O/MtqG5XVxEfVNsjGoaHk0sXpjhGYOp+kL\ntwVk3et6t2XQ3Ygwy0WSbVxGhDrQ6fmR/ULZ3cv5R7nfAjpMcVr1v8vvPITD\nWPheTuDePypFy52leGwrjNjN6yMJpicQQvR0+fBIYJzgC/jRsV8drrZSX2fo\n9gNM6XLnb4tHYDIJrd+sELGj9fhq3okx8JtRnnnkp9phZ+4J/zAbtyn1vSY2\n4DAwawKA+U3yPcMfp+GiMclr1SQqlH7BKmag30fmQwhQWCLtX9C3jEoSmLPx\nY8Z1egYC4VeQBOrR/Gyy59tioTy69DzcZAjlHV05+4h2WcWZFvrnvAdpoucu\nv4gNVWNjMAzCISgbrEzYqci9O6FEun+uair+wW69mbM4g0AI745w/6q7CmYc\nDCXmO6gE8enFVdc26Neb1g/LpXMmSG2M6BT1q0rGS0gIgunZds179lmsR5nW\n7yQhQ6uZWzyxd1otEgZWVgs67xr8aGIw5pqYOlt8Kz58zM+dhlW/qrvlHGxT\nsqyHSmziTp7+5a389/3oZHZYjKIv4gIQSHoJ1s5HH35gsBLQ+GWy9uw4HalR\n1zrN\r\n=MJr1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL9yJ/myOvyHohuhq2cMM/LEqHkAyBfgMiGsEruPJNzwIhAO+BLTSn42ukuXGMfW85G9rMJtnECR6A/SgOgHz7gxfC"}],"size":446485,"noattachment":false,"key":"/ts-toolbelt/-/ts-toolbelt-9.1.6-test.1611974721747.tgz"},"_npmUser":{"name":"pirix-gh","email":"pierreantoine.urvoy@gmail.com"},"directories":{},"maintainers":[{"name":"pirix-gh","email":"pierreantoine.urvoy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-toolbelt_9.1.6-test.1611974721747_1611974735447_0.9245877442835462"},"_hasShrinkwrap":false,"publish_time":1611974735681,"_cnpm_publish_time":1611974735681,"dist-tags":{"dt":"3.8.49","latest":"9.6.0","master":"3.8.76","mcpower-op-arrays":"6.1.0","next":"8.4.0","test":"9.6.0-test.1615391863903"}}