index.js
function parse(input) {
				if (typeof input === 'object') {
					input = stringify(input);
				}

				if (!input) {
					return { m: 0 };
				}

				var path = input.split('-');
				output = {
					m: Number(path.shift())
				};

				if (path.length) {
					path.forEach(function (variation, i) {
						variation = variation.split(':');
						output[Number(variation[0])] = parseInt(variation[1], 10);
					});
				}

				return output;
			}
function parse(input) {
				if (typeof input === 'object') {
					input = stringify(input);
				}

				if (!input) {
					return { m: 0 };
				}

				var path = input.split('-');
				output = {
					m: Number(path.shift())
				};

				if (path.length) {
					path.forEach(function (variation, i) {
						variation = variation.split(':');
						output[Number(variation[0])] = parseInt(variation[1], 10);
					});
				}

				return output;
			}
function parse ( input ) { if ( typeof input === 'object' ) { input = stringify ( input ) ; } if ( ! input ) { return { m : 0 } ; } var path = input . split ( '-' ) ; output = { m : Number ( path . shift ( ) ) } ; if ( path . length ) { path . forEach ( function ( variation , i ) { variation = variation . split ( ':' ) ; output [ Number ( variation [ 0 ] ) ] = parseInt ( variation [ 1 ] , 10 ) ; } ) ; } return output ; }
Turn a path string into an object.
Turn a path string into an object .