tokenizePhoneNumber function

Iterable<String> tokenizePhoneNumber(
  1. String? phoneNumber
)

Implementation

Iterable<String> tokenizePhoneNumber(String? phoneNumber) {
  final split =
      Lists.compactEmpty(phoneNumber?.split(phoneNumberSplitCharacters));
  split.remove("1");
  final joined = split.join("");
  return [if (joined.isNotEmpty) joined, ...split];
}