dist/decorators.js
function denodeify(fn) {
    var length = fn.length > 0 ? fn.length - 1 : 0;
    var f = function f() {
      var _this4 = this;

      for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
        args[_key8] = arguments[_key8];
      }

      return new Promise(function (resolve, reject) {
        fn.apply(_this4, [].concat(args, [function (err) {
          for (var _len9 = arguments.length, rest = Array(_len9 > 1 ? _len9 - 1 : 0), _key9 = 1; _key9 < _len9; _key9++) {
            rest[_key9 - 1] = arguments[_key9];
          }

          if (err) {
            reject(err);
          }
          var result = void 0;
          switch (rest.length) {
            case 0:
              result = true;
              break;
            case 1:
              result = rest[0];
              break;
            default:
              result = rest;
              break;
          }
          resolve(result);
        }]));
      });
    };

    return length ? curry(length, f) : f;
  }
function denodeify(fn) {
    var length = fn.length > 0 ? fn.length - 1 : 0;
    var f = function f() {
      var _this4 = this;

      for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
        args[_key8] = arguments[_key8];
      }

      return new Promise(function (resolve, reject) {
        fn.apply(_this4, [].concat(args, [function (err) {
          for (var _len9 = arguments.length, rest = Array(_len9 > 1 ? _len9 - 1 : 0), _key9 = 1; _key9 < _len9; _key9++) {
            rest[_key9 - 1] = arguments[_key9];
          }

          if (err) {
            reject(err);
          }
          var result = void 0;
          switch (rest.length) {
            case 0:
              result = true;
              break;
            case 1:
              result = rest[0];
              break;
            default:
              result = rest;
              break;
          }
          resolve(result);
        }]));
      });
    };

    return length ? curry(length, f) : f;
  }
denodeify :: (* -> *) -> (* -> Promise *) Turns a callback-accepting function into one that returns a Promise.