@libraz/libcantus - v1.1.0
    Preparing search index...

    Function resolveAlgorithmVersion

    • Resolve the algorithm version a request runs under.

      An unpinned request runs at ALGORITHM_VERSION, which is what a caller who wants the current behaviour means; a caller who wants the piece back records the resolved number and passes it next time. A version this build does not produce is rejected — a project saved by a newer build cannot be reproduced by an older one, and quietly rendering it at another version would return a different piece under the same name.

      Parameters

      • Optionalrequested: number

        The pinned version, or undefined for the current one.

      Returns number

      The version to generate under.

      If the version is not an integer this build produces.

      import { ALGORITHM_VERSION, resolveAlgorithmVersion } from '@libraz/libcantus';
      resolveAlgorithmVersion(undefined); // ALGORITHM_VERSION
      resolveAlgorithmVersion(ALGORITHM_VERSION); // the pinned value, unchanged