{"name":"ts-toolbelt","version":"4.8.15-test.1571168717816","description":"👷 All the types you need for TypeScript","keywords":["safe","tools","types","typesafe","typescript"],"homepage":"https://github.com/pirix-gh/ts-toolbelt","repository":{"type":"git","url":"git+https://github.com/pirix-gh/ts-toolbelt.git"},"license":"Apache-2.0","author":{"name":"Pierre-Antoine Mills","url":"https://github.com/pirix-gh"},"main":"out/index.js","types":"out/types/src/index.d.ts","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"},"dependencies":{},"devDependencies":{"@commitlint/cli":"^8.1.0","@commitlint/config-conventional":"^8.1.0","@typescript-eslint/parser":"^1.13.0","eledoc":"^0.0.10","eslint":"^5.16.0","eslint-plugin-fp":"^2.3.0","eslint-plugin-react":"^7.14.3","husky":"^3.0.2","npx":"^10.2.0","sort-package-json":"^1.22.1","standard-version":"^7.0.0","ts-node":"^8.3.0","tslib":"^1.10.0","typedoc":"^0.15.0","typescript":"next"},"gitHead":"b129e90df100b3f622b75d23993797fb36a15ac1","readme":"<p align=\"center\">\n  <a href=\"https://github.com/pirix-gh/ts-toolbelt\">\n    <img alt=\"logo\" title=\"ts-toolbelt\" src=\"https://raw.githubusercontent.com/pirix-gh/ts-toolbelt/master/.github/logo.png\" width=\"300\">\n  </a>\n\n  <h3 align=\"center\">ts-toolbelt</h3>\n\n  <p align=\"center\">\n    <b>🔩 All the types you need for TypeScript</b>\n    <br>\n    <a href=\"https://pirix-gh.github.io/ts-toolbelt/\" target=\"_blank\"><strong>Explore the docs »</strong></a>\n    <br>\n    <br>\n    <a href=\"#demo\">🎮 View Demo</a>\n    ·\n    <a href=\"https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---bug-report.md\">🐞 Report Bug</a>\n    ·\n    <a href=\"https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---feature-request.md\">🍩 Request Feature</a>\n    ·\n    <a href=\"https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---question.md\">🤔  Ask Questions</a>\n  </p>\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\" target=\"_blank\">\n    <img src=\"https://img.shields.io/gitter/room/ts-toolbelt/community.svg\">\n  </a>\n  <a href=\"https://www.npmjs.com/package/ts-toolbelt\" target=\"_blank\">\n    <img src=\"https://img.shields.io/npm/v/ts-toolbelt.svg\">\n  </a>\n  <a href=\"https://travis-ci.org/pirix-gh/ts-toolbelt\" target=\"_blank\">\n    <img src=\"https://img.shields.io/travis/pirix-gh/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=\"http://makeapullrequest.com\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\">\n  </a>\n  <a href=\"#\">\n    <img src=\"https://img.shields.io/npm/l/ts-toolbelt.svg\">\n  </a>\n</p>\n<p align=\"center\">\n  <a href=\"https://conventionalcommits.org\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg\">\n  </a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://patreon.com/pirix\" target=\"_blank\">\n    <img src=\"https://raw.githubusercontent.com/pirix-gh/ts-toolbelt/master/.github/patreon.png\" height=\"25px\">\n  </a>\n  <a href=\"https://tidelift.com/subscription/pkg/npm-ts-toolbelt?utm_source=npm-ts-toolbelt&utm_medium=referral&utm_campaign=readme\" target=\"_blank\">\n    <img src=\"https://raw.githubusercontent.com/pirix-gh/ts-toolbelt/master/.github/tidelift.png\" height=\"25px\">\n  </a>\n  <a href=\"https://issuehunt.io/r/pirix-gh/ts-toolbelt\" target=\"_blank\">\n    <img src=\"https://raw.githubusercontent.com/pirix-gh/ts-toolbelt/master/.github/issuehunt.png\" height=\"25px\">\n  </a>\n</p>\n\n\n## Table of Contents\n\n* [📜 About](#-about)\n* [🍩 Features](#-features)\n* [🏁 Getting started](#-getting-started)\n* [📖 Documentation](#-documentation-)\n* [🧠 Good to know](#-good-to-know-)\n* [🎁 Contributing](#-contributing)\n* [👏 Sponsoring issues](#-sponsoring-issues)\n* [💉 Running tests](#-running-tests)\n* [🔧 Compatibility](#-compatibility)\n* [🔮 What's next](#-whats-next)\n* [🙏 Acknowledgements](#-acknowledgements)\n\n## 📜 About\n\n**ts-toolbelt** brings **new capabilities** to TypeScript with a collection of more than **200** tested types. This makes it the largest, and most reliable type collection out there. On a higher level, it abstracts the complexity & knowledge you would need to properly type your software - **you can stay focused**.\n\nIt's goal is to improve type correctness while adding a whole new set of **features** to TypeScript. It uses the type system itself for TypeScript to compute more complex types. In other words, its API exposes types that trade **CPU & RAM** for higher type safety.\n\nYou'll find all the types you can ever need in this single and **well organized** place.\n\n#### Goals\n\n* Answer the question to **\"How do I do this in TypeScript?\"**\n* Software that's more type-safe, **flexible** & more **robust**\n* Bring a whole new set of extra **features** to TypeScript\n* Types can be **combined** together to create new ones!\n* This package aims to be the home of all **utility types**\n* Computed types are always **readable**, like if you typed it\n* High [**performance**](https://gist.github.com/pirix-gh/02097996d2a1e4e7aa2d54b330451ea0), so it will not bloat TS (~ +2sec, +50MB)\n\n## 🍩 Features\n\nHere's some of the most useful features:\n\n* [Merge two types together](https://pirix-gh.github.io/ts-toolbelt/modules/_object_merge_.html#merge)\n* [Update the field of a type](https://pirix-gh.github.io/ts-toolbelt/modules/_object_update_.html#update)\n* [Make some fields optional](https://pirix-gh.github.io/ts-toolbelt/modules/_object_optional_.html#optional)\n* [Change a type at any depth!](https://pirix-gh.github.io/ts-toolbelt/modules/_object_p_update_.html#update)\n* [Concat two tuples together](https://pirix-gh.github.io/ts-toolbelt/modules/_tuple_concat_.html#concat)\n* [Get the last item of a tuple](https://pirix-gh.github.io/ts-toolbelt/modules/_tuple_last_.html#last)\n* ... and so much more\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/pirix-gh/ts-toolbelt/master/.github/demo.gif\" id=\"demo\" width=\"750px\">\n<p align=\"center\">\n\n> **`TIP`** If you don't find the type you are looking for, you are welcome to open a [feature request](https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---feature-request.md)!\n\n## 🏁 Getting Started\n\n#### Prerequisites\n\nLowest TypeScript [support](#-compatibility) starts at v3.5\n\n```sh\nnpm install typescript@^3.6.0 --save-dev\n```\n\nFor best results, add this to your `tsconfig.json`\n\n```ts\n// Optional, recommended\n{\n  \"compilerOptions\": {\n    // ...\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.MergeUp<{name: string}, {age?: number}>\n```\n\n> **`TIP`** You can also grab the demo [over here](https://gist.github.com/pirix-gh/f7f7d18773f79bf0618fb5cd55bd48f8)\n\n## [📖 Documentation ⤢](https://pirix-gh.github.io/ts-toolbelt/)\n\nThe project is organized around TypeScript's main concepts:\n\n|              |                    |              |                |                 |              |\n|--------------|--------------------|--------------|----------------|-----------------|--------------|\n| **A**ny      | **B**oolean        | **C**lass    | **F**unction   | **I**teration   | **N**umber   |\n| **O**bject   | **O**bject.**P**   | **S**tring   | **T**uple      | **U**nion       | Test         |\n\n> **`TIP`** match the type kind you need to operate on with the above categories\n\n**The documentation is complete but needs more examples**. So feel free to [ask for examples](https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---question.md), and I will update the docs.\n\n#### Imports\n\nThere are many ways to import the types into your project:\n\n* Explicit\n  ```ts\n  import {Any, Boolean, Class, Function, Iteration, Number, Object, String, Tuple, Union} from 'ts-toolbelt'\n  ```\n\n* Compact\n  ```ts\n  import {A, B, C, F, I, N, O, S, T, U} from 'ts-toolbelt'\n  ```\n\n* Portable\n  ```ts\n  import tb from 'ts-toolbelt'\n  ```\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\n#### [Archives ⤢](https://github.com/pirix-gh/ts-toolbelt/tree/gh-pages)\n\nAccess older docs at https://pirix-gh.github.io/ts-toolbelt/version/\n\n> **`EXAMPLE`** https://pirix-gh.github.io/ts-toolbelt/4.2.1/\n\n## [🧠 Good to Know ⤢](https://github.com/pirix-gh/ts-toolbelt/issues?q=label%3Aquestion+sort%3Areactions-%2B1-desc+label%3Awiki)\n\nIn this wiki, you'll find some extra resources for your learning & understanding.\n\nIt is incremental and it will be completed on demand, you can ask for this below.\n\n#### [Questions ⤢](https://github.com/pirix-gh/ts-toolbelt/issues?q=label%3Aquestion+sort%3Areactions-%2B1-desc+label%3Awiki)\n\nAre you missing something? Participate to the open-wiki by posting your questions [right here](https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---question.md).\n\n## 🎁 Contributing\n\nContributions 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:\n\n#### Community\n\n* [Help the community with answers on Gitter](https://gitter.im/ts-toolbelt/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link)\n* [Reporting bugs or requesting new features](https://github.com/pirix-gh/ts-toolbelt/issues/new/choose)\n\n#### Codebase\n\n* Improving existing documentation \n* Adding new types to the collection\n\n#### Pull Requests\n\n1. [Read the tutorial](https://medium.com/free-code-camp/typescript-curry-ramda-types-f747e99744ab)\n\n2. Fork the project\n\n3. Clone your fork\n\n4. Create a pr/**feature** branch\n\n   ```sh\n   git checkout -b pr/CoolFeature\n   ```\n   \n5. Commit your changes\n\n   You **must** follow the [conventional commit](https://conventionalcommits.org) to be able to commit\n   ```sh\n   git commit -m 'feat(name): Added this CoolFeature'\n   ```\n\n6. [Run the tests](#-running-tests)\n\n7. Push your changes\n\n   ```sh\n   npm run release -- --no-tags\n   ```\n\n8. Open a pull request\n\n## 👏 Sponsoring issues\n\n**Sponsored issues have higher priority over non-critical issues**.<br>\n\nYou can either request a new feature or a bug fix then fund it.\n\n<a href=\"https://issuehunt.io/r/pirix-gh/ts-toolbelt\" target=\"_blank\">\n  <img src=\"https://raw.githubusercontent.com/pirix-gh/ts-toolbelt/master/.github/issuehunt.png\" height=\"25px\">\n</a>\n<br>\n<br>\n\n**The money will be transparently split with an issue's assignees.**\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 {A, B, C, F, I, N, O, S, T, U, Test} from 'ts-toolbelt'\n\nconst {checks, check} = Test\n\nchecks([\n    check<N.Plus<'1', '30'>, '31', Test.Pass>(),\n    check<N.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| 1.x.x       | ~3.5.x     |\n| 2.x.x       | ^3.5.x     |\n| 3.x.x       | ^3.5.x     |\n| 4.x.x       | ^3.6.x     |\n\nMajor 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.\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* Improve with user feedback\n* Need to write the examples\n\n## 🙏 Acknowledgements\n\nMany, many thanks to all the [contributors](https://github.com/pirix-gh/ts-toolbelt/graphs/contributors) and:\n\n* [André Staltz](https://github.com/staltz)\n* [Joe Calzaretta](https://github.com/jcalz)\n* [Matt McCutchen](https://github.com/mattmccutchen)\n* [Regev Brody](https://github.com/regevbr)\n* [Titian C.-Dragomir](https://github.com/dragomirtitian)\n\n## 💟 Friendly Projects\n\n* [`eledoc`](https://github.com/pirix-gh/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","readmeFilename":"README.md","bugs":{"url":"https://github.com/pirix-gh/ts-toolbelt/issues"},"_id":"ts-toolbelt@4.8.15-test.1571168717816","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"pirix-gh","email":"pierreantoine.urvoy@gmail.com"},"dist":{"integrity":"sha512-oG0X0yQEbhVdZTGAzyy+IcikVQDi4ALWyy47lG2dRjKxw1/sWtBzjs1T2TF1wPrgWDZA+6GYpspsQa9nEAzhVg==","shasum":"c90da6bb486da509db8a87ce4c8afa1fd991918d","tarball":"http://registry-npm.ywwl.com/ts-toolbelt/download/ts-toolbelt-4.8.15-test.1571168717816.tgz","fileCount":220,"unpackedSize":234383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpiHWCRA9TVsSAnZWagAAE2IP/jgqBWjZGpV/6OQf3AIF\nsQ4RKYdQpHmGhVEQ8BITKjGy+oXe1ITK+5g/+SFwMC/4hogKhE+NntXcUUUZ\ngNrInynCzfwIq+drZqToRft72WDWL16bsrth/5vo+L7WTjN4VL1mxFh3PhnR\n4hQGOPQXeuBwOJXRcqmjG4ydgQFvA1zFvdbgz/dKXIXH1Eg1csEYOxaFe4Ym\ntxC6kfLKlIjJM2fd41sqzw7p3i2g14WGcafrraHOYRMYntWLZJtLkgJ7vJoo\nvwQsxUr7E++WVHujwfkZE3I8sgltpo3H/da0CGMWuLza2ftYuqvQDvAslc5y\nqI8ECXTEKnAmt+rfCrjMrwoEXhB7foz8MiBsANR7bzY6SVjkKwNug8oZKko+\nJDwjKXXdz4U+cSB8Y3SUtKrol62tu8yLd25Gt2LPkNPNabB2v1HSPEd6LVZ6\ntegZx2GV/bVMuDWJ1vXGi6e2PIVyascZjMPpEThdu3pS0X7cJYger7Fipgwl\n+QbFnUZiYl4kUyE+YW7+u3sQGJj5vEdgDsIQI9dFQUk4fv4aWyAdpPU3D5k+\ncb1CAQ6yF4uMLnpGj6m2lPJTvzPqHoKfpLbvDVT6QpkVBdJMiOOSGR9Ewd68\n2ccXkYHaYnL0SFVq4YU6F7yE8SjUhIcc/MdQ3WfNCd/UsOhda9DgLvlcbKr+\nqrr0\r\n=BTZT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA36JxWojFZ87ypXzVBwV0WrFqjfAtCgneOIjx/agvbSAiEAvk8OZPgP7kYiV7gUIskNT4N+1T+oYhymqqfHgXo432g="}],"size":49432,"noattachment":false,"key":"/ts-toolbelt/-/ts-toolbelt-4.8.15-test.1571168717816.tgz"},"maintainers":[{"name":"pirix-gh","email":"pierreantoine.urvoy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-toolbelt_4.8.15-test.1571168717816_1571168726137_0.9427277226366202"},"_hasShrinkwrap":false,"publish_time":1571168726323,"_cnpm_publish_time":1571168726323,"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"}}