Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function splitCamelCaseWord(word: string): string[] {
const wPrime = word.replace(regExUpperSOrIng, s => s[0] + s.substr(1).toLowerCase());
const separator = '_<^*_*^>_';
const pass1 = XRegExp.replace(wPrime, regExSplitWords, '$1' + separator + '$2');
const pass2 = XRegExp.replace(pass1, regExSplitWords2, '$1' + separator + '$2');
return XRegExp.split(pass2, separator);
}
export function splitCamelCaseWord(word: string): string[] {
const wPrime = word.replace(regExUpperSOrIng, s => s[0] + s.substr(1).toLowerCase());
const separator = '_<^*_*^>_';
const pass1 = XRegExp.replace(wPrime, regExSplitWords, '$1' + separator + '$2');
const pass2 = XRegExp.replace(pass1, regExSplitWords2, '$1' + separator + '$2');
return XRegExp.split(pass2, separator);
}
export function splitCamelCaseWord(word: string): string[] {
const wPrime = word.replace(regExUpperSOrIng, s => s[0] + s.substr(1).toLowerCase());
const separator = '_<^*_*^>_';
const pass1 = XRegExp.replace(wPrime, regExSplitWords, '$1' + separator + '$2');
const pass2 = XRegExp.replace(pass1, regExSplitWords2, '$1' + separator + '$2');
return XRegExp.split(pass2, separator);
}
export function splitCamelCaseWord(word: string): string[] {
const wPrime = word.replace(regExUpperSOrIng, s => s[0] + s.substr(1).toLowerCase());
const separator = '_<^*_*^>_';
const pass1 = XRegExp.replace(wPrime, regExSplitWords, '$1' + separator + '$2');
const pass2 = XRegExp.replace(pass1, regExSplitWords2, '$1' + separator + '$2');
return XRegExp.split(pass2, separator);
}
.map(({ text, offset }) => ({
text: XRegExp.replace(text, regExIgnoreCharacters, (match: string) => ' '.repeat(match.length)),
offset,
}))
.concatMap(wo => matchToTextOffset(reg2, wo))