UNPKG

convert-array-to-csv

Version:
16 lines (12 loc) 838 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkIfValid = void 0; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var checkIfValid = function checkIfValid(data) { if (!Array.isArray(data)) { throw new Error("data has to be typeof: ".concat(_typeof([]), " and instanceof Array: ").concat([] instanceof Array, " but got typeof: ").concat(_typeof(data), " and instanceof Array: ").concat(data instanceof Array)); } }; exports.checkIfValid = checkIfValid;