Common JS utilities