Socket
Socket
Sign inDemoInstall

dbf

Package Overview
Dependencies
1
Maintainers
28
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dbf

generate dbf files


Version published
Weekly downloads
7.8K
increased by6.52%
Maintainers
28
Install size
43.7 kB
Created
Weekly downloads
 

Readme

Source

dbf

Build Status


Looking for new maintainers!

This project is currently unmaintained. We'd love to turn it over to a new maintainer. If you're interested, please file an issue!


Write dBase files in pure JavaScript, in node.js or browsers. Requires ArrayBuffer and DataView support.

usage

npm install dbf

Or just in a browser:

https://unpkg.com/dbf@latest/dbf.js

Replace latest with the latest version if you want to be sure.

example

in node:

var dbf = require('../'),
    fs = require('fs');

var buf = dbf.structure([
    {foo:'bar',noo:10},
    {foo:'louie'}
]);

fs.writeFileSync('foo.dbf', toBuffer(buf.buffer));

function toBuffer(ab) {
    var buffer = new Buffer(ab.byteLength);
    var view = new Uint8Array(ab);
    for (var i = 0; i < buffer.length; ++i) {
        buffer[i] = view[i];
    }
    return buffer;
}

API

dbf.structure(array)

Given an array of objects with string or number attributes, return a DataView object referencing an ArrayBuffer that contains a full DBF file structure.

Specifications

Keywords

FAQs

Last updated on 16 May 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc