BCNF decomposer in JavaScript