"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/lib/deprecated-packages.js" (11 Apr 2017, 692 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 (function() {
    2   var deprecatedPackages, semver;
    3 
    4   semver = require('semver');
    5 
    6   deprecatedPackages = null;
    7 
    8   exports.isDeprecatedPackage = function(name, version) {
    9     var deprecatedVersionRange, ref;
   10     if (deprecatedPackages == null) {
   11       deprecatedPackages = (ref = require('../deprecated-packages')) != null ? ref : {};
   12     }
   13     if (!deprecatedPackages.hasOwnProperty(name)) {
   14       return false;
   15     }
   16     deprecatedVersionRange = deprecatedPackages[name].version;
   17     if (!deprecatedVersionRange) {
   18       return true;
   19     }
   20     return semver.valid(version) && semver.validRange(deprecatedVersionRange) && semver.satisfies(version, deprecatedVersionRange);
   21   };
   22 
   23 }).call(this);