"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

exports.isObject = isObject;
exports.isDevelopment = isDevelopment;
exports.toError = toError;
function isObject(obj) {
  return (typeof obj === "undefined" ? "undefined" : _typeof(obj)) === "object" && obj !== null;
}

function isDevelopment() {
  return process.env.NODE_ENV !== "production";
}

function toError(message) {
  if (isDevelopment()) {
    throw new ReferenceError(message);
  } else {
    console.error(message);
  }
}

var concat = function concat(x, y) {
  return x.concat(y);
};
var flatMap = exports.flatMap = function flatMap(xs, f) {
  return xs.map(f).reduce(concat, []);
};