src/domain/generalMetadata.js
/**
 * Convert a `Map` into a simple object.
 * 
 * The keys are assumed to be strings. Values that are themselves `Map` instances
 * will be converted to simple objects as well.
 * 
 * @param {Map<string, *>} strMap a Map with string keys; nested Map objects are also handled
 * @returns {object} a simple object
 * @see {@link objectToStringMap} for the reverse conversion
 * @alias module:domain~stringMapToObject
 */
Convert a `Map` into a simple object.

The keys are assumed to be strings. Values that are themselves `Map` instances
will be converted to simple objects as well.

@param {Map} strMap a Map with string keys; nested Map objects are also handled
@returns {object} a simple object
@see  objectToStringMap for the reverse conversion
@alias module:domain~stringMapToObject
Convert a ` Map ` into a simple object . The keys are assumed to be strings . Values that are themselves ` Map ` instances will be converted to simple objects as well . @param { Map } strMap a Map with string keys ; nested Map objects are also handled @returns { object } a simple object @see objectToStringMap for the reverse conversion @alias module : domain~stringMapToObject
function stringMapToObject(strMap) {
    const obj = Object.create(null);
    if ( strMap ) {
        for (const [k,v] of strMap) {
            obj[k] = (v instanceof Map ? stringMapToObject(v) : v);
        }
    }
    return obj;
}
function stringMapToObject ( strMap ) { const obj = Object . create ( null ) ; if ( strMap ) { for ( const [ k , v ] of strMap ) { obj [ k ] = ( v instanceof Map ? stringMapToObject ( v ) : v ) ; } } return obj ; }
Convert a `Map` into a simple object.
Convert a ` Map ` into a simple object .