Yeah, I actually wrote that function and then forgot about it here... been too long since I've done a PR :)