npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dbpf

v1.1.0

Published

A library for reading and writing DBPF files.

Downloads

25

Readme

DBPF.js a performant dbpf file reader written in TypeScript

This is a performant library for reading DBPF files in TypeScript/JavaScript. Currently, it only parses the header, index and index entries, but a plugin system is planned to allow for reading and handling of the actual data.

Community DBPF File Format Specification:

API Documentation:

Local Documentation:

Playground/Interactive Testing (github.io)

To see the library in action, you can visit the playground.

You can also build and run the playground locally by following the instructions in Building and Interactive Testing:

DBPF.js test environment

Usage

This library is available on npm:

npm install dbpf.js
import { DBPF } from 'dbpf';

let file: string;
// Node.js:
file = 'path/to/file.package';
// Browser:
file = input.files[0]; // where input is an <input type="file"> element

let dbpf = await DBPF.create( file );

For more advanced usage, see the API documentation.

Building and Interactive Testing

Building and testing is pretty simple. The following commands will clone the repository, install dependencies, build the library, and launch a test environment (playground) in the browser. This test environment is identical to the one hosted on github.io, just hosted locally.

git clone https://github.com/anonhostpi/DBPF.js
cd DBPF.js

# Install dependencies
npm run devinstall # wraps `npm install`

# !!! TO ADD DEPS, PLEASE USE: !!!
# npm run devinstall/devuninstall -- <npm-install-args>
# ex: npm run devinstall -- @microsoft/tsdoc --save-dev
# this helps with maintaining package.json's format

# Build the library
npm run build

# Launch test environment
npm run test
# - sets up a local static server at http://localhost:8080 and opens a browser to a test page for interactive testing

Both the build and test build will use webpack to bundle the library for the browser.

Entry Points

The entry points are as follows:

  • Built files:
    • dist/DBPF.js - The library for use in node.js
    • dist/DBPF.web.js - The library for use in the browser
    • test/serve/index.html and test/serve/test.web.js - The test environment for the browser
      • a copy of DBPF.web.js is also copied to test/serve and is automatically loaded by the test environment
  • Source files:
    • src/DBPF.ts - The main library
    • src/test.web.ts - The script used by the interactive test environment

Building the Docs Locally

To get the full set of docs locally, run either:

  • npm run docs: to build the typedoc documentation (./wiki)
  • npm run test:pub: to build the typedoc documentation and run docusaurus:serve (view the docs from your browser).
    • also runs some minor cleanup work before building with docusaurus

The full set of docs does not need to be built locally to be used or read.

  • The typedocs are sourced from the comments in the ./src files
  • The project docs are sourced from ./docs.

There are no other documentation sources in this repo other than this README and the LICENSE.