extra-version.min
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.15 • Public • Published

    A version is a set of numbers that identify a unique evolution of a system. 🏃 📼 📦 🌔 📒

    Methods as separate packages:

    Most of the ideas are from Semantic versioning by Tom Preston, and semver by Isaac Schlueter.

    Stability: Experimental.
    This is browserified, minified version of extra-version.
    It is exported as global variable version.
    CDN: unpkg, jsDelivr.

    const version = require('extra-version');
    // import * as version from 'extra-version';
    // import * as version from 'https://unpkg.com/extra-version@1.0.0/index.mjs'; (deno)
    
    var x = version.from('v1.2.3.4');
    x.toString();
    // '1.2.3+4'
    
    var x = version.from('0.2');
    version.isUnstable(x);
    // true
    
    var x = version.from('1.2');
    var y = version.from('1.2.3');
    version.compare(x, y);
    // -3
    
    var x = version.from('1.2');
    var y = version.next(x, version.MINOR);
    y.toString();
    // '1.3.0'

    reference

    Method Action
    is Checks if value is version.
    isUnstable Checks if version is major 0, or pre-release.
    from Converts value to version.
    parse Converts string to version.
    stringify Converts version to string.
    compare Compares two versions.
    isEqual Checks if two versions are equal.
    next Gives the next version.
    MAJOR Defines first major version. (1.0.0)
    MINOR Defines first minor version. (0.1.0)
    PATCH Defines first patch version. (0.0.1)
    RVERSION Regular expression to check a semver string.

    nodef

    Install

    npm i extra-version.min

    DownloadsWeekly Downloads

    3

    Version

    1.0.15

    License

    MIT

    Unpacked Size

    21.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • wolfram77