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.0.0 to 1.1.0

4

dist/dbf-file.js

@@ -231,2 +231,3 @@ "use strict";

case 'N': // Number
case 'F': // Float - appears to be treated identically to Number
while (len > 0 && buffer[offset] === 0x20)

@@ -307,2 +308,3 @@ ++offset, --len;

case 'N': // Number
case 'F': // Float - appears to be treated identically to Number
value = value.toString();

@@ -374,3 +376,3 @@ value = value.slice(0, field.size);

}
else if (type === 'N') {
else if (type === 'N' || type === 'F' || type === 'I') {
if (typeof value !== 'number')

@@ -377,0 +379,0 @@ throw new Error('Expected a number');

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

throw new Error('Type must be a single character');
if (['C', 'N', 'L', 'D', 'I'].indexOf(type) === -1)
if (['C', 'N', 'F', 'L', 'D', 'I'].indexOf(type) === -1)
throw new Error(`Type '${type}' is not supported`);

@@ -27,2 +27,4 @@ // size

throw new Error('Field size is too large (maximum is 20)');
if (type === 'F' && size > 20)
throw new Error('Field size is too large (maximum is 20)');
if (type === 'L' && size !== 1)

@@ -29,0 +31,0 @@ throw new Error('Invalid field size (must be 1)');

{
"name": "dbffile",
"version": "1.0.0",
"version": "1.1.0",
"description": "Read and write .dbf (dBase III) files in Node.js",

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

@@ -7,3 +7,3 @@ # DBFFile

- Supports `C` (string) , `N` (numeric) , `I` (integer) , `L` (logical) and `D` (date) field types
- Supports `C` (string) , `N` (numeric), `F` (float), `I` (integer) , `L` (logical) and `D` (date) field types
- Can open an existing .dbf file

@@ -10,0 +10,0 @@ - Can access all field descriptors

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