Maybe export two functions instead of one with a boolean flag?