
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A Node.js/Typescript module to read tabular data from the dBase DB (.dbf) file.
npm install dbf-reader --save
yarn add dbf-reader
bower install dbf-reader --save
import { Dbf } from 'dbf-reader';
import { DataTable } from 'dbf-reader/models/dbf-file';
import * as fs from "fs";
let buffer:Buffer=fs.readFileSync('/Workspace/tests/sampleFiles/sample.dbf')
let datatable:DataTable = Dbf.read(buffer);
if (datatable) {
datatable.rows.forEach((row: any) => {
datatable.columns.forEach((col: Column) => {
console.log(row[col.name]);
});
});
}
Output should be an instance of DataTable class
<input type="file" id="avatar" (change)="onFileChange($event)" #fileInput>
import { Dbf } from 'dbf-reader';
import { DataTable } from 'dbf-reader/models/dbf-file';
import * as fs from "fs";
onFileChange(event) {
let reader = new FileReader();
if (event.target.files && event.target.files.length > 0) {
let file = event.target.files[0];
reader.readAsArrayBuffer(file);
reader.onload = () => {
var arrayBuffer: ArrayBuffer = reader.result as ArrayBuffer;
if (arrayBuffer) {
let buffer: any = Buffer.from(arrayBuffer);
let datatable:DataTable = Dbf.read(buffer);
}
};
}
}
Output should be an instance of DataTable class
var dbf = require('dbf-reader');
var fs = require('fs');
var buffer:Buffer=fs.readFileSync('/Workspace/tests/sampleShpFiles/sample2-line.shp')
var datatable = dbf.read(buffer);
if (datatable) {
datatable.rows.forEach((row) => {
datatable.columns.forEach((col) => {
console.log(row[col.name]);
});
});
}
<input type="file" id="avatar" (change)="onFileChange($event)" #fileInput>
var dbf = require('dbf-reader');
function onFileChange(event) {
var reader = new FileReader();
if (event.target.files && event.target.files.length > 0) {
var file = event.target.files[0];
reader.readAsArrayBuffer(file);
reader.onload = () => {
var arrayBuffer: ArrayBuffer = reader.result as ArrayBuffer;
if (arrayBuffer) {
var buffer: any = Buffer.from(arrayBuffer);
var datatable = dbf.read(buffer);
}
};
}
}
Output should be an instance of DataTable class
define(function(require,exports,module){
var parser = require('dbf-reader');
});
Clipper/dBase III
dBase IV
dBase IV Windows
Foxpro 2.x
Visual Foxpro
Character: Supported
Character (binary): Supported
Currency: Supported
Date: Supported
Datetime: Supported
Double: Supported
Float: Supported
General: Supported
Integer: Supported
Integer (AutoIncre): Supported
Logical: Supported
Numeric: Supported
Varchar: Supported
Varchar (binary): Supported
Memo: Not Supported
Memo (binary): Not Supported
Varbinary: Not Supported
Blob: Not Supported
Not Supported
Not Supported
You can directly send any bug/issue or suggestion to my personal email id: shubhgupta4u@gmail.com.
FAQs
A Node.js/Typescript module to read tabular data from the dBase DB (.dbf) file.
We found that dbf-reader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.