# @parametricos/bcf-js

> BCF.js is a BIM Collaboration Format (BCF) reader & parser.

Latest version **0.3.2** (published 2025-09-08) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install @parametricos/bcf-js
pnpm add @parametricos/bcf-js
yarn add @parametricos/bcf-js
bun add @parametricos/bcf-js
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2025-09-08 |
| First published | 2021-05-24 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 141.1 KB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 34 |
| Author | Harry Collin |
| Maintainers | messiosmarios, harrycollin |
| Keywords | bim, ifc, bcf, parser, loader, reader, writer |

## Links

- npm: https://www.npmjs.com/package/@parametricos/bcf-js
- Repository: https://github.com/Parametricos/BCF.js
- Homepage: https://github.com/Parametricos/BCF.js#readme
- Issues: https://github.com/Parametricos/BCF.js/issues
- npm.io page: https://npm.io/package/@parametricos/bcf-js

## Dependencies (2)

- [fflate](https://npm.io/package/fflate.md) ^0.8.2
- [fast-xml-parser](https://npm.io/package/fast-xml-parser.md) 4.2.7

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.3.2 (latest) — 2025-09-08
- 0.2.6 — 2023-09-14
- 0.2.5 — 2023-09-14
- 0.2.3 — 2023-09-13
- 0.2.2 — 2023-09-13
- 0.1.3 — 2021-05-26
- 0.1.2 — 2021-05-25
- 0.1.1 — 2021-05-25
- 0.1.0 — 2021-05-24
- 0.0.23 — 2021-05-24
- 0.0.22 — 2021-05-24

## README

# BCF-js

Bcf-js is a [BIM Collaboration Format](https://technical.buildingsmart.org/standards/bcf/ "BIM Collaboration Format") (BCF) reader & parser.

This fork was made to read and write both BCF 2.1 and 3.0 versions.

Find it on npmjs.com https://www.npmjs.com/package/@parametricos/bcf-js

## Getting Started
To install the library use:
`npm install @parametricos/bcf-js` or `yarn add @parametricos/bcf-js`

## Using the library

For BCF-XML 3.0:
``` javascript
import { BcfReader, BcfWriter } from '@parametricos/bcf-js';
```
For BCF-XML 2.1:
``` javascript
import { BcfReader, BcfWriter } from '@parametricos/bcf-js/2.1';
```

### Reading a file:

``` javascript
  const file = "some_bcf_file.bcf"

  const reader = new BcfReader();
  
  await reader.read(file);

  const project = reader.project
  
  project.markups.forEach((markup) => {
    console.log(markup.topic);
  })

  // See ./test/BasicReadExample.js for more examples
```

### Writing a project:

``` typescript
  const bcfProject: IProject = {
    ...
  }
  
  const savePath = "./test-data/bcf3.0/Writer/WriteTest.bcf"

  const writer = new BcfWriter();
  
  const content = await writer.write(bcfproject)
  fs.writeFile(savePath, content, (err) => {})

  // See ./test/BasicWriteExample.js for more examples
```

## Contribution
There's a few ways to contribute to this project and improve it:
1. Fork the project repository and make your first pull request
2. Submit sample BCF and it's linked IFC files in the 'test' folder
3. Test it and create Issues so that we can start working on them

## License
BCF-js is licensed under the [Mozilla Public License 2.0](https://github.com/Parametricos/bcf-js/blob/6110f8ec70f86dbe1b3644441e5ca8935843d233/LICENSE "Mozilla Public License 2.0"). Please read the LICENSE file in this repository for more details.

---
_Source: https://npm.io/package/@parametricos/bcf-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
