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

nodeset-js

v0.1.0

Published

Graphical modeler for OPC UA information models: types and instances in the notation of OPC 10000-3 Annex C, stored as NodeSet2.

Readme

NodeSet.js

A graphical modeler for OPC UA information models. Types and instances are drawn in the notation of OPC 10000-3 Annex C and stored as NodeSet2 files, with nothing in between: the file it opens and the file it writes are the NodeSets every other OPC UA tool reads. It runs in the browser on its own, and it embeds: the AutomationML Editor plugin AMLOpcUa hosts it and connects the models to AutomationML (OPC 10000-83 Annex A, AML-UA-XSLT rules) and to VDI 3682 process descriptions.

What it does: types (ObjectTypes, VariableTypes, DataTypes with fields, encodings, enumeration values, OptionSets and unions, ReferenceTypes), instance declarations with ModellingRules, values (built-in types and simple structures), method arguments, references, instances by ModellingRule, models built on DI or other loaded models with their RequiredModels kept, checks against OPC 10000-3, undo, editing from the canvas's context pad, and diagram positions kept in the NodeSet. Inside the AutomationML Editor it runs in the Modeler tab of AMLOpcUa, which opens a namespace of the document and imports the result back (AMLOpcUa docs/modeler.md).

Status: in development, see docs/plan.md. Lessons that apply to FPB.js are collected in docs/lessons-for-fpbjs.md.

npm install
npm run dev        # http://localhost:3002
npm test
npm run typecheck

Third-party content

assets/nodesets/ holds the OPC UA base NodeSet (1.05.07) and the OPC UA for Devices NodeSet (1.05.0) from UA-Nodeset, OPC Foundation MIT License 1.00.

License

MIT

As a library

npm run build       # dist/web (the app) and dist/lib (the library)
import { readNodeSet, writeNodeSet, Workspace, NodeSetModeler, App } from 'nodeset-js';

const ws = new Workspace();
await ws.open(xml);                         // loads the required UA and DI models
const pump = ws.editor!.addType('ObjectType', 'PumpType');
ws.editor!.addDeclaration(pump, 'Variable', 'Speed');
const nodeSet = ws.save();                  // NodeSet2 XML

App is the complete modeler as a React component; NodeSetModeler is the canvas alone. React 18 is a peer dependency.

For a script, in a page or in Node, there is a second entry without the canvas and without React:

const { Workspace, check } = require('nodeset-js/core');

const ws = new Workspace();
await ws.create('http://example.org/Pump/');            // brings the base model with it
const type = ws.editor.addStateMachineType('PumpStateMachineType');
const idle = ws.editor.addState(type, 'Idle', 1);
const running = ws.editor.addState(type, 'Running', 2);
ws.editor.addTransition(type, 'IdleToRunning', 1, idle, running);
console.log(check(ws.space, ws.editable));              // the rules on the model
require('fs').writeFileSync('Pump.NodeSet2.xml', ws.save());

The base NodeSet and DI are inside that build, so a script needs nothing else. npm run verify:core checks that it still runs outside a browser.