Skip to content

anim-format (runtime format) / formatCompat

Function: formatCompat() ​

ts
function formatCompat(file, reader): "same" | "older" | "newer" | "invalid";

How a file of version file relates to a reader built for reader:

  • "same" same major.minor (any patch) — read it as is
  • "older" the file is from an earlier major.minor — upgrade it
  • "newer" the file is from a later major.minor — the reader is too old
  • "invalid" file is not a version

Parameters ​

ParameterType
fileunknown
readerstring

Returns ​

"same" | "older" | "newer" | "invalid"

HereSplash — 2D animation for the web