isBytes

tcmts.cli.files.isBytes · #4gu7m5s4 · term · runs anywhere

Whether a file definition holds bytes (an image, or anything that isn't text) rather than text.

import type { DefRecord } from "#codebase/tcmts/core/types";

export const isBytes = (rec: DefRecord): boolean => (JSON.parse(rec.ir) as unknown[][])[2]?.[0] === "Bytes"

uses

used by