@metamask/snaps-utils
Version:
A collection of utilities for MetaMask Snaps
11 lines • 533 B
text/typescript
import type { Struct } from "@metamask/superstruct";
/**
* A wrapper of Superstruct's `literal` struct that accepts a value in either
* completely lowercase or completely uppercase (i.e., "usd" or "USD").
*
* @param string - The currency symbol.
* @returns The struct that accepts the currency symbol in either case. It will
* return the currency symbol in lowercase.
*/
export declare function currency<Value extends string>(string: Value): Struct<Lowercase<Value> | Uppercase<Value>>;
//# sourceMappingURL=currency.d.cts.map