Parses the git version
@private
@param {Resolvable|String} str The 'git version' command output
@throws {Error} parsing error
@returns {String} the version number
428604
function parseVersion(str) {
  var match = /git version ([0-9\.]+)/.exec(str);

  if (match) {
    return match[1];
  } else {
    throw new Error('Unable to parse version response', str);
  }
}
1025348
public void parse(String version_string) {
        _version = 0;
        _revision = 0;
        _subrevision = 0;
        _suffix = "";
        int pos = 0;
        int startpos = 0;
        int endpos = version_string.length();
        while ( (pos < endpos) && Character.isDigit(version_string.charAt(pos))) {
            pos++;
        }
        _version = Integer.parseInt(version_string.substring(startpos,pos));
        if ((pos < endpos) && version_string.charAt(pos)=='.') {
            startpos = ++pos;
            while ( (pos < endpos) && Character.isDigit(version_string.charAt(pos))) {
                pos++;
            }
            _revision = Integer.parseInt(version_string.substring(startpos,pos));
        }
        if ((pos < endpos) && version_string.charAt(pos)=='.') {
            startpos = ++pos;
            while ( (pos < endpos) && Character.isDigit(version_string.charAt(pos))) {
                pos++;
            }
            _subrevision = Integer.parseInt(version_string.substring(startpos,pos));
        }
        if (pos < endpos) {
            _suffix = version_string.substring(pos);
        }
    }
455671
function parseVersion(v) {
  const [
    , // Full match of no interest.
    major = null,
    sub = null,
    minor = null,
  ] = /^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-.*)?$/.exec(v);
  if (major === null || sub === null || minor === null) {
    const err = new Error(`Invalid version string (${v})!`);
    logger.error(err);
    throw err;
  }

  return {
    major,
    sub,
    minor,
  };
}
510974
def parse_version_string(version_string):
    
    components = version_string.split('-') + [None, None]
    version = list(map(int, components[0].split('.')))
    build_tag = components[1] if components[1] else BUILD_TAG
    build_number = int(components[2]) if components[2] else components[2]

    return (version, build_tag, build_number)
1177594
function parseNumber( str ) {
	var v = parseFloat( str );
	if ( isnan( v ) ) {
		return new TypeError( 'invalid value. Unable to parse string as a number. Value: `' + str + '`.' );
	}
	return v;
}
230978
function defaultParse(str) {
  if (typeof str !== 'string') {
    return undefined;
  }
  var split = str.split('-');
  if (split.length !== 3) {
    return undefined;
  }
  var year = parseInt(split[0], 10);
  var month = parseInt(split[1], 10) - 1;
  var day = parseInt(split[2], 10);
  if (isNaN(year) || String(year).length > 4 || isNaN(month) || isNaN(day) || day <= 0 || day > 31 || month < 0 || month >= 12) {
    return undefined;
  }

  return new Date(year, month, day);
}
1000339
function parseDate(str/*:string|Date*/, fixdate/*:?number*/)/*:Date*/ {
	var d = new Date(str);
	if(good_pd) {
		/*:: if(fixdate == null) fixdate = 0; */
		if(fixdate > 0) d.setTime(d.getTime() + d.getTimezoneOffset() * 60 * 1000);
		else if(fixdate < 0) d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);
		return d;
	}
	if(str instanceof Date) return str;
	if(good_pd_date.getFullYear() == 1917 && !isNaN(d.getFullYear())) {
		var s = d.getFullYear();
		if(str.indexOf("" + s) > -1) return d;
		d.setFullYear(d.getFullYear() + 100); return d;
	}
	var n = str.match(/\d+/g)||["2017","2","19","0","0","0"];
	var out = new Date(+n[0], +n[1] - 1, +n[2], (+n[3]||0), (+n[4]||0), (+n[5]||0));
	if(str.indexOf("Z") > -1) out = new Date(out.getTime() - out.getTimezoneOffset() * 60 * 1000);
	return out;
}
398045
function parse (str) {
	var params = str.split('_')
	return {
		float: params[0] === 'F',
		signed: params[0] === 'S',
		bitDepth: parseInt(params[1]),
		byteOrder: params[2],
		channels: parseInt(params[3]),
		sampleRate: parseInt(params[4]),
		interleaved: params[5] === 'I'
	}
}
822681
function parseDate( str ) {
	var v = Date.parse( str );
	if ( isnan( v ) ) {
		return new TypeError( 'invalid value. Unable to parse string as a date. Value: `' + str + '`.' );
	}
	return new Date( v );
}
1063130
function(str){
        var versionArray = str.split(",");//replace with regex
        return {
            "raw":str,
            "major":parseInt(versionArray[0].split(" ")[1], 10),
            "minor":parseInt(versionArray[1], 10),
            "revision":parseInt(versionArray[2], 10),
            "revisionStr":versionArray[2]
        };
    }
570305
def get_version():
    """"""
    proc = subprocess.Popen(
        ("git", "describe", "--tag", "--always"), 
        stdout=subprocess.PIPE, stderr=subprocess.STDOUT
    )
    output, _ = proc.communicate()
    result = output.decode("utf-8").strip()
    if proc.returncode != 0:
        sys.stderr.write(
            ">>> Git Describe Error:\n    " +
            result
        )
        return "1+unknown"
    split = result.split("-", 1)
    version = "+".join(split).replace("-", ".")

    if len(split) > 1:
        sys.stderr.write(
            ">>> Please verify the commit tag:\n    " +
            version + "\n"
        )
    return version
142689
def parse_version(version: str) -> tuple:
    
    if not version:
        return None
    parts = version.split('.')
    missing = 3 - len(parts)
    return tuple(int(i) for i in parts + ([0] * missing))
738231
function parse(str, callback) {
	process.nextTick(function () {
		var output = parseSync(str);
		callback(output);
	});
}
477691
function parse (str, options) {
  if (typeof str !== 'string') throw new TypeError('str is required!');

  var splitData = split(str);
  var raw = splitData.data;

  if (!raw) return { _content: str };

  var data;

  data = parseYAML(raw, options);

  if (!data) return { _content: str };

  data._content = splitData.content;

  return data;
}
678306
function parseObject( str ) {
	var obj = parseJSON( str );
	if ( obj instanceof Error ) {
		return new TypeError( 'invalid value. Unable to parse string as a JSON object. Value: `' + str + '`. Error: `' + obj.message + '`.' );
	}
	return obj;
}
1098138
function parseString(str) {
  var obj = {};
  var pairs = str.split('&');
  var pair;
  var pos;

  for (var i = 0, len = pairs.length; i < len; ++i) {
    pair = pairs[i];
    pos = pair.indexOf('=');
    if (pos == -1) {
      obj[decodeURIComponent(pair)] = '';
    } else {
      obj[decodeURIComponent(pair.slice(0, pos))] =
        decodeURIComponent(pair.slice(pos + 1));
    }
  }

  return obj;
}
603675
function parse(str, options) {
  var obj = options.object || 'obj'
    , space = options.pretty ? 2 : 0
    , space = options.spaces ? options.spaces : space
    , js = str;
  
  return ''
    + 'var ' + obj + ' = factory();\n'
    + (options.self
      ? 'var self = locals || {};\n' + js
      : 'with (locals || {}) {\n' + js + '\n}\n')
    + 'return JSON.stringify(' + obj + ', null, ' +  space + ')';
}