src/html-marker.js
/* this function will execute a function to object values with a deep nest */
this function will execute a function to object values with a deep nest
this function will execute a function to object values with a deep nest
mapRecursive(obj, func) {
    if ((typeof obj !== 'object' && !Array.isArray(obj)) || !obj) {
      return func(obj)
    }
    const accObj = Array.isArray(obj) ? [] : {}
    const arrObj = Array.isArray(obj) ? [...obj.entries()] : Object.entries(obj)
    return arrObj.reduce((acc, [key, value]) => {
      acc[key] = this.mapRecursive(value, func)
      return acc
    }, accObj)
  }
mapRecursive ( obj , func ) { if ( ( typeof obj !== 'object' && ! Array . isArray ( obj ) ) || ! obj ) { return func ( obj ) } const accObj = Array . isArray ( obj ) ? [ ] : { } const arrObj = Array . isArray ( obj ) ? [ ... obj . entries ( ) ] : Object . entries ( obj ) return arrObj . reduce ( ( acc , [ key , value ] ) => { acc [ key ] = this . mapRecursive ( value , func ) return acc } , accObj ) }
this function will execute a function to object values with a deep nest
this function will execute a function to object values with a deep nest