Echo Banner
    Preparing search index...

    Function print

    • Prints a stylized banner of a package name using a FIGlet font.

      The banner can optionally include the package version appended to the last visible line of the generated ASCII text.

      This is useful for CLI tools to display a startup banner with project name and version.

      Parameters

      • __namedParameters: {
            color?: boolean;
            font?: FontName;
            pkg: Pick<PackageMeta, "name" | "displayName" | "version">;
            prefixVersion?: string;
            useDisplayName?: boolean;
            useVersion?: boolean;
        }
        • Optionalcolor?: boolean

          Enable or disable colored output.

          true
          
        • Optionalfont?: FontName

          Figlet font used to render the banner.

          "Slant"
          
        • pkg: Pick<PackageMeta, "name" | "displayName" | "version">

          Package metadata containing the name, optional display name, and version.

        • OptionalprefixVersion?: string

          Prefix added before the version string.

          "v"
          
          "v1.0.0"
          
        • OptionaluseDisplayName?: boolean

          Prefer displayName over name when available.

          true
          
        • OptionaluseVersion?: boolean

          Whether to append the version to the banner.

          true
          

      Returns Promise<void>

      • If displayName is available and useDisplayName is true, it will be used instead of name.
      • If useVersion is enabled and pkg.version exists, the version will be aligned to the right side of the banner's last visible line.
      • If the banner contains no printable lines, the raw FIGlet output is printed.
      • If color is disabled, all ANSI styling is turned off.
      import { print } from "echo-banner";
      import pkg from "../package.json";

      await print({
      pkg,
      font: "Slant"
      });
      await print({
      pkg,
      prefixVersion: "@",
      });
      await print({
      pkg,
      useVersion: false
      });
      await print({
      pkg,
      useDisplayName: false
      });
      await print({
      pkg,
      color: false
      });