lib/collection/version.js
function (value) {
        // extract the version logic and in case it failes and value passed is an object, we use that assuming parsed
        // value has been sent.
        var ver = semver.parse(value) || value || {};

        _.assign(this, /** @lends Version.prototype */ {
            /**
             * The raw URL string. If {@link Version#set} is called with a string parameter, the string is saved here
             * before parsing various Version components.
             *
             * @type {String}
             */
            raw: ver.raw,

            /**
             * @type {String}
             */
            major: ver.major,

            /**
             * @type {String}
             */
            minor: ver.minor,

            /**
             * @type {String}
             */
            patch: ver.patch,

            /**
             * @type {String}
             */
            prerelease: ver.prerelease && ver.prerelease.join && ver.prerelease.join() || ver.prerelease,

            /**
             * @type {String}
             */
            build: ver.build && ver.build.join && ver.build.join() || ver.build,

            /**
             * @type {String}
             */
            string: ver.version
        });
    }
function (value) {
        // extract the version logic and in case it failes and value passed is an object, we use that assuming parsed
        // value has been sent.
        var ver = semver.parse(value) || value || {};

        _.assign(this, /** @lends Version.prototype */ {
            /**
             * The raw URL string. If {@link Version#set} is called with a string parameter, the string is saved here
             * before parsing various Version components.
             *
             * @type {String}
             */
            raw: ver.raw,

            /**
             * @type {String}
             */
            major: ver.major,

            /**
             * @type {String}
             */
            minor: ver.minor,

            /**
             * @type {String}
             */
            patch: ver.patch,

            /**
             * @type {String}
             */
            prerelease: ver.prerelease && ver.prerelease.join && ver.prerelease.join() || ver.prerelease,

            /**
             * @type {String}
             */
            build: ver.build && ver.build.join && ver.build.join() || ver.build,

            /**
             * @type {String}
             */
            string: ver.version
        });
    }
function ( value ) { // extract the version logic and in case it failes and value passed is an object, we use that assuming parsed // value has been sent. var ver = semver . parse ( value ) || value || { } ; _ . assign ( this , /** @lends Version.prototype */ { /**
             * The raw URL string. If {@link Version#set} is called with a string parameter, the string is saved here
             * before parsing various Version components.
             *
             * @type {String}
             */ raw : ver . raw , /**
             * @type {String}
             */ major : ver . major , /**
             * @type {String}
             */ minor : ver . minor , /**
             * @type {String}
             */ patch : ver . patch , /**
             * @type {String}
             */ prerelease : ver . prerelease && ver . prerelease . join && ver . prerelease . join ( ) || ver . prerelease , /**
             * @type {String}
             */ build : ver . build && ver . build . join && ver . build . join ( ) || ver . build , /**
             * @type {String}
             */ string : ver . version } ) ; }
Set the version value as string or object with separate components of version

@draft
@param {object|string} value
Set the version value as string or object with separate components of version