{"_id":"@21gram-consulting/invertible","_rev":"3-4e7ee829f0855fb6e9401527ecb98c94","name":"@21gram-consulting/invertible","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@21gram-consulting/invertible","version":"1.0.0","keywords":["invertible","pipeline","pure","functional","functional programming","functional programming library","inverse","proverse","typescript","strict","type-safe","type safety"],"author":{"url":"https://github.com/adam-rocska","name":"Adam Laszlo Rocska"},"license":"MIT","_id":"@21gram-consulting/invertible@1.0.0","maintainers":[{"name":"rlegmann","email":"ronald.legmann@21gram.consulting"},{"name":"adam-rocska","email":"adam.rocska@21gram.consulting"}],"contributors":[{"url":"https://github.com/rlegmann","name":"Ronald Legmann"},{"url":"https://github.com/tzsiga","name":"Zsigmond Taroczy-Toth"}],"homepage":"https://21gramconsulting.github.io/invertible/","bugs":{"url":"https://github.com/21GramConsulting/invertible/issues"},"dist":{"shasum":"72c491222991cf91b84e45211503428c3394e8ed","tarball":"https://registry.npmjs.org/@21gram-consulting/invertible/-/invertible-1.0.0.tgz","fileCount":75,"integrity":"sha512-HoEOXXlPDDA377D+snJB+QQPzegR1gtBRUxrbyYtRXwraGbTVW4kfQdrETFjERrueiMVFLRq1cA6qjV1dOMVzw==","signatures":[{"sig":"MEQCIA4Qes1ez4sQItFT0PkXqC4RsmWhDZsHHf2gxwFoyGUiAiArGaCi0N/G8JSycJJ2JtEI/oyR9P0dh5qLH0X5O+befw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28795},"main":"lib/invertible/index.js","types":"lib/invertible/index.d.ts","engines":{"npm":">=9.0.0","node":">=18.0.0"},"gitHead":"d375f06ea493c6b424af99bc9194e6dfaf0b2321","scripts":{"doc":"typedoc","lint":"eslint invertible","test":"jest","build":"tsc && tsc-alias","clean":"rm -rf lib coverage var","test:uat":"npm run test -- --testPathPattern=test/uat","test:unit":"npm run test -- --testPathPattern=test/unit","test:uat:coverage":"npm run test:uat -- --coverage --coverageDirectory=var/uat-test-coverage --collectCoverageFrom=./invertible/**/*","serve:coverage:uat":"npx serve var/uat-test-coverage/lcov-report","test:unit:coverage":"npm run test:unit -- --coverage --coverageDirectory=var/unit-test-coverage --collectCoverageFrom=./invertible/**/*","serve:coverage:unit":"npx serve var/unit-test-coverage/lcov-report"},"_npmUser":{"name":"adam-rocska","email":"adam.rocska@21gram.consulting"},"repository":{"url":"git+https://github.com/21GramConsulting/invertible.git","type":"git"},"_npmVersion":"9.6.7","description":"21Gram Consulting's library for invertible functions and pipelines. It enables you to implement invertible pure functions and organize invertible, proverse or inverse functions into statically typed strict type-safe pipelines.","directories":{},"_nodeVersion":"18.17.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.4","eslint":"^8.48.0","tslint":"^6.1.3","ts-jest":"^29.1.1","ts-node":"^10.9.1","typedoc":"^0.25.1","tsc-alias":"^1.8.7","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^20.5.7","@jest/globals":"^29.6.4","typedoc-plugin-coverage":"^2.2.0","typedoc-plugin-mdn-links":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/invertible_1.0.0_1694043349354_0.5544220517884786","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"name":"@21gram-consulting/invertible","version":"1.1.0","keywords":["invertible","pipeline","pure","functional","functional programming","functional programming library","inverse","proverse","typescript","strict","type-safe","type safety"],"author":{"url":"https://github.com/adam-rocska","name":"Adam Laszlo Rocska"},"license":"MIT","_id":"@21gram-consulting/invertible@1.1.0","maintainers":[{"name":"tzsiga","email":"tzsiga@gmail.com"},{"name":"rlegmann","email":"ronald.legmann@21gram.consulting"},{"name":"adam-rocska","email":"adam.rocska@21gram.consulting"}],"contributors":[{"url":"https://github.com/rlegmann","name":"Ronald Legmann"},{"url":"https://github.com/tzsiga","name":"Zsigmond Taroczy-Toth"}],"homepage":"https://21gramconsulting.github.io/invertible/","bugs":{"url":"https://github.com/21GramConsulting/invertible/issues"},"dist":{"shasum":"abc75fc7eb0e65d909b4998ae23c500402054f96","tarball":"https://registry.npmjs.org/@21gram-consulting/invertible/-/invertible-1.1.0.tgz","fileCount":21,"integrity":"sha512-mI0eBgE8k7e7yOODMbGHemLboe4wNpW2Xs6qyNZeKOqwLOX72MyGQMVJMhCce47zMMpwMt/fSalZflQk9wffaQ==","signatures":[{"sig":"MEUCIC258Uk2ZgYBi2mjseVjiCra9kvL4iGly32N17V4k3IHAiEAv8LXrnIU6tR988IMXaJyQ1951RWFV45Bxnr4cNLzCa8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35163},"main":"./invertible/dist/index.js","types":"./invertible/dist/index.d.ts","module":"./invertible/dist/index.esm.js","exports":{".":{"import":"./invertible/dist/index.mjs","module":"./invertible/dist/index.esm.js","require":"./invertible/dist/index.js"},"./pipe":{"import":"./pipe/dist/index.mjs","module":"./pipe/dist/index.esm.js","require":"./pipe/dist/index.js"},"./utility":{"import":"./utility/dist/index.mjs","module":"./utility/dist/index.esm.js","require":"./utility/dist/index.js"},"./package.json":"./package.json"},"gitHead":"e12bec4505ece96c46d651bbbd2fcfbd188bedb1","scripts":{"doc":"typedoc --tsconfig tsconfig.doc.json","attw":"attw --pack","lint":"eslint .","test":"jest","build":"pnpm -r run build","clean":"pnpm -r run clean && rimraf lib coverage var tmp include/*/","coverage":"jest --coverage","test:uat":"pnpm test -- --testPathPattern=test/uat","csb:build":"pnpm build","test:unit":"pnpm test -- --testPathPattern=test/unit","csb:install":"corepack enable && corepack pnpm i","types:check":"pnpm -r run types:check","publish-beta":"pnpm publish --tag beta","prepublishOnly":"pnpm clean && pnpm build","run-all-checks":"pnpm types:check && pnpm lint","test:uat:coverage":"pnpm test:uat -- --coverage --coverageDirectory=var/uat-test-coverage --collectCoverageFrom=./invertible/**/*","serve:coverage:uat":"npx serve var/uat-test-coverage/lcov-report","test:unit:coverage":"pnpm test:unit -- --coverage --coverageDirectory=var/unit-test-coverage --collectCoverageFrom=./invertible/**/*","serve:coverage:unit":"npx serve var/unit-test-coverage/lcov-report"},"_npmUser":{"name":"adam-rocska","email":"adam.rocska@21gram.consulting"},"repository":{"url":"git+https://github.com/21GramConsulting/invertible.git","type":"git"},"_npmVersion":"9.6.7","description":"21Gram Consulting's library for invertible functions and pipelines. It enables you to implement invertible pure functions and organize invertible, proverse or inverse functions into statically typed strict type-safe pipelines.","directories":{},"_nodeVersion":"18.17.1","browserslist":["last 3 years"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"typesVersions":{"*":{"pipe":["./pipe/dist/index.d.ts"],"utility":["./utility/dist/index.d.ts"]}},"_hasShrinkwrap":false,"packageManager":"pnpm@8.7.5","devDependencies":{"jest":"^29.7.0","eslint":"^8.49.0","rimraf":"^5.0.1","semver":"^7.5.4","bunchee":"^3.8.0","ts-jest":"^29.1.1","typedoc":"^0.25.1","@swc/core":"^1.3.86","@swc/jest":"^0.2.29","typescript":"5.1.3","@types/jest":"^29.5.5","@types/node":"^20.6.2","microbundle":"^0.15.1","@jest/globals":"^29.7.0","@playwright/test":"^1.38.0","eslint-plugin-node":"^11.1.0","@arethetypeswrong/cli":"^0.10.2","typedoc-plugin-coverage":"^2.2.0","typedoc-plugin-mdn-links":"^3.1.0","@typescript-eslint/parser":"^6.7.2","@typescript-eslint/eslint-plugin":"^6.7.2"},"_npmOperationalInternal":{"tmp":"tmp/invertible_1.1.0_1695210319947_0.3396163865372581","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2023-09-06T23:35:49.237Z","modified":"2024-08-14T16:24:48.332Z","1.0.0":"2023-09-06T23:35:49.572Z","1.1.0":"2023-09-20T11:45:20.145Z"},"bugs":{"url":"https://github.com/21GramConsulting/invertible/issues"},"author":{"url":"https://github.com/adam-rocska","name":"Adam Laszlo Rocska"},"license":"MIT","homepage":"https://21gramconsulting.github.io/invertible/","keywords":["invertible","pipeline","pure","functional","functional programming","functional programming library","inverse","proverse","typescript","strict","type-safe","type safety"],"repository":{"url":"git+https://github.com/21GramConsulting/invertible.git","type":"git"},"description":"21Gram Consulting's library for invertible functions and pipelines. It enables you to implement invertible pure functions and organize invertible, proverse or inverse functions into statically typed strict type-safe pipelines.","contributors":[{"url":"https://github.com/rlegmann","name":"Ronald Legmann"},{"url":"https://github.com/tzsiga","name":"Zsigmond Taroczy-Toth"}],"maintainers":[{"name":"adam-rocska","email":"adam.rocska@21gram.consulting"},{"name":"rlegmann","email":"ronald.legmann@21gram.consulting"},{"name":"tzsiga","email":"tzsiga@gmail.com"}],"readme":"## Summary\n\nA TypeScript library to allow you to implement strict,\nstrongly typed,invertible (a.k.a. reversible) functions and\npipelines (a.k.a. compositions) of pure functions.\n\n## Common Use Cases\n\n- **Transalation**: Commit-Rollback-style translating\n  between two different types of objects, e.g. between a\n  database model and a domain model.\n- **Undo/Redo GUI Features**\n- **Serialization/Deserialization**: e.g. JSON <-> TypeScript\n  objects\n- **Encryption/Decryption**\n- **CLI Programs**: Typically you want both pipelines and\n  invertible functions in CLI programs. Pipelines are useful\n  for composing together a series of pure functions to\n  implement the program's logic. Invertible functions are\n  useful for implementing CLI flags that can be used to\n  modify the program's behavior.\n\n## Terminology\n\n- **Proverse**: A function that takes a value of type `A` and\n  returns a value of type `B`.\n- **Inverse**: A function defined with its Proverse pair in\n  context, that takes a value of type `B` and returns a\n  value of type `A`. Therefore, all Inverse functions are\n  also Proverse functions, but not all Proverse functions\n  are Inverse functions.\n- **Invertible**: A function that has both its Proverse and\n  Inverse defined.\n- **Pipeline**: A composition of Proverse functions.\n\n## Potentially Unfamiliar Conventions\n- **Static & Runtime Parity**: We at 21Gram always aim to\n  implement runtime aspects of pure types with the same name\n  and same or similar API that represent the very same mental\n  model concepts. For example, you may have an `IsNonEmpty`\n  type and an `IsNonEmpty` function for runtime use.\n  The type resolves a `true` or `false` type to make\n  conditional typing easier, while the function returns an\n  `item is NonEmpty` boolean value at runtime.\n\n## Examples\n\nFor now, please see the [tests](./test) for examples.\nWe have full 100% coverage and this whole show is for free.","readmeFilename":"README.md"}