react-native-advanced-input-mask
Version:
Text input mask for React Native on iOS, Android and web. Synchronous and easy formatting without hustle
29 lines • 714 B
JavaScript
import State from "./State";
class FreeState extends State {
constructor(child, ownCharacter) {
super(child);
this.ownCharacter = ownCharacter;
}
accept = char => {
return this.ownCharacter === char ? {
state: this.nextState(),
insert: char,
pass: true,
value: null
} : {
state: this.nextState(),
insert: this.ownCharacter,
pass: false,
value: null
};
};
autocomplete = () => ({
state: this.nextState(),
insert: this.ownCharacter,
pass: false,
value: null
});
toString = () => `${this.ownCharacter} -> ${this.child ? this.child.toString() : "null"}`;
}
export default FreeState;
//# sourceMappingURL=FreeState.js.map