consat.js is a JavaScript library providing a constraint satisfaction solver for solving constraint satisfaction problems.
consat.js allows you to build your problems programmatically or by providing an XML document containing a description of a CSP. The API and XML definition format are detailed below.
There are many useful online resources describing CSPs and techniques for solving them. Chapter 6 of Artificial Intelligence: A Modern Approach, S. Russell and P.Norvig (3rd Ed.). 2010. Pearson, http://aima.cs.berkeley.edu covers Constraint Satisfaction Problems.