javascript merger