nowfound

Life & fun · April 27, 2015

An opinionated approach to have type safety in native JavaScript

Post about Avocado, a small library and pattern guide to help you with type safety and data validation in native JavaScript.

An opinionated approach to have type safety in native JavaScript launched on April 27, 2015 with 19 votes, #1,037 of 3,600 launches that month and more than 75% of that year's launches. The site was still online in September 2026, 11 years on.

In plain words

Avocado is a small JavaScript library and pattern guide that provides type safety and data validation for native JavaScript projects. It helps developers maintain code organization and prevent spaghetti code by establishing simple, modular patterns without requiring heavyweight frameworks. The tool is designed for JavaScript developers who want to add structure and type checking to their projects while preserving the language's flexibility.

written from the facts on this page · September 2026

From the sources

I have to admit, I love JavaScript and do not completely grasp the bashing. It supports my style of thinking and prototyping. I like its flexibility, it gives me a lot of subjective freedom. But as Voltaire and others say, with great power comes great responsibility. By not forcing any models, certain styles or patterns on you there is a high probability of your project ending up in total spaghetti or even worse risotto code. Therefore I’m a big fan of simple patterns and modularity. I don’t like monolithic frameworks which force you to use a certain structure or style of code. To understand what I like about simple patterns have a look at Bostock’s Towards Reusable Charts and Elliot on…from rafelsberger.at

Does a similar job

all alternatives →
  • AI
  • Instant API – Build type-safe web APIs with JavaScript2023 · github.com · ▲102

    Hey there HN! I just wrapped up an all-day documentation spree for Instant API, a JavaScript framework for easily building web APIs that implements type safety at the HTTP interface. It uses a function-as-a-service approach combined with a slightly modified JSDoc spec to automatically enforce parameter and schema validation before HTTP requests make it through to your code. You just write comments above your endpoint functions and voila, enforced type safety contracts between your API endpoints and your developers. OpenAPI specifications are generated automatically as a byproduct of simply…

  • Execute JavaScript in a WebAssembly QuickJS sandbox2024 · github.com · ▲206

    This TypeScript package allows you to safely execute JavaScript code within a WebAssembly sandbox using the QuickJS engine. Perfect for isolating and running untrusted code securely, it leverages the lightweight and fast QuickJS engine compiled to WebAssembly, providing a robust environment for code execution. Features - *Security*: Run untrusted JavaScript code in a safe, isolated environment. - *File System*: Can mount a virtual file system - *Custom Node Modules*: Custom node modules are mountable - *Fetch Client*: Can provide a fetch client to make http(s) calls - *Test-Runner*: Includes…

  • CalDOM: An agnostic, reactive and minimalist JavaScript UI library2021 · caldom.org · ▲107

    An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.

  • Danfo.js2020 · github.com · ▲109

    Open Source JavaScript library for manipulating data.

  • KA
    Kysely, a type-safe SQL query builder for TypeScript2023 · kysely.dev · ▲90

    The most powerful type-safe SQL query builder for TypeScript

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, April 2015

the whole month →
  • Hunter▲1,703

    Find any company logo by domain with Hunter’s free logo API. No account, no API key. The simplest Clearbit Logo API replacement, switch in 30 seconds.

    Growth · 2015 · hunter.io

  • View Mac keyboard shortcuts in the current application

    Work · 2015 · mediaatelier.com

  • Helium▲794

    A floating browser window for your Mac

    Work · 2015

  • saas that helps convert

    Life & fun · 2015 · transformy.io

  • AR

    Life & fun · 2015 · tiffzhang.com

  • Operator▲546

    Looking for something? Make a request and we'll find it.

    AI · 2015 · operator.com