@json2csv/whatwg
Advanced tools
@@ -20,2 +20,6 @@ var __create = Object.create; | ||
| 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, | ||
@@ -38,2 +42,8 @@ mod | ||
| } | ||
| /** | ||
| * Main function that converts json to csv. | ||
| * | ||
| * @param {Stream|Array|Object} data Array of JSON objects to be converted to CSV | ||
| * @returns {Stream} A stream producing the CSV formated data as a string | ||
| */ | ||
| parse(data) { | ||
@@ -78,3 +88,1 @@ if (typeof data === "string" || ArrayBuffer.isView(data)) { | ||
| } | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = {}); |
@@ -20,2 +20,6 @@ var __create = Object.create; | ||
| 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, | ||
@@ -27,9 +31,12 @@ mod | ||
| __export(src_exports, { | ||
| AsyncParser: () => import_AsyncParser.default, | ||
| TransformStream: () => import_TransformStream.default | ||
| }); | ||
| module.exports = __toCommonJS(src_exports); | ||
| var import_AsyncParser = __toESM(require("./AsyncParser.js")); | ||
| var import_TransformStream = __toESM(require("./TransformStream.js")); | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = { | ||
| AsyncParser, | ||
| TransformStream | ||
| }); |
@@ -76,3 +76,1 @@ var __defProp = Object.defineProperty; | ||
| } | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = {}); |
+3
-3
| { | ||
| "name": "@json2csv/whatwg", | ||
| "version": "6.1.2", | ||
| "version": "6.1.3", | ||
| "description": "WHATWG Transform and Async interface to convert JSON into CSV.", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
| "test:raw": "node test", | ||
| "deprendencies:update-internal": "npm uninstall @json2csv/plainjs && npm install @json2csv/plainjs", | ||
| "dependencies:update-internal": "npm uninstall @json2csv/plainjs && npm install @json2csv/plainjs", | ||
| "build:cjs": "node ../../build-cjs.js whatwg", | ||
@@ -49,4 +49,4 @@ "prepublishOnly": "npm run build:cjs" | ||
| "dependencies": { | ||
| "@json2csv/plainjs": "^6.1.2" | ||
| "@json2csv/plainjs": "^6.1.3" | ||
| } | ||
| } |
+1
-0
@@ -0,1 +1,2 @@ | ||
| export { default as AsyncParser } from './AsyncParser.js'; | ||
| export { default as TransformStream } from './TransformStream.js'; |
27455
3%311
4.71%Updated