This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example splitWithDelimiter({query: 'the', suggestion: 'The quick brown fox jumps over the lazy dog.', shouldIgnoreCase: true}) | |
* Evaluates to ['The', ' quick brown fox jumps over ', 'the', ' lazy dog.']; | |
*/ | |
function splitWithDelimiter ({delimiter, target, shouldIgnoreCase}) { | |
const result = []; | |
const formattedTarget = shouldIgnoreCase ? target.toLowerCase() : target; | |
const formattedDelimiter = shouldIgnoreCase ? delimiter.toLowerCase() : delimiter; | |
const doesStartWithDelimiter = formattedTarget.startsWith(formattedDelimiter); | |
const doesEndWithDelimiter = formattedTarget.endsWith(formattedDelimiter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import TypeWriter from 'react-native-typewriter'; | |
const App = () => { | |
const [isDeleting, setIsDeleting] = React.useState(false) | |
const handleAnimationEnd = () => { | |
setIsDeleting(true) | |
} | |