assert-combinators

Functional assertion combinators. (by appliedblockchain)

Assert-combinators Alternatives

Similar projects and alternatives to assert-combinators

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better assert-combinators alternative or higher similarity.

assert-combinators reviews and mentions

Posts with mentions or reviews of assert-combinators. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-24.
  • Kysely: TypeScript SQL Query Builder
    19 projects | news.ycombinator.com | 24 Jan 2023
    We use in prod variant of no 1. [0]. Why? Because:

    * it's extremely lightweight (built on pure, functional combinators)

    * it allows us to use more complex patterns ie. convention where every json field ends with Json which is automatically parsed; which, unlike datatype alone, allows us to create composable query to fetch arbitrarily nested graphs and promoting single [$] key ie. to return list of emails as `string[]` not `{ email: string }[]` with `select email as [$] from Users` etc.

    * has convenience combinators for things like constructing where clauses from monodb like queries

    * all usual queries like CRUD, exists etc. and some more complex ie. insertIgnore, merge1n etc has convenient api

    We resort to runtime type assertions [1] which works well for this and all other i/o; runtime type assertions are necessary for cases when your running service is incorrectly attached to old or future remote schema (there are other protections against it but still happens).

    [0] https://github.com/appliedblockchain/tsql

    [1] https://github.com/appliedblockchain/assert-combinators

  • GraphJin – An Instant GraphQL to SQL Compiler
    12 projects | news.ycombinator.com | 28 May 2022
    We use not so much frameworks but combination of lightweight libraries:

    - runtime assertions [0] - to map unknown values at i/o boundary into statically typed code (rpc input parameters, sql results etc)

    - template based sql combinators to sanitize sql/generate sql [1]

    - jsonrpc over websockets - for bidirectional comms between f/e and b/e

    [0] https://github.com/appliedblockchain/assert-combinators

    [1] https://github.com/appliedblockchain/tsql

  • Parser Combinators in Haskell
    10 projects | news.ycombinator.com | 22 Dec 2021
  • An Inconsistent Truth: Next.js and Typesafety
    5 projects | news.ycombinator.com | 2 Dec 2021
    Types can be asserted at runtime (parsed) at IO boundaries (reading http request or response, websocket message, parsing json file etc). Once they enter statically type system they don't need to be asserted again.

    The difference it makes is illusion of type-safety vs type-safety this article touches on.

    You can try to bind service with client somehow but in many cases this will fail in production as you can't guarantee paired versioning, due to normal situations by design of your architecture or temporary mid-deployment state or other team doing something they were not suppose to do etc. It's hard to avoid runtime parsing in general.

    Functional combinators [0] or faster [1] with predicate/assert semantics work very well with typescript, which is very pleasant language to work with.

    [0] https://github.com/appliedblockchain/assert-combinators

    [1] https://github.com/preludejs/refute

  • Parsix: Parse Don't Validate
    6 projects | news.ycombinator.com | 15 May 2021
    Once i/o boundaries are parsing unknown types into static types, your type safety is guaranteed.

    [0] https://github.com/appliedblockchain/assert-combinators

  • A note from our sponsor - InfluxDB
    www.influxdata.com | 25 Apr 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Stats

Basic assert-combinators repo stats
5
23
5.7
3 months ago

Sponsored
The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com