code: async function embellish({ content, filename, packageData, basePath } /*: EmbelishOptions */) /*: Promise<string> */ {
    if (filename) {
      const packageFile = path.resolve(path.dirname(filename), 'package.json');
  
      return embellish({
        content: await readFileContent(filename),
        basePath: path.dirname(packageFile),
        packageData: await Package.readFromFile(packageFile)
      });
    }
  
    if (!content || !basePath) {
      throw new Error('Unable to embelish content unless content is provided');
    }
  
    const ast = parse(content);
    await insertLicense(ast, packageData, basePath);
    await insertBadges(ast, packageData, basePath);
    return Promise.resolve(toMarkdown(ast));
  }
docs: /*::
  type EmbelishOptions = {
  content?: string,
  filename?: string,
  basePath?: string,
  packageData: Package
  };
  
  type AstSegmenter = number | () => boolean;
  
  import type { BadgeBuilder } from './lib/badges';