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

@twec/ip-parser

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twec/ip-parser - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

27

lib/ip-parser.js

@@ -32,3 +32,3 @@ const etl = require('etl');

async function parseFile(filename) {
function parseFileAsStream(filename) {
let currentContainer = null;

@@ -39,3 +39,3 @@ let currentOrder = null;

const containers = await etl
const containers = etl
.file(filename)

@@ -67,5 +67,7 @@ .pipe(etl.split())

if (parsed) {
const isSameShipGroup = currentOrder.shipGroupPackageNumber
=== parsed.shipGroupPackageNumber;
const hasAllLines = parsed.numberOfOrderDetailRecords === currentOrder.lines.length;
const isSameShipGroup =
currentOrder.shipGroupPackageNumber ===
parsed.shipGroupPackageNumber;
const hasAllLines =
parsed.numberOfOrderDetailRecords === currentOrder.lines.length;
if (isSameShipGroup && hasAllLines) {

@@ -84,4 +86,4 @@ currentContainer.orders.push(currentOrder);

if (
parsed.numberOfOrderHeaderRecords
=== currentContainer.orders.length
parsed.numberOfOrderHeaderRecords ===
currentContainer.orders.length
) {

@@ -98,4 +100,3 @@ this.push(currentContainer);

}),
)
.promise();
);

@@ -105,5 +106,13 @@ return containers;

/**
*
*/
async function parseFile(filename) {
return parseFileAsStream(filename).promise();
}
module.exports = {
parse,
parseFile,
parseFileAsStream,
};
{
"name": "@twec/ip-parser",
"version": "1.0.0",
"version": "1.1.0",
"description": "Parser for Island Pacific orders",

@@ -32,3 +32,3 @@ "keywords": [

},
"gitHead": "1a656cfe50443ac63f46ecc2067003f22b1f2079",
"gitHead": "2ba73532a79c1b7f6c34d9e0fb17be952090479e",
"publishConfig": {

@@ -35,0 +35,0 @@ "access": "public"

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