UNPKG

workflow-4-node

Version:

Workflow 4 Node is a .NET Workflow Foundation like framework for Node.js. The goal is to reach feature equivalence and beyond.

47 lines (41 loc) 1.26 kB
"use strict"; let _ = require("lodash"); const maxLen = "collectingCompletedBookmark".length; const identity = "-:\|$WF4N$|/:-"; function make(name) { let inner = _.snakeCase(name).toUpperCase(); if (inner.length > maxLen) { inner = inner.substr(0, maxLen); } else while (inner.length < maxLen) { inner += "_"; } return identity + inner; } let constants = { identity: identity, markers: { valueCollectedBookmark: make("mValueCollectedBookmark"), collectingCompletedBookmark: make("mCollectingCompletedBookmark"), beginMethodBookmark: make("mBeginMethodBookmark"), activityProperty: make("mActivityProperty"), activityInstance: make("mActivityInstance"), keySeparator: make("mKeySeparator"), nope: make("mNope"), delayToMethodNamePrefix: make("mDelayToMethodNamePrefix"), $parent: make("mParent") }, ids: { initialScope: make("mInitialScope") }, types: { error: make("mError"), schedulingState: make("mSchedulingState"), date: make("mDate"), set: make("mSet"), map: make("mMap"), rex: make("mRex"), object: make("mObject") } }; module.exports = constants;