javascript module for deck building