How to use quicktype - 1 common examples

To help you get started, we’ve selected a few quicktype examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github typeguard / awesome-typed-datasets / src / readme.ts View on Github external
function* generate() {
    yield `# Awesome Typed Datasets [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)`;

    const displayNames = defaultTargetLanguages
      .map(l => l.displayName)
      .filter(d => d !== "Simple Types");
    const nameList =
      displayNames.slice(1).join(", ") + ", and " + displayNames[0];

    yield* [
      ``,
      `These are public JSON datasets that have been strongly`,
      `typed with [quicktype](https://github.com/quicktype/quicktype).`,
      `Each is a repo with code in ${nameList} for`,
      `reading and writing the JSON produced by these APIs.`,
      ``
    ];

    for (const name of Object.keys(categories).sort()) {
      yield* categoryList(name, categories[name]);

quicktype

![](https://raw.githubusercontent.com/quicktype/quicktype/master/media/quicktype-logo.svg?sanitize=true)

Apache-2.0
Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis