A simple utility for creating a publish / subscribe object in JavaScript