@udecode/plate-serializer-csv
Advanced tools
Comparing version 24.4.2 to 24.5.0
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
@@ -6,2 +7,3 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -45,2 +47,10 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -63,3 +73,4 @@ | ||
var import_plate_table = require("@udecode/plate-table"); | ||
var import_papaparse = require("papaparse"); | ||
var import_papaparse = __toESM(require("papaparse")); | ||
var { parse } = import_papaparse.default; | ||
var isValidCsv = (data, errors, errorTolerance) => { | ||
@@ -82,5 +93,5 @@ if (errorTolerance < 0) | ||
); | ||
const testCsv = (0, import_papaparse.parse)(data, { preview: 2 }); | ||
const testCsv = parse(data, { preview: 2 }); | ||
if (testCsv.errors.length === 0) { | ||
const csv = (0, import_papaparse.parse)(data, __spreadValues(__spreadValues({}, pluginParseOptions), parseOptions)); | ||
const csv = parse(data, __spreadValues(__spreadValues({}, pluginParseOptions), parseOptions)); | ||
if (!isValidCsv( | ||
@@ -87,0 +98,0 @@ csv.data, |
{ | ||
"name": "@udecode/plate-serializer-csv", | ||
"version": "24.4.2", | ||
"version": "24.5.0", | ||
"description": "CSV serializer plugin for Plate", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28793
354