code: function setPathSet(
      value, path, depth, root, parent, node,
      requestedPaths, optimizedPaths, requestedPath, optimizedPath,
      version, expired, lru, comparator, errorSelector, replacedPaths) {
  
      var note = {};
      var branch = depth < path.length - 1;
      var keySet = path[depth];
      var key = iterateKeySet(keySet, note);
      var optimizedIndex = optimizedPath.index;
  
      do {
  
          requestedPath.depth = depth;
  
          var results = setNode(
              root, parent, node, key, value,
              branch, false, requestedPath, optimizedPath,
              version, expired, lru, comparator, errorSelector, replacedPaths
          );
          requestedPath[depth] = key;
          requestedPath.index = depth;
          optimizedPath[optimizedPath.index++] = key;
          var nextNode = results[0];
          var nextParent = results[1];
          if (nextNode) {
              if (branch) {
                  setPathSet(
                      value, path, depth + 1,
                      root, nextParent, nextNode,
                      requestedPaths, optimizedPaths, requestedPath, optimizedPath,
                      version, expired, lru, comparator, errorSelector
                  );
              } else {
                  requestedPaths.push(requestedPath.slice(0, requestedPath.index + 1));
                  optimizedPaths.push(optimizedPath.slice(0, optimizedPath.index));
              }
          }
          key = iterateKeySet(keySet, note);
          if (note.done) {
              break;
          }
          optimizedPath.index = optimizedIndex;
      } while (true);
  }
docs: /* eslint-disable no-constant-condition