import string


def UsesConstantSyntax(value):
  """Check if |value| follows our style for JavaScript constants."""
  allowed_characters = set(string.ascii_uppercase + string.digits + '_')

  # This uses set difference to find any characters in |value| that don't appear
  # in |allowed_characters|.  Then it uses boolean logic to return True for an
  # empty set.
  return not set(value) - allowed_characters