function findVersion (versions, version) {
    var cleanedVersion = semver.clean(version);
    for (var i = 0; i < versions.length; i++) {
        if (semver.clean(versions[i]) === cleanedVersion) {
            return versions[i];
        }
    }
    return null;
}