@heap/react-native-heap
Version:
React Native event tracking with Heap.
8 lines (7 loc) • 314 B
JavaScript
const SPECIAL_CHARACTER_MATCHER = /[\[\]\|\;\@\#\=]/g;
export const containsReservedCharacter = hierarchyElement => {
return SPECIAL_CHARACTER_MATCHER.test(hierarchyElement);
};
export const stripReservedCharacters = hierarchyElement => {
return hierarchyElement.replace(SPECIAL_CHARACTER_MATCHER, '');
};