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

@entryscape/uml-extractor

v1.0.0

Published

Extracts UML models from Sparx Enterprise Architect files into plain JSON

Readme

uml-extractor

A JavaScript library and command line tool that extracts the complete UML class model – packages, classes, attributes, relations and diagrams – from Sparx Systems Enterprise Architect files (.eap, .eapx, .qea, .qeax and EA-produced XMI) into a plain, documented JSON format with stable identifiers, and compares two such outputs.

The library runs in Node and in the browser and takes the file content as a Uint8Array.

Status: all phases of the roadmap are done. Database files (.qea, .qeax, .eap, .eapx) and EA's XMI 2.1 export can be extracted, including diagrams, in Node and in the browser, and two versions of a model can be compared. See plan/ for the goal, architecture and roadmap.

Installation

npm install @entryscape/uml-extractor     # library
npm install -g @entryscape/uml-extractor  # command line tool `uml-extractor`

Requires Node 20.19 or later (or 22.12 or later on Node 22).

Usage

uml-extractor extract model.qea -o model.json
uml-extractor extract model.qea --package Core       # a package and the packages below it
uml-extractor extract model.qea --diagram Overview   # a diagram and what it shows
uml-extractor diff old.json new.qea --format text   # JSON from extract or EA files

Names may be replaced by ids; an ambiguous name is reported with the candidates. Input that cannot be read (not an EA file, a DBMS shortcut, a damaged file) ends with exit code 1 and a message. A model with 5 000 classes, 20 000 attributes, 5 000 connectors and 50 diagrams is extracted in about 2.5 s.

import { extract, toJson } from '@entryscape/uml-extractor';

const model = await extract(bytes, { fileName: 'model.qea' }); // bytes: Uint8Array
const json = toJson(model); // deterministic JSON, see schema/model.schema.json

The package is an ES module. CommonJS code can require() it directly, without a separate build, since Node 20.19 and 22.12 load ES modules that way:

const { readFileSync } = require('node:fs');
const { extract } = require('@entryscape/uml-extractor');

extract(new Uint8Array(readFileSync('model.eap'))).then((model) => {
  // …
});

The JSON Schema of the output is exported as @entryscape/uml-extractor/schema/model.schema.json.

In the browser

pnpm build writes dist/uml-extractor.browser.js with dist/sql-wasm-browser.wasm; tell extract() where the WebAssembly is:

import { extract } from './uml-extractor.browser.js';

const model = await extract(bytes, { locateFile: (file) => `/assets/${file}` });

demo/index.html (after pnpm build) reads a file chosen by the user, directly from disk without a server. To bundle the library yourself, map Node's stream and events to stream-browserify and events, and provide a global process (process/browser.js), as scripts/build.js does; mdb-reader's decryption code needs them.

Development

Requires Node 20.19 or later and pnpm.

pnpm install
pnpm test     # Jest (ES modules)
pnpm lint     # ESLint + Prettier check
pnpm format   # apply Prettier
pnpm build    # browser bundles and the demo page
pnpm update-expected   # regenerate test/fixtures/*/expected.json

License

MIT. No code is taken from the OSLO UML Transformer (MIT), but its EA extractor (oslo-extractor-uml-ea) informed the knowledge of EA's tables, columns and joins (see plan/oslo.md). Fixture 09 is OSLO's model 01-AssociatiesMijnDomein, kept with its licence in test/fixtures/09-oslo/.