{"name":"ts-toolbelt","version":"9.3.4-test.1612811820544","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":"^11.0.0","@commitlint/config-conventional":"^11.0.0","@typescript-eslint/parser":"^4.14.0","eledoc":"^0.2.0","eslint":"^7.18.0","eslint-plugin-fp":"^2.3.0","eslint-plugin-react":"^7.22.0","husky":"^4.3.0","npx":"^10.2.0","sort-package-json":"^1.48.0","standard-version":"^9.1.0","ts-node":"^9.1.0","tslib":"^2.1.0","typedoc":"^0.20.0","typescript":"^4.1.0"},"gitHead":"affcd7a8ebb5466fa5f1dc9a0178ca60e9c98f9b","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/discussions/new\" alt=\"Ask Questions\">🤔 Ask Questions</a>\n</p>\n\n## About\n\n**ts-toolbelt** is the largest, and most tested type library available right\nnow, featuring **+200 utilities**. Our type collection packages some of the most\nadvanced generic mapped types, conditional types, and recursive types on the\nmarket.\n\n**Spend less time, build stronger**. Benefit from a wide range of generic type\nfunctions to achieve better type safety - easily. \n\nWe are just like lodash, or ramda, but applied to the type system. Our mission\nis to provide you with simple ways to generate, transform, and create types. We\nabstract all those complex type checks away for you. We provide a standard,\nreusable, and simple API to achieve greater things with TypeScript.\n\n**ts-toolbelt** is a well organized package that can help you perform advanced\noperations on union types, object types, function types, and literal types. It\nis coherently designed for building robust, flexible, and type safe software.\n\nWe answer the question to **\"How can I do this in TypeScript?\"**. We are a community. Everyone\nis welcome to come ask questions about types. We welcome beginners and advanced\ndevelopers to come take part. **Welcome!**\n\n<p align=\"center\">\n  <a href=\"https://codesandbox.io/s/ts-toolbelt-x4jly?file=/src/index.ts\">\n    <img alt=\"demo\" width=\"800\" title=\"ts-toolbelt\" src=\"https://raw.githubusercontent.com/millsp/ts-toolbelt/master/.github/demo.svg\">\n  </a>\n</p>\n\n## Getting Started\n\n### Prerequisites\n\n```sh\nnpm install typescript@^4.1.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    // this is the lowest supported standard library\n    \"lib\": [\"es2015\"],\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\nYou can [**level-up, and re-code this library from\nscratch**](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| **Any**    | **Boolean** | **Class**    | **Function** | **Iteration** | **List** |\n|------------|-------------|--------------|--------------|---------------|----------|\n| **Number** | **Object**  | **Object.P** | **String**   | **Union**     | **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\n> don't see fit in the standard API.\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\nunderstanding.\n\n**Are you missing something?** Participate to the open-wiki by [posting your\nquestions](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\n> to test types.\n\n### Continuous Integration\n\nThe releases are done with Travis CI in stages & whenever a branch or PR is\npushed:\n\n- Tests are run with `npm test`\n- Tests against\n  [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/)\n- Releases to npm@[branch-name]\n\n## Compatibility\n\nThe project is maintained to adapt to the constant [changes of\nTypeScript](https://github.com/Microsoft/TypeScript/wiki/Roadmap):\n\n| ts-toolbelt | typescript |\n|-------------|------------|\n| 9.x.x       | ^4.1.x     |\n\nMajor version numbers will upgrade whenever TypeScript had breaking changes. \n\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| **Name**                                                       | **Intro**                                                                                |\n|----------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [`eledoc`](https://github.com/millsp/eledoc)                   | 🌒 A material dark theme for TypeDoc                                                     |\n| [`utility-types`](https://githubcom/piotrwitek/utility-types)  | Collection of utility types, complementing TypeScript built-in mapped types and aliases  |\n\n## License\n\n[![FOSSA\nStatus](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.3.4-test.1612811820544","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-E3dm1Ue7x5Du2i6NPcmJBQI0VPp1QfoCc2cQXZMNPW4ZoI4eSFeM/HSjt2ZWG30hoFB8WovG3lXZthj7sElETg==","shasum":"abbf21f3a3ea6d5e3dd0db8f7401645ebf164a62","tarball":"http://registry-npm.ywwl.com/ts-toolbelt/download/ts-toolbelt-9.3.4-test.1612811820544.tgz","fileCount":243,"unpackedSize":1979323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIY48CRA9TVsSAnZWagAAvBoP/jurqWeSr9JliS4giv4t\nE4VaS7l4OrKYkxJGR/prCcOtLhC5+IylPonoHdu1kad8FsSqca7GRTBJJSXd\nReoENUAAM5eCL/ssM7x38AE7Q+jNpXPo7FgVnU4tNAzF21Q0OcEATaMQRnIC\nxmJl7GxtT2+8Vu7rQ1FxHs4imf3ogOrecz3ly3G6GrOk4WUfi9WihZyqGrZw\nZcF9K6wxQOdJYbg1rDvTaVDdr7ea9dHRcnDBhW536/AsGeIBj4f6nc9Fwu0M\nglS/J8j019J3mACi3xxOe6LgryuAdpcWVyUZE55+Bx6syd3FBJL0vPVUG2Yh\nrjm+HIh9MUKpyipoYxAA6yJI8A1QIv9Q+i1zLSj3lw9OyfQDheAUydN4LQwr\n3HBRgaTynV8R0c1ZCAKmhq3AlKTRGW9+7lFOcvYO+4jlRsGNopq/BX2Q3I6b\nLu3xfi9rRKhd1TE4b+SapvzqF0RO7mEHbyLGCQRAzfmZNzoWbjZgMUHjgHP1\nc4CHhx4HWBpAMD0E9tgMlxwMFoHlO8VFLQuFYKYzua6mxJys+T/wmZ8NTmFK\ngQKva/ehpCW5wRyKRDZbJcBePROqzftPyzqYS/sPjHA9/16xyl2qxKzu0xBC\nBhxzwvqo3aLiIDSjDjrb8mb2Ip4H0s3hDYgIwsP3oBfpRXvqpUaxRHtlS4Yk\n1eRx\r\n=8kFi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOsmNvV4dQri3aT5gW3kSkU50Jhq+/WkyYgHC4GzWnBAiEA+7rvlouIyy23V5S+FNx4IgkcCqRuKrPFzyhvAF0vGn0="}],"size":513841,"noattachment":false,"key":"/ts-toolbelt/-/ts-toolbelt-9.3.4-test.1612811820544.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.3.4-test.1612811820544_1612811835954_0.5106040097604196"},"_hasShrinkwrap":false,"publish_time":1612811836141,"_cnpm_publish_time":1612811836141,"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"}}