Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
bpmn-moddle
Advanced tools
Read and write BPMN 2.0 diagram files in NodeJS and the browser.
bpmn-moddle uses the BPMN 2.0 meta-model to validate the input and produce correct BPMN 2.0 XML.
Get the library via npm package. Consume it in NodeJS, via UMD or bundle it using your favorite build tool.
import BpmnModdle from 'bpmn-moddle';
const moddle = new BpmnModdle();
const xmlStr =
'<?xml version="1.0" encoding="UTF-8"?>' +
'<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" ' +
'id="empty-definitions" ' +
'targetNamespace="http://bpmn.io/schema/bpmn">' +
'</bpmn2:definitions>';
const {
rootElement: definitions
} = await moddle.fromXML(xmlStr);
// update id attribute
definitions.set('id', 'NEW ID');
// add a root element
const bpmnProcess = moddle.create('bpmn:Process', { id: 'MyProcess_1' });
definitions.get('rootElements').push(bpmnProcess);
// xmlStrUpdated contains new id and the added process
const {
xml: xmlStrUpdated
} = await moddle.toXML(definitions);
The tests include XSD schema validation. They required you to have a Java SDK installed and exposed through the JAVA_HOME
variable.
# execute the test
npm test
# perform a full build
npm run all
The library is built on top of moddle and moddle-xml.
Use under the terms of the MIT license.
9.0.0
FEAT
: add exports
configuration (#111)FIX
: remove broken main
export (#111)CHORE
: drop UMD distribution (#110)CHORE
: turn into ES module (#111)CHORE
: require Node >= 18DEPS
: update to moddle@7.0.0
(#109)DEPS
: update to moddle-xml@11.0.0
(#109)FAQs
A moddle wrapper for BPMN 2.0
The npm package bpmn-moddle receives a total of 47,574 weekly downloads. As such, bpmn-moddle popularity was classified as popular.
We found that bpmn-moddle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.