@decafhub/decaf-client-extras - v0.7.0
    Preparing search index...

    Function mkCurrencyCodeError

    • (Unsafely) attempts to create a CurrencyCode value with the given currency code.

      This function may throw an error if the given argument is not a valid currency code. For the monadic version, see mkCurrencyCode.

      Parameters

      • x: string

        A currency code represented as string.

      Returns CurrencyCode

      If the argument has leading or trailing spaces OR it is empty, an error is thrown, CurrencyCode is returned otherwise.