<commit_before>export default async () => {
  const dom = {
    select: document.querySelector.bind(document)
  };

  const template = dom.select('#quote-template').content;
  const container = dom.select('#quote-container');

  try {
    const {quotes} = await $.getJSON({
      url: 'https://cdn.rawgit.com/chrisvogt/49b51791348a09cbddb0/raw/585d1712885dda5c13d63c17b5e093d543640e42/book-quotes.json'
    });
    const fragment = document.createDocumentFragment();

    if (!quotes || quotes.length === 0) {
      throw new Error('No quotes found.');
    }

    for (const quote of quotes) {
      const {cite, text} = quote;
      const content = template.cloneNode(true);
      const blockquote = content.querySelector('.quote-content');

      const citeEl = document.createElement('cite');
      citeEl.appendChild(document.createTextNode(cite));

      blockquote.appendChild(document.createTextNode(text));
      blockquote.appendChild(citeEl);<commit_msg>feat: migrate quotes from RawGit to my Personal API (#87)<commit_after>export default async () => {
  const dom = {
    select: document.querySelector.bind(document)
  };

  const template = dom.select('#quote-template').content;
  const container = dom.select('#quote-container');

  try {
    const {result: {quotes}} = await $.getJSON({url: 'https://api.chrisvogt.me/quotes'});
    const fragment = document.createDocumentFragment();

    if (!quotes || quotes.length === 0) {
      throw new Error('No quotes found.');
    }

    for (const quote of quotes) {
      const {cite, body} = quote;
      const content = template.cloneNode(true);
      const blockquote = content.querySelector('.quote-content');

      const citeEl = document.createElement('cite');
      citeEl.appendChild(document.createTextNode(cite));

      blockquote.appendChild(document.createTextNode(body));
      blockquote.appendChild(citeEl);
{'fraction_non_alphanumeric': 0.13944856839872746, 'fraction_numerical': 0.024390243902439025, 'mean_word_length': 3.7293233082706765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6501341', 'n_tokens_mistral': 584, 'n_tokens_neox': 544, 'n_words': 114}