Nuanced Pterodactyl Monk

    dep-diff

    1.0.1 • Public • Published

    dep-diff devDependency Status

    Get a list of differences between package dependencies

    var depDiff = require("dep-diff")
      , ChangedDep = depDiff.ChangedDep
      , AddedDep = depDiff.AddedDep
      , RemovedDep = depDiff.RemovedDep
     
    var diffs = depDiff(
      {
        "async": "~0.1.2",
        "config": "~0.4.32",
        "consolidate": "~0.9.1"
      },
      {
        "async": "~0.2.9",
        "config": "~0.4.32",
        "couchwatch": "~0.6.0"
      }
    )
     
    // diffs is an array of 3 items [ChangedDep, AddedDep, RemovedDep]. You use instanceof to determine the diff type.
    //
    // ChangedDep.name = async
    // ChangedDep.version = ~0.2.9
    // ChangedDep.previous = ~0.1.2
    //
    // AddedDep.name = couchwatch
    // AddedDep.version = ~0.6.0
    //
    // RemovedDep.name = consolidate
    // RemovedDep.previous = ~0.9.1

    Keywords

    none

    Install

    npm i dep-diff

    DownloadsWeekly Downloads

    2,016

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • alanshaw