// Generated by IcedCoffeeScript 1.7.1-g
(function() {
  var check_node, check_node_async, good_versions, is_good_version, known_bad_versions, old_versions, semver, suggest_version, suggest_versions,
    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

  semver = require('semver');

  known_bad_versions = ["0.10.31"];

  old_versions = "<0.10.20";

  good_versions = "0.10.20 - 0.10.30 || >=0.10.32";

  suggest_versions = ["0.10.32", "0.11.13"];

  suggest_version = "0.10.32";

  is_good_version = function(v) {
    return semver.satisfies(v, good_versions);
  };

  check_node = function(v) {
    var msg, problem;
    v || (v = process.version);
    v = semver.clean(v);
    problem = is_good_version(v) ? null : __indexOf.call(known_bad_versions, v) >= 0 ? problem = "known to crash" : semver.satisfies(v, old_versions) ? msg = "out of date" : !is_good_version(v) ? problem = "not recommended" : void 0;
    if (problem == null) {
      return null;
    } else {
      return new Error("Your version of node (" + v + ") is " + problem + "; please upgrade to " + suggest_version + " or better");
    }
  };

  check_node_async = function(v, cb) {
    return cb(check_node(v));
  };

  module.exports = {
    known_bad_versions: known_bad_versions,
    old_versions: old_versions,
    good_versions: good_versions,
    suggest_version: suggest_version,
    suggest_versions: suggest_versions,
    check_node: check_node,
    check_node_async: check_node_async,
    is_good_version: is_good_version
  };

}).call(this);
