lib/record-patch-builder.js
function addInvolvedProperty(pathPtr, involvedPropPaths, updatedPropPaths) {

	if (updatedPropPaths) {
		const propPathParts = pathPtr.propPath.split('.');
		let propPath = '';
		for (let i = 0, len = propPathParts.length - 1; i < len; i++) {
			if (propPath.length > 0)
				propPath += '.';
			propPath += propPathParts[i];
			updatedPropPaths.add(propPath);
		}
	}

	const propDesc = pathPtr.propDesc;
	if (propDesc.scalarValueType === 'object') {
		addInvolvedObjectProperty(propDesc, involvedPropPaths, updatedPropPaths);
	} else {
		involvedPropPaths.add(pathPtr.propPath);
		if (updatedPropPaths)
			updatedPropPaths.add(pathPtr.propPath);
	}

	return pathPtr;
}
function addInvolvedProperty(pathPtr, involvedPropPaths, updatedPropPaths) {

	if (updatedPropPaths) {
		const propPathParts = pathPtr.propPath.split('.');
		let propPath = '';
		for (let i = 0, len = propPathParts.length - 1; i < len; i++) {
			if (propPath.length > 0)
				propPath += '.';
			propPath += propPathParts[i];
			updatedPropPaths.add(propPath);
		}
	}

	const propDesc = pathPtr.propDesc;
	if (propDesc.scalarValueType === 'object') {
		addInvolvedObjectProperty(propDesc, involvedPropPaths, updatedPropPaths);
	} else {
		involvedPropPaths.add(pathPtr.propPath);
		if (updatedPropPaths)
			updatedPropPaths.add(pathPtr.propPath);
	}

	return pathPtr;
}
function addInvolvedProperty ( pathPtr , involvedPropPaths , updatedPropPaths ) { if ( updatedPropPaths ) { const propPathParts = pathPtr . propPath . split ( '.' ) ; let propPath = '' ; for ( let i = 0 , len = propPathParts . length - 1 ; i < len ; i ++ ) { if ( propPath . length > 0 ) propPath += '.' ; propPath += propPathParts [ i ] ; updatedPropPaths . add ( propPath ) ; } } const propDesc = pathPtr . propDesc ; if ( propDesc . scalarValueType === 'object' ) { addInvolvedObjectProperty ( propDesc , involvedPropPaths , updatedPropPaths ) ; } else { involvedPropPaths . add ( pathPtr . propPath ) ; if ( updatedPropPaths ) updatedPropPaths . add ( pathPtr . propPath ) ; } return pathPtr ; }
Add property to the involved property paths collection.

@private
@param {module:x2node-pointers~RecordElementPointer} pathPtr Resolved property
pointer.
@param {Set.<string>} involvedPropPaths Involved property paths collection.
@param {Set.<string>} [updatedPropPaths] Updated property paths collection if
the involved property is to be updated by the patch.
@returns {module:x2node-pointers~RecordElementPointer} The pointer passed in
as <code>pathPtr</code>.
Add property to the involved property paths collection .