react-native-advanced-input-mask
Version:
Text input mask for React Native on iOS, Android and web. Synchronous and easy formatting without hustle
13 lines (10 loc) • 308 B
text/typescript
import type { Ellipsis, StateType } from "./types";
import type { Notation } from "../../types";
export const getCharacterTypeString = (
state?: StateType | Notation | Ellipsis,
): string => {
if (!state) {
return "[?]";
}
return "name" in state ? state.typeString : `[${state.character}]`;
};