5 lines
185 B
TypeScript
5 lines
185 B
TypeScript
|
|
export function isInsertBeforeInput(nativeEvent: Pick<InputEvent, 'inputType'>) {
|
||
|
|
return typeof nativeEvent.inputType === 'string'
|
||
|
|
&& nativeEvent.inputType.startsWith('insert')
|
||
|
|
}
|