{"bugs":{"url":"https://github.com/jasonkuhrt/alge/issues"},"dist":{"shasum":"5dc97748d01301834126a90ef8090f69b76afe24","tarball":"https://registry.npmjs.org/alge/-/alge-0.1.1-next.1.tgz","fileCount":183,"integrity":"sha512-JvwB6P4juIBu06Aq00lV9lXAuqeP0F+9MfDF77RLRuwPt1j4DXEVaB0CTsjvpvRnNwTEtMnlKR8prpBIWQ/WVg==","signatures":[{"sig":"MEQCIB4qWXeaikaBZi7YUkHIuptXi8SRX5jAe9WVjPnTYnDPAiBa76MZvw+co5GjtZzX1slWqUNWir9fDwFqAVxv6f128Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":222233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5zXJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmojdg//W9ceCR42nsYHGGoq+NUCrBgDMLhzllFguoyCD1BO/sTD1OIs\r\nRgKuxp/C0tmViZU48eff/fYlL9THaHHknUmDiKozs3Zymn08PM1tsz8P+fxf\r\ntCyiWwnuwM8hxLSvF73rEJ4wrqAQSaHvpuZAtS6+C7Gm6bPaed/7iI7UxnXP\r\nFcv7wA9txyaCpd9Ap96gTgIEJSnD5Ivtq4Ebp7Vxb/9dS9u7gkVk9QWAZUMF\r\nfZ3BItT8E4S2fFAGeCpTznqYvNtQ/mwPrxuEXt9u/1AmHcefJItPbOdeJBm3\r\njPcQbnr0BgX3JARSiC1NnNb+pKckGrMfe2x6AmDQMro8+v0Dzpsnj+wpuKu4\r\nlQZ8YQFCua1L7kfGWWXwq54G3xPhka3zVkxJVz/J65/Zptluv3GBbiv68uZu\r\ngau6bk+va6CC/L7GREWCw3JzwA1ROC2AfQai6rXBBwRYjYSEFoFTI1ip+cFm\r\nSHOrVRSuzkYzo5HqOz9kvVhnYn8NsL1FQ2MXu9ImHiZz8RXNDM3ev7+1CSdF\r\ntT2lRzZ29ceOU6q+PKRnKZ3SM7vlEHZDdGqSaufxcXBpUOUZ0fAZVJk64TSR\r\nT0iWVtv7NrdMp5vrHzfVq9gIL/ACweQNRBZzwFT9RF2cMPRrf0I/9H7pA7ly\r\nvpe+u17pfyNnXGQG7xRSP+rZ0J5roXiyvgs=\r\n=qByq\r\n-----END PGP SIGNATURE-----\r\n"},"name":"alge","type":"module","types":"./dist/esm/index.d.ts","author":{"name":"Jason Kuhrt"},"readme":"# Alge 🌱\n\n[![trunk](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml/badge.svg)](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml)\n\n## TL;DR\n\nType safe fluent API library for creating [Algebraic Data Types](https://en.wikipedia.org/wiki/Algebraic_data_type) (ADTs) in TypeScript. Pronounced \"AL GEE\" like [the plant](https://en.wikipedia.org/wiki/Algae) ([or whatever it is](https://www.indefenseofplants.com/blog/2018/2/20/are-algae-plants)). Schemas powered by [Zod](https://github.com/colinhacks/zod) <3.\n\nThere are three distinct conceptual levels in Alge. Firstly there is a builder for defining your ADT in the first place. Secondly there is a controller for working with your defined ADT such as construction, type guards, and codecs. Finally there are the actual pure-data instances of your ADT.\n\n![Alge Anatomy](docs/assets/Alge%20Anatomy.png)\n\nHere's how it looks like in code. First the Builder which outputs a Controller.\n\n```ts\nimport { Alge } from '../src/index.js'\nimport { z } from 'zod'\n\nconst Length = z.number().positive()\n\n//           v---------- 2. Controller\n//           |            v--------- 1. Builder\nexport const Shape = Alge.data(`Shape`)\n  .variant(`Rectangle`)\n  .schema({\n    width: Length,\n    height: Length,\n  })\n  .variant(`Circle`)\n  .schema({\n    radius: Length,\n  })\n  .variant(`Square`)\n  .schema({\n    size: Length,\n  })\n  .done()\n```\n\nNow the Controller:\n\n```ts\n//    v--------- 3. Instance\n//    |        v--------- 2. Controller\nconst circle = Shape.Circle.create({ radius: 50 })\n// { _tag: 'Circle', radius: 50 }\n\nif (Shape.Circle.is(circle)) {\n  console.log(`I Am Circle`)\n}\n\nconst circleForTheOutsideWorld = Shape.Circle.to.json(circle)\n// '{ \"_tag\": \"Circle\", \"radius\": 50 }'\n\nconst squareFromTheOutsideWorld = Shape.Square.from.json({ _tag: 'Square', size: 10 })\n// { _tag: 'Square', size: 10 }\n```\n\nFinally are the instances which you can see above are created by the controller. Instances are just data. They are _not_ like class instances that couple logic and data. All logic related to an ADT, like type guards, resides in the controller.\n\nIf you don't need a full blown ADT but just one record, Alge can do that:\n\n```ts\n//    v---------- 2. Datum Controller (not ADT)\n//    |             v--------- 1. Datum Builder (not ADT)\nconst Circle = Alge.datum(`Circle`).schema({ radius: Length }).done()\n```\n\nIf you want to compose your ADT incrementally Alge can do that:\n\n```ts\n//    v---------- 2. Datum Controller (not ADT)\n//    |             v--------- 1. Datum Builder (not ADT)\nconst Circle = Alge.datum(`Circle`).schema({ radius: Length }).done()\nconst Square = Alge.datum(`Square`).schema({ size: Length }).done()\n//    v---------- 2. Controller (is ADT)\n//    |            v--------- 1. Builder (is ADT)\nconst Shape = Alge.data(`Shape`).variant(Circle).variant(Square).done()\n```\n\nThis is just a taster. Places you can go next:\n\n1. [Install](#installation) and learn interactively (JSDoc is coming soon!)\n1. A formal [features breakdown](#features)\n1. [Code examples](/examples)\n1. A simple [introduction to Algebraic Data Types](#about-algebraic-data-types) (for those unfamiliar)\n1. A admittedly rambling 😃 [video introduction](https://youtu.be/fLlVQSJx4AU) if you like that format\n\n   [![Video Cover](docs/assets/cover.png)](https://youtu.be/fLlVQSJx4AU)\n\n## Contents\n\n<!-- toc -->\n\n- [Installation](#installation)\n- [Roadmap](#roadmap)\n- [About Algebraic Data Types](#about-algebraic-data-types)\n  - [What?](#what)\n  - [Why?](#why)\n- [Features](#features)\n  - [Variants](#variants)\n  - [Lone Variant](#lone-variant)\n  - [Lone Variant Composition](#lone-variant-composition)\n  - [Schema](#schema)\n    - [Properties](#properties)\n    - [Optional Properties](#optional-properties)\n    - [Property Defaults](#property-defaults)\n  - [Identity](#identity)\n  - [Codecs](#codecs)\n    - [JSON](#json)\n    - [Custom](#custom)\n    - [Throw Decoding](#throw-decoding)\n    - [ADT Level](#adt-level)\n  - [Static Types](#static-types)\n    - [Namespaces](#namespaces)\n\n<!-- tocstop -->\n\n## Installation\n\n```\nnpm add alge\n```\n\n## Roadmap\n\nThere is no timeline but there are priorities. Refer to the currently three [pinned issues](https://github.com/jasonkuhrt/alge/issues).\n\n## About Algebraic Data Types\n\nAlge is a Type Script library for creating [Algebraic Data Types](https://en.wikipedia.org/wiki/Algebraic_data_type) (ADTs). This guide will take you from not knowing what ADTs are to why you might want to use Alge for them in your code.\n\n### What?\n\nAlgebraic Data Types (ADTs for short) are a methodology of modelling data. They could appear in any context that is about defining and/or navigating the shape of data. One of their fundamental benefits is that they can express different states/invariants/facts about/of data. They are the combination of two other concepts, _product types_ and _union types_.\n\nA product type is like:\n\n```ts\ninterface Foo {\n  bar: string\n  qux: number\n}\n```\n\nA union type is like:\n\n```ts\ntype Foo = 1 | 2 | 3\n```\n\nBasically, when the power of these two data modelling techniques are combined, we get something far greater than the sum of its parts: ADTs.\n\nADTs can particularly shine at build time. While dynamically typed programing languages (\"scripting language\", e.g. Ruby, JavaScript, Python, ...) can support ADTs at runtime, adding static type support into the mix increases the ADT value proposition. Then there are yet other more minor programing language features like pattern matching that if supporting ADTs make them feel that much more beneficial too.\n\nReferences:\n\n- [Wikipedia entry on ADTs](https://en.wikipedia.org/wiki/Algebraic_data_type)\n- [Type Script documentation on discriminated unions](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions)\n\n### Why?\n\nNow that we have some understanding of _what_ ADTs are let's build some understanding about _why_ we might want to use them. To do this we'll work with an example.\n\nLet's say we want to accept some user input about an npm package dependency version pin. It might come in the form of an exact version or a range of acceptable versions. How would we model this? Let's start without ADTs and then refactor with them to appreciate the difference. Let's assume that input parsing has been taken care of and so here we're only concerned with structured data modelling.\n\n```ts\ninterface Pin {\n  isExact: boolean\n  patch?: number\n  minor?: number\n  major?: number\n  release?: string\n  build?: string\n  range?: Array<{\n    operator: `~` | `>=` | `...` // etc.\n    isExact: boolean\n    patch: number\n    minor: number\n    major: number\n    release?: string\n    build?: string\n  }>\n}\n```\n\nThis data modelling is flawed. There is out-of-band information about import data relationships. When `isExact` is `true` then `range` is undefined but other fields are guaranteed, well, except `release` and `build` which are always optional actually. In other words these configurations of the data are impossible:\n\n```ts\nconst pin = {\n  isExact: true,\n  patch: 1,\n  minor: 2,\n  major: 3,\n  range: [\n    {\n      operator: `~`,\n      patch: 1,\n      minor: 0,\n      major: 0,\n    },\n  ],\n}\n```\n\n```ts\nconst pin = {\n  isExact: false,\n  patch: 1,\n  minor: 2,\n  major: 3,\n}\n```\n\nWhile these are possible:\n\n```ts\nconst pin = {\n  isExact: true,\n  patch: 1,\n  minor: 2,\n  major: 3,\n}\n```\n\n```ts\nconst pin = {\n  isExact: true,\n  patch: 1,\n  minor: 2,\n  major: 3,\n  release: `beta`,\n}\n```\n\n```ts\nconst pin = {\n  isExact: false,\n  range: [\n    {\n      operator: `~`,\n      patch: 1,\n      minor: 0,\n      major: 0,\n    },\n  ],\n}\n```\n\nBut since our data modelling doesn't encode these _facts_ our code suffers. For example:\n\n```ts\nif (pin.isExact) {\n  doSomething(pin.major!)\n  //                       ^\n}\n```\n\nNotice the `!`. Its us telling Type Script that `major` is definitely not undefined and so the type error can be ignored. In JS its even worse, as we wouldn't even be prompted to think about such cases, unless we remember to. Seems trivial in this case, but at scale day after day often with unfamiliar code a mistake will inevitably be made. Another approach could have been this:\n\n```ts\nif (pin.isExact) {\n  if (!pin.major) throw new Error(`Bad pin data!`)\n  doSomething(pin.major)\n}\n```\n\nSo, poor data modelling affects the quality of our code by our code either needing to deal with apparently possible states that are actually impossible OR by our code carefully ignoring those impossible states. Both solutions are terrible because they make code harder to read. There is more code, and the chance that wires about impossible and possible states will cross becomes a real possibility leading to potential runtime errors.\n\nADTs solve this. Let's refactor our Pin type into an ADT to see how!\n\n```ts\ntype Pin = ExactPin | RangePin\n\ninterface ExactPin {\n  tag: `ExactPin`\n  patch: number\n  minor: number\n  major: number\n  release?: string\n  build?: string\n}\n\ninterface RangePin {\n  tag: `RangePin`\n  values: Array<{\n    operator: `~` | `>=` | `...` // etc.\n    isExact: boolean\n    patch: number\n    minor: number\n    major: number\n    release?: string\n    build?: string\n  }>\n}\n```\n\nNow we've encoded the possible states we cared about. Our code quality increases:\n\n```ts\nif (pin.tag === 'ExactPin') {\n  doSomething(pin.major) // No problem, `pin` has been narrowed from `Pin` to `ExactPin`!\n}\n```\n\nWhen a developer deals with values of `Pin` type they will have an immediately much better understanding of the possible states.\n\nIn fact every optional property in some data represents possibly different state representations and thus potentially a use case for an ADT. So for example we could go further with our above data modelling and define things like `ExactPreReleasePin` and `ExactPreReleaseBuildPin`:\n\n```ts\ninterface ExactPreReleasePin {\n  tag: `ExactPreReleasePin`\n  patch: number\n  minor: number\n  major: number\n  release: string\n}\n```\n\n```ts\ninterface ExactPreReleaseBuildPin {\n  tag: `ExactPreReleasePin`\n  patch: number\n  minor: number\n  major: number\n  release: string\n  build: string\n}\n```\n\nOf course like any technique there is a point where ADT modelling is probably overkill for your use-case. That said, that line might be further out than you think. For example while the above might seem excessive, it actually answers a question the previous data modelling left ambiguous which is the question of, is the following state possible?\n\n```ts\nconst pin = {\n  isExact: true,\n  patch: 1,\n  minor: 2,\n  major: 3,\n  build: `5`,\n}\n```\n\nThe answer is no! But without the ADT that _fact_ would have to managed by humans, rather than the machine.\n\nAt scale, having well modelled data can be a life saver. The up front verbosity pays dividends downstream for all the impossible branches removed from programs' possibility space. ADTs help you (or your consumers) focus on what _can actually happen_.\n\n</br></br></br></br></br>\n\n## Features\n\n### Variants\n\nWe can define our ADT with one or more variants using the _ADT Builder_:\n\n```ts\nimport { Alge } from 'alge'\n\nconst Shape = Alge.data('Shape')\n  .variant(`Circle`)\n  .variant(`Square`)\n  .variant('Rectangle')\n  .variant(`Triangle`)\n  .done()\n```\n\nIn return we get back an _ADT Controller_. We can use it to create data:\n\n```ts\nconst circle = Shape.Circle.create()\n// { _tag: 'Circle' }\nconst square = Shape.Square.create()\n// { _tag: 'Square' }\n```\n\n### Lone Variant\n\nIt is possible to define a lone variant instead of a whole ADT using the root `.datum` method.\n\n```ts\nconst Circle = Alge.datum('Circle').done()\nconst Square = Alge.datum('Square').done()\n```\n\n### Lone Variant Composition\n\nYou can compose lone variants into an ADT. Doing so can be useful for code reuse and modularity or also just as an alternative style to the chaining API.\n\n```ts\nconst Shape = Alge.data('Shape').variant(Square).variant(Circle).done()\n```\n\n### Schema\n\n#### Properties\n\nWe can define what properties each variant has. We use `zod` to express our schema.\n\n```ts\nimport { Alge } from 'alge'\nimport { z } from 'zod'\n\nconst Shape = Alge.data('Shape')\n  .variant(`Circle`)\n  .schema({\n    radius: z.number(),\n  })\n  .variant(`Square`)\n  .schema({\n    size: z.number(),\n  })\n  .done()\n```\n\nThe defined schema is used by the _ADT Controller_ constructors to type check your code and give you autocomplete:\n\n```ts\nconst circle = Shape.Circle.create({ radius: 10 })\n// { _tag: 'Circle', radius: 10 }\n\nconst square = Shape.Square.create({ size: 20 })\n// { _tag: 'Square', size: 20 }\n```\n\n#### Optional Properties\n\nProperties can be defined as optional via the schema and then constructors will not require them in the input.\n\n```ts\nconst Shape = Alge.data('Shape')\n  .variant(`Circle`)\n  .schema({\n    radius: z.number(),\n    opacity: z.number().min(0).max(1).optional(),\n  })\n  .variant(`Square`)\n  .schema({\n    size: z.number(),\n  })\n  .done()\n\nconst circle = Shape.Circle.create({\n  radius: 50,\n  // opacity: ...\n  //\n  // ^-- type:     opacity?: number\n})\n// { _tag: 'Circle', size: 50 }\n\nconst circle = Shape.Circle.create({\n  radius: 50,\n  opacity: 0.4,\n})\n// { _tag: 'Circle', size: 50, opacity: 0.4 }\n```\n\n#### Property Defaults\n\nWe can define defaults for properties. We just return values in the `defaults` method.\n\n```ts\nimport { Alge } from 'alge'\nimport { z } from 'zod'\n\nconst Shape = Alge.data('Shape')\n  .variant(`Circle`)\n  .schema({\n    radius: z.number(),\n    opacity: z.number().min(0).max(1),\n  })\n  .defaults((input) => ({\n    opacity: 1,\n    ...input,\n  }))\n  .variant(`Square`)\n  .schema({\n    size: z.number(),\n  })\n  .done()\n```\n\nNow we can create circles with opacity implicitly specified via the default\n\n```ts\nconst circle = Shape.Circle.create({\n  radius: 50,\n  // opacity: ...\n  //\n  // ^-- type:     opacity?: number\n  // ^-- default:  1\n})\n// { _tag: 'Circle', radius: 50, opacity: 1 }\n```\n\n### Identity\n\n`.is` is a variant method that is a TypeScript type guard. It checks if the given ADT value is that variant or not:\n\n```ts\nconst onlyCircle = (shape: Shape): null | Shape.Circle => {\n  return Shape.Circle.is(shape) ? shape : null\n}\n```\n\nWhen you're working with unknown values there is the `.$is` method which takes any input. It is less type safe than `.is` so prefer `.is` when you can use it:\n\n```ts\nconst onlyScoped = (someValue: unknown): null | Shape.Circle => {\n  return Shape.Circle.$is(someValue) ? someValue : null\n}\n```\n\n### Codecs\n\n#### JSON\n\nSometimes there are other representations you want for your data. JSON is a very common one for transferring data between processes, over the network, etc. You can define your own codecs with Alge but JSON comes built in:\n\n```ts\nconst circleJson = Shape.Circle.to.json(circle)\n// '{ \"_tag\": \"Circle\", \"radius\": 50 }'\nconst circle2 = Shape.Circle.From.json(circleJson)\n// { \"_tag\": \"Circle\", \"radius\": 50 }\n```\n\n#### Custom\n\nImagine you want a way to transform your Shape data to/from a custom string representation.\n\n```\nADT Variant             String Representation\n-----------             ---------------------\n\nShape Circle            (<space equal to radius>)\nShape Square            [<space equal to size>]\n```\n\nLet's define a string codec to achieve just this!\n\n```ts\nconst circlePattern = /^\\(( *)\\)$/\nconst squarePattern = /^\\[( *)\\]$/\n\nconst Shape = Alge.data('Shape')\n  .variant(`Circle`)\n  .schema({\n    radius: z.number(),\n  })\n  .codec('string', {\n    //   ^[1]\n    to: (circle) => `(${' '.repeat(circle.radius)})`,\n    from: (circleString) => {\n      const match = circlePattern.exec(circleString)\n      return match ? { radius: match[1]!.length } : null\n      //             ^[2]\n    },\n  })\n  .variant(`Square`)\n  .schema({\n    size: z.number(),\n  })\n  .codec('string', {\n    //   ^[1]\n    to: (square) => `[${' '.repeat(square.size)}]`,\n    from: (squareString) => {\n      const match = squarePattern.exec(squareString)\n      return match ? { size: match[1]!.length } : null\n      //             ^[2]\n    },\n  })\n  .done()\n```\n\nNotes:\n\n1. We give our codec a _name_. This name is used for the derived API (see below).\n2. When returning the parsed data for our variant we do _not_ need to deal with the `_tag` property.\n\nThe `string` codec that we have defined can now be used in the _ADT Controller_ under the `to` and `from` namespaces.\n\n```ts\nconst circle = Shape.Circle.create({ radius: 3 })\n// { _tag: 'Circle', radius: 3 }\nconst circleString = Shape.Circle.to.string(circle)\n// '(   )'\nconst circle2 = Shape.Circle.From.string(circleString)\n// { _tag: 'Circle', radius: 3 }\n```\n\nDecoding could fail if the input is malformed. When that happens `null` is returned.\n\n```ts\nconst circle = Shape.Circle.From.string('(]')\n// null\n```\n\n#### Throw Decoding\n\nWhen `null` is not convenient we can use the `*orThrow` method instead:\n\n```ts\n// throws\nconst circle = Shape.Circle.From.jsonOrThrow('bad')\n```\n\n#### ADT Level\n\nWhen all variants share a codec definition then a generalized ADT level codec is automatically made available as well. Decoders return a union of the variants while encoders always return a string. Each variant decoder is run until one matches or none do. The decoder run order respects the order in which you defined your variants.\n\nExample (based on the `string` codec defined above):\n\n```ts\nconst shape1 = Shape.from.string('()')\n// type: Circle | Square | null\n// value: { _tag: 'Circle', radius: 0 }\nconst shape2 = Shape.from.string('[]')\n// type: Circle | Square | null\n// value: { _tag: 'Square', size: 0 }\nconst shape3 = Shape.from.string('!')\n// type: Circle | Square | null\n// value: null\nconst shape4 = Shape.from.stringOrThrow('!')\n// type: Circle | Square\n// value: throws\n```\n\n### Static Types\n\nOften you will write code (e.g. your own functions) that need to be typed with your ADT. Alge has \"type functions\" for this which leverages TypeScript inference.\n\nFor ADTs there is `Alge.Infer`. It return an object with a property _per_ variant of the ADT _as well as_ a special property `*` which is _a union of all variants_.\n\n```ts\ntype Shape = Alge.Infer<typeof Shape>\n/*\n{\n  Circle: { _tag: 'Circle', radius: number }\n  Square: { _tag: 'Square', size: number }\n  '*':    | { _tag: 'Circle', radius: number }\n          | { _tag: 'Square', size: number }\n}\n*/\n\nconst doSomething = (shape: Shape['*']): null | Shape['Circle'] => {\n  // TODO\n}\n```\n\nFor lone variants there is `Alge.InferDatum`.\n\n```ts\ntype Circle = Alge.InferDatum<typeof Circle>\n\nconst doSomething = (circle: Circle) => {\n  // TODO\n}\n```\n\n#### Namespaces\n\nWhen working with inferred ADT types, if you prefer to work with namespaces rather than objects to reference types you can use the following pattern:\n\n```ts\ntype ShapeInferred = Alge.Infer<typeof Shape>\n\ntype Shape = ShapeInferred['*']\n\nnamespace Shape {\n  export type Circle = ShapeInferred['Circle']\n  export type Square = ShapeInferred['Square']\n}\n\nconst doSomething = (shape: Shape): null | Shape.Circle => {\n  // TODO\n}\n```\n\n</br></br></br></br></br>\n\n![Alt](https://repobeats.axiom.co/api/embed/3c932f1cb76da4ad21328bfdd0ad1c6fbbe76a0b.svg 'Repobeats analytics image')\n","exports":{".":{"import":{"default":"./dist/esm/index.js"},"require":{"default":"./dist/cjs/index.js"}}},"gitHead":"55769fa2f65040a82da204ed75d4978724f18017","license":"MIT","scripts":{"dev":"pnpm clean && tsc --build --watch tsconfig.cjs.json tsconfig.esm.json","lint":"eslint . --ext .ts,.tsx --fix","test":"jest","build":"pnpm clean && pnpm build:cjs && pnpm build:esm","clean":"rm -rf dist-cjs dist-esm node_modules/.cache","format":"pnpm format:prettier","prepack":"pnpm build","ts-node":"ts-node-esm","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","lint:check":"eslint . --ext .ts,.tsx --max-warnings 0","release:pr":"dripip pr","type-check":"pnpm tsc --noEmit","reflect:toc":"markdown-toc README.md -i --maxdepth 4 && prettier --write README.md","format:check":"pnpm format:check:prettier","release:canary":"dripip preview","release:stable":"dripip stable","format:prettier":"prettier --write .","format:check:prettier":"prettier --check ."},"_npmUser":{"name":"jasonkuhrt","email":"jasonkuhrt@me.com"},"homepage":"https://github.com/jasonkuhrt/alge#readme","repository":{"url":"git+ssh://git@github.com/jasonkuhrt/alge.git","type":"git"},"_npmVersion":"8.11.0","description":"[![trunk](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml/badge.svg)](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml)","directories":{},"maintainers":[{"name":"jasonkuhrt","email":"jasonkuhrt@me.com"}],"_nodeVersion":"16.16.0","dependencies":{"zod":"^3.17.3","endent":"^2.1.0","remeda":"^1.0.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@7.8.0","readmeFilename":"README.md","devDependencies":{"tsd":"0.22.0","jest":"28.1.3","konn":"0.7.0","dripip":"0.10.0","eslint":"8.20.0","semver":"7.3.7","ts-jest":"28.0.7","ts-node":"10.9.1","prettier":"2.7.1","@swc/core":"1.2.220","@swc/jest":"0.2.22","typescript":"4.7.4","@jest/types":"28.1.3","@types/jest":"28.1.6","@types/node":"17.0.39","@swc/helpers":"0.4.3","markdown-toc":"1.2.0","semver-utils":"1.1.4","@types/semver":"7.3.10","@tsconfig/node16":"1.0.3","jest-watch-suspend":"1.1.2","@types/semver-utils":"1.1.1","eslint-plugin-tsdoc":"0.2.16","jest-watch-typeahead":"2.0.0","@tsconfig/recommended":"1.0.1","eslint-plugin-codegen":"0.16.1","eslint-config-prettier":"8.5.0","eslint-plugin-only-warn":"1.0.3","@typescript-eslint/parser":"5.31.0","eslint-plugin-deprecation":"1.3.2","eslint-plugin-prefer-arrow":"1.2.3","jest-watch-select-projects":"2.0.0","@prisma-labs/prettier-config":"0.1.0","@typescript-eslint/eslint-plugin":"5.31.0","eslint-plugin-simple-import-sort":"7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/alge_0.1.1-next.1_1659319752955_0.6163066861459157","host":"s3://npm-registry-packages"},"_id":"alge@0.1.1-next.1","version":"0.1.1-next.1"}