The enumValues() function is still supported, but we recommend that you use the enumEntries() function instead because it has less performance impact. Every time you call enumValues() a new array is created, whereas whenever you call enumEntries() the same list is returned each time, which is far more efficient.
link