Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sean_kenny/eu4-text-file-to-json-parser-js

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sean_kenny/eu4-text-file-to-json-parser-js - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

15

build/parse-eu4-text-file-to-json.js

@@ -23,8 +23,9 @@ import { readFile } from "fs/promises";

.slice(1, -1)
.trim()
.split(' ');
currentKeyToPushTo = `${currentKeyToPushTo}${currentKeyToPushTo.length > 0 ? '.' : ''}${propertyName}`;
.split("\"")
.flatMap((element, index) => index % 2 === 0 ? element.split(" ") : [element])
.map((element) => element.trim())
.filter((element) => element !== '');
outputJSONData = writeValueToOutputJSONData({
outputJSONData,
currentKeyToPushTo,
currentKeyToPushTo: `${currentKeyToPushTo}${currentKeyToPushTo.length > 0 ? '.' : ''}${propertyName}`,
valueToPush: elements

@@ -68,4 +69,6 @@ });

const arrayValues = cleanedRow
.split(' ')
.map((element) => element.trim());
.split("\"")
.flatMap((element, index) => index % 2 === 0 ? element.split(" ") : [element])
.map((element) => element.trim())
.filter((element) => element !== '');
outputJSONData = writeValueToOutputJSONData({

@@ -72,0 +75,0 @@ outputJSONData,

2

package.json
{
"name": "@sean_kenny/eu4-text-file-to-json-parser-js",
"version": "0.1.1",
"version": "0.1.2",
"description": "A library for reading text files in the format EU4 encodes it's game data in.",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc