(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(["exports", "lodash/isNumber", "lodash/isNaN", "rxjs", "rxjs/operators"], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports, require("lodash/isNumber"), require("lodash/isNaN"), require("rxjs"), require("rxjs/operators"));
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports, global.isNumber, global.isNaN, global.rxjs, global.operators);
    global.throwUnlessNum = mod.exports;
  }
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _isNumber, _isNaN2, _rxjs, _operators) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.default = void 0;
  _isNumber = _interopRequireDefault(_isNumber);
  _isNaN2 = _interopRequireDefault(_isNaN2);

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  const throwUnlessNum = function throwUnlessNum() {
    return source$ => source$.pipe((0, _operators.mergeMap)(num => (0, _isNumber.default)(num) && !(0, _isNaN2.default)(num) ? (0, _rxjs.of)(num) : (0, _rxjs.throwError)(new Error(`${num} is not a Number. (Did you pass it a String or NaN?)`))));
  };

  var _default = throwUnlessNum;
  _exports.default = _default;
});
//# sourceMappingURL=throwUnlessNum.js.map