Socket
Socket
Sign inDemoInstall

nested_json_to_csv

Package Overview
Dependencies
66
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2-b

1

build/interfaces/IParser.d.ts
export interface IParser {
parse(...args: any): any;
get(): any;
}

@@ -4,0 +5,0 @@ export declare type ParserOptions = {

@@ -7,2 +7,3 @@ import { IParser } from "../../interfaces/IParser";

parse(): any;
get(): Csv;
}

@@ -28,2 +28,5 @@ "use strict";

}
get() {
return __classPrivateFieldGet(this, _CsvParserService_csv, "f");
}
}

@@ -30,0 +33,0 @@ exports.CsvParserService = CsvParserService;

2

build/providers/services/JsonParserService.d.ts

@@ -7,3 +7,3 @@ import { IParser, ParserOptions } from "../../interfaces/IParser";

parse(headers: string[]): Csv;
getData(): Map<any, any>;
get(): Map<any, any>;
}

@@ -43,3 +43,3 @@ "use strict";

}
getData() {
get() {
return __classPrivateFieldGet(this, _JsonParserService_data, "f");

@@ -46,0 +46,0 @@ }

export interface IParser {
parse(...args: any): any;
get(): any;
}

@@ -8,2 +9,2 @@

hasId?: boolean;
};
};
{
"name": "nested_json_to_csv",
"version": "2.0.1",
"version": "2.0.2b",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/src/index.js",

@@ -6,3 +6,3 @@ import { IParser } from "../../interfaces/IParser";

#csv: Csv;
constructor(csv: Csv) {

@@ -17,2 +17,5 @@ this.#csv = csv;

}
get() {
return this.#csv;
}
#mapToJson(mp: Map<any, any>, json: any): any {

@@ -38,6 +41,4 @@ Array.from(mp.entries()).forEach(([key, value]) => {

});
if(rows.length > 1)
mp.set(row[0], tempMp);
else
mp = new Map<any,any>(tempMp.entries());
if (rows.length > 1) mp.set(row[0], tempMp);
else mp = new Map<any, any>(tempMp.entries());
});

@@ -44,0 +45,0 @@ return mp;

@@ -42,3 +42,3 @@ import { isBooleanObject, isNumberObject, isStringObject } from "util/types";

}
getData() {
get() {
return this.#data;

@@ -45,0 +45,0 @@ }

@@ -15,3 +15,3 @@ import { IFactory } from "../interfaces/IFactory";

const json = parser.parse();
const eJson = {

@@ -31,3 +31,3 @@ name: "fox",

const json = parser.parse();
const eJson = {

@@ -47,3 +47,3 @@ "31245323": { name: "fox", id: "31245323" },

const json = parser.parse();
const eJson = {

@@ -50,0 +50,0 @@ user: {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc