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 🙏

© 2026 – Pkg Stats / Ryan Hefner

file-type-cfbf-plus

v0.2.4

Published

Compound File Binary Format (CFBF) detection plugin(Fork of @file-type/cfbf) for file-type with Outlook MSG recognition enabled.

Readme

NPM version Node.js CI npm downloads

file-type-cfbf-plus

Fork of @file-type/cfbf, based on version 0.2.2, with Outlook .msg recognition enabled. It also corrects root CLSID offsets for CFB version 4 (4096-byte sectors).

Detector plugin for file-type that identifies files based on the Compound File Binary Format, commonly known as CFBF or OLE Compound Document.

CFBF is a container format used by many legacy Microsoft Office files and other Windows applications. This plugin identifies supported formats by the CLSID in the CFBF root directory entry. Outlook MSG recognition uses CLSID 00020d0b-0000-0000-c000-000000000046 and returns MIME type application/vnd.ms-outlook. It does not parse message bodies or attachments, or validate the complete document structure. Unknown or absent CLSIDs are not identified by this detector.

Installation

yarn add file-type-cfbf-plus
npm install file-type-cfbf-plus

Usage

The following example shows how add the CFBF detector to file-type.

import {FileTypeParser} from 'file-type';
import {detectCfbf} from 'file-type-cfbf-plus';

const parser = new FileTypeParser({customDetectors: [detectCfbf]});
const fileType = await parser.fromFile('sample.msg');
console.log(fileType);

API

supportedExtensions

A Set<string> of file extensions detectable by this plugin, without a leading dot. The TypeScript type is ReadonlySet<string>, as in file-type.

supportedMimeTypes

A Set<string> of MIME types detectable by this plugin. The TypeScript type is ReadonlySet<string>, as in file-type.

Both sets are derived from the CLSID database, with duplicate values removed. They describe the plugin's detection capabilities and do not automatically extend the supported sets exported by file-type.

import {supportedExtensions, supportedMimeTypes} from 'file-type-cfbf-plus';

console.log(supportedExtensions.has('doc')); // true
console.log(supportedExtensions.has('docx')); // false
console.log(supportedMimeTypes.has('application/vnd.ms-outlook')); // true
console.log(supportedMimeTypes.has('text/plain')); // false

For capability checks across the standard detectors and this plugin, combine the corresponding sets from both packages.

Support file formats

This detector identifies files that use the Compound File Binary Format Format container:

Microsoft Office legacy formats

These are pre-Office Open XML binary Office formats (CFBF/OLE), used by Microsoft Office prior to Office 2007:

  • .doc Microsoft Word documents (Word 6.0/95, Word 97–2003)
  • .pub Microsoft Publisher documents (Publisher 3.0/95-4.0/97, Publisher 5.0/98)
  • .ppt Microsoft PowerPoint presentations (PowerPoint 4.0, 7.0/95, 97–2003)
  • .vsd Microsoft Visio drawings (2000–2002, 2003–2010)
  • .wps Microsoft Works 7–9 Word Processor Document
  • .xls Microsoft Excel spreadsheets (Excel 5.0/95, Excel 97–2003)

Other files:

Repository automation

See GitHub Actions and Dependabot setup.

Licence

The original project is by Borewit. Original copyright and license notices are retained. This fork is licensed under the MIT License. Feel free to use, modify, and distribute as needed.