JS utility