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

dbffile

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbffile - npm Package Compare versions

Comparing version 1.9.0 to 1.9.1

23

dist/dbf-file.js

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

while (this._recordsRead !== this.recordCount) {
yield* await this.readRecords(1000);
yield* await this.readRecords(100);
}

@@ -363,2 +363,3 @@ }

value = '';
let mergedBuffer = Buffer.from([]);
// Read the memo data from the memo file. We use a while loop here to read one block-sized

@@ -383,5 +384,7 @@ // chunk at a time, since memo values can be larger than the block size.

let eos = memoBuf.indexOf('\x1A');
value += iconv.decode(memoBuf.slice(0, eos === -1 ? memoBlockSize : eos), encoding);
if (eos !== -1)
mergedBuffer = Buffer.concat([mergedBuffer, memoBuf.slice(0, eos === -1 ? memoBlockSize : eos)]);
if (eos !== -1) {
value = iconv.decode(mergedBuffer, encoding);
break; // break out of the loop once we've found the terminator.
}
}

@@ -401,6 +404,8 @@ // Handle first/next block of dBase IV memo data.

let take = Math.min(len, memoBlockSize - skip);
value += iconv.decode(memoBuf.slice(skip, skip + take), encoding);
mergedBuffer = Buffer.concat([mergedBuffer, memoBuf.slice(skip, skip + take)]);
len -= take;
if (len === 0)
if (len === 0) {
value = iconv.decode(mergedBuffer, encoding);
break;
}
}

@@ -419,3 +424,3 @@ // Handle first/next block of FoxPro9 memo data.

let skip = 0;
if (value === '') {
if (!mergedBuffer.length) {
const memoType = memoBuf.readInt32BE(0);

@@ -429,6 +434,8 @@ if (memoType != 1)

let take = Math.min(len, memoBlockSize - skip);
value += iconv.decode(memoBuf.slice(skip, skip + take), encoding);
mergedBuffer = Buffer.concat([mergedBuffer, memoBuf.slice(skip, skip + take)]);
len -= take;
if (len === 0)
if (len === 0) {
value = iconv.decode(mergedBuffer, encoding);
break;
}
}

@@ -435,0 +442,0 @@ else {

{
"name": "dbffile",
"version": "1.9.0",
"version": "1.9.1",
"description": "Read and write .dbf (dBase III & Visual FoxPro) files in Node.js",

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

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