UNPKG

@scion-scxml/scxml

Version:

An implementation of SCXML in JavaScript.

19 lines (15 loc) 505 B
const registry = {}; function registerCustomActionTags(namespaceToTagNameMap){ //TODO: integrate sandboxObject //merge him into the global registry Object.keys(namespaceToTagNameMap).forEach( (namespace) => { const tags = registry[namespace] = registry[namespace] || {}; Object.keys(namespaceToTagNameMap[namespace]).forEach( (tagName) => { tags[tagName] = namespaceToTagNameMap[namespace][tagName]; }); }); } module.exports = { registerCustomActionTags, registry };