Why don't you use `indexOf`. It should be faster:

~~~js
if (tools.indexOf(['left', 'center', 'right'], textAlign) > -1) {
  // ...
}
~~~