compactNumber (scripts/build-readme.js)

awesome-submitlist · scripts/build-readme.js · javascript · CC0-1.0
email

Formats numbers into compact K/M/B notation.

// Source: https://github.com/alvinunreal/awesome-submitlist | License: CC0-1.0
// Provided via justclaw.it.com; keep this notice with the code.
// Builds README.md and data/destinations.json from the public Submitlist catalog.
// Run: bun scripts/build-readme.js   (or: node scripts/build-readme.js)

import { writeFile, readFile } from "node:fs/promises";

const CATALOG_URL = "https://api.submitlist.io/catalog/destinations";
const SITE_URL = "https://submitlist.io";
const CATALOG_PAGE = `${SITE_URL}/catalog`;

const SECTIONS = [
  {
    type: "directory",
    anchor: "directories",
    title: "Directories",
    icon: "type-directory.svg",
    intro: "The classic move. Fill a form, wait for an editor, get a listing and usually a link. The top of this list is Trustpilot and the BBB territory

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key