Description: ckqing.home
javascript (14878) ios (6664) computer science (1326) swift (755) fe (213) c/c++ (193)
We have a project based on ReactNative. Recently, we encountered a problem, that is, when the operation colleague configured the color value, one was missing, and only five were allocated, which led to page confusion and JS errors.
In addition to increasing restrictions on the configuration platform, we have also taken some inspection measures in the project.
The problem is, how to check if the color string is valid using JS.