- New src/constants/positions.js: POSITIONS enum (upstream/downstream/atEquipment/delta) - New src/configs/reactor.json: Full schema for CSTR/PFR reactor parameters and ASM3 initial state - New src/configs/settler.json: Schema for settler node - Export POSITIONS, POSITION_VALUES, isValidPosition from index.js Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
486 B
JavaScript
19 lines
486 B
JavaScript
/**
|
|
* Canonical position constants for parent-child relationships.
|
|
* Use these instead of hardcoded strings throughout the codebase.
|
|
*/
|
|
const POSITIONS = Object.freeze({
|
|
UPSTREAM: 'upstream',
|
|
DOWNSTREAM: 'downstream',
|
|
AT_EQUIPMENT: 'atEquipment',
|
|
DELTA: 'delta',
|
|
});
|
|
|
|
const POSITION_VALUES = Object.freeze(Object.values(POSITIONS));
|
|
|
|
function isValidPosition(pos) {
|
|
return POSITION_VALUES.includes(pos);
|
|
}
|
|
|
|
module.exports = { POSITIONS, POSITION_VALUES, isValidPosition };
|