UNPKG

@algonomia/convert-array-to-csv

Version:
16 lines (12 loc) 796 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkIfValid = void 0; function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _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;