Socket
Book a DemoInstallSign in
Socket

@file-type/cfbf

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@file-type/cfbf

Compound File Binary Format (CFBF) detection plugin for file-type

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
215
56.93%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version Node.js CI npm downloads

@file-type/cfbf

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 detects the container itself, not the specific document content inside it.

Installation

npm install @file-type/cfbf

Usage

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

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

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

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 formats, typically used by Office 97–2003:

  • .doc Microsoft Word document
  • .xls Microsoft Excel spreadsheet
  • .ppt Microsoft PowerPoint presentation

Other files:

Licence

This project is licensed under the MIT License. Feel free to use, modify, and distribute as needed.

Keywords

cfbf

FAQs

Package last updated on 08 Jan 2026

Did you know?

Socket

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