private convert a JS object node into a text
544244
function convertToText (object) {
  switch (typeof object) {
    case 'string':
      return object

    case 'object':
      const attrs = toPairs(object.attrs)
        .map(([name, value]) => `${name}="${value}"`)

      const tag = [object.name].concat(attrs)
                               .join(' ')

      const children = object
        .children
        .map(child => convertToText(child))
        .join('')

      return `<${tag}>${children}</${object.name}>`
  }
  return '<' + object.name + '>'
}
650538
private String toText(AstNode node) throws IOException {
    StringBuilder out = new StringBuilder();
    if (node instanceof StringContentNode) {
      out.append(((StringContentNode)node).getContent());
    } else if (node instanceof ContentNode) {
      NodeList nodes = ((ContentNode) node).getContent();
      for (AstNode subNode : nodes) {
        out.append(toText(subNode));
      }
    }
    return out.toString();
  }
489488
function convertObjectToJSON(data) {
      const delimiter = '_'
      let result = {}
      let arrays = {}
      data.forEach(item => {
        const value = item.value
        if (value !== '') {
          if (!item.name) return
          let name = item.name
          let nameParts = name.split(delimiter)
          let currResult = result
          for (let j = 0; j < nameParts.length; j++) {
            const namePart = nameParts[j]
            let arrName
            if (namePart.indexOf('[]') > -1 && j === nameParts.length - 1) {

              arrName = namePart.substr(0, namePart.indexOf('['))
              if (!currResult[arrName]) {
                currResult[arrName] = []
              }
              currResult[arrName].push(value)
            } else {
              if (namePart.indexOf('[') > -1) {
                arrName = namePart.substr(0, namePart.indexOf('['))
                const arrIdx = namePart.replace(/^[a-z]+\[|\]$/gi, '')
                if (!arrays[arrName]) {
                  arrays[arrName] = {}
                }
                if (!currResult[arrName]) {
                  currResult[arrName] = []
                }
                if (j === nameParts.length - 1) {
                  currResult[arrName].push(value)
                } else {
                  if (!arrays[arrName][arrIdx]) {
                    currResult[arrName].push({})
                    arrays[arrName][arrIdx] = currResult[arrName][currResult[arrName].length - 1]
                  }
                }
                currResult = arrays[arrName][arrIdx]
              } else {
                if (j < nameParts.length - 1) {
                  if (!currResult[namePart]) {
                    currResult[namePart] = {}
                  }
                  currResult = currResult[namePart]
                } else {
                  currResult[namePart] = value
                }
              }
            }
          }
        }
      })
      return result
    }
739463
function(obj, node) {
        var children = node.childNodes;
        var childNode, processor, prefix, local;
        for(var i=0, len=children.length; i<len; ++i) {
            childNode = children[i];
            if(childNode.nodeType == 1) {
                prefix = this.getNamespacePrefix(childNode.namespaceURI);
                local = childNode.nodeName.split(":").pop();
                processor = this["read_" + prefix + "_" + local];
                if(processor) {
                    processor.apply(this, [obj, childNode]);
                }
            }
        }
    }
1358341
function toJSON(node) {
  node = node || this;

  var obj = {
    nodeType: node.nodeType
  };

  if (node.tagName) {
    obj.name = node.tagName.toLowerCase();
  } else if (node.nodeName) {
    obj.name = node.nodeName.toLowerCase();
  }
  if (node.nodeValue) {
    obj.nodeValue = node.nodeValue;
  }
  var attrs = node.attributes;

  if (attrs) {
    var length = attrs.length;

    obj.props = {};
    for (var i = 0; i < length; i++) {
      var attr = attrs[i];

      obj.props[attr.nodeName] = attr.nodeValue;
    }
  }
  var childNodes = node.childNodes;

  if (childNodes) {
    var _length = childNodes.length;

    obj.children = [];
    for (var _i = 0; _i < _length; _i++) {
      obj.children.push(toJSON(childNodes[_i]));
    }
  }
  return obj;
}
485676
function (obj) {
				obj = this._get_node(obj);
				if(!obj.length) { return false; }
				var s = this._get_settings().core.html_titles;
				obj = obj.children("a:eq(0)");
				if(s) {
					obj = obj.clone();
					obj.children("INS").remove();
					return obj.html();
				}
				else {
					obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
					return obj.nodeValue;
				}
			}
293946
function (node) {
    var parentTag = node.parentNode && jsxTagName(node.parentNode.tagName);
    if (parentTag === 'textarea' || parentTag === 'style') {
      // Ignore text content of textareas and styles, as it will have already been moved
      // to a "defaultValue" attribute and "dangerouslySetInnerHTML" attribute respectively.
      return;
    }

    var text = escapeSpecialChars(node.textContent);

    if (this._inPreTag) {
      // If this text is contained within a <pre>, we need to ensure the JSX
      // whitespace coalescing rules don't eat the whitespace. This means
      // wrapping newlines and sequences of two or more spaces in variables.
      text = text
        .replace(/\r/g, '')
        .replace(/( {2,}|\n|\t|\{|\})/g, function (whitespace) {
          return '{' + JSON.stringify(whitespace) + '}';
        });
    } else {
      // Handle any curly braces.
      text = text
        .replace(/(\{|\})/g, function (brace) {
          return '{\'' + brace + '\'}';
        });
      // If there's a newline in the text, adjust the indent level
      if (text.indexOf('\n') > -1) {
        text = text.replace(/\n\s*/g, this._getIndentedNewline());
      }
    }
    this.output += text;
  }
1069422
function ( obj ) {
		return obj.nodeName === "FORM" ? false : validate.test( {alphanum  : obj.value || element.text( obj )} ).pass;
	}
301275
def to_text_string(obj, encoding=None):
    """"""
    if PY2:
        # Python 2
        if encoding is None:
            return unicode(obj)
        else:
            return unicode(obj, encoding)
    else:
        # Python 3
        if encoding is None:
            return str(obj)
        elif isinstance(obj, str):
            # In case this function is not used properly, this could happen
            return obj
        else:
            return str(obj, encoding)
398666
function ( obj ) {
		return obj.nodeName === "FORM" ? false : string.isDomain( obj.value || element.text( obj ) );
	}
418091
function o2s(obj) {
    var s = "";
    for (key in obj) {
        var line = key + "->" + obj[key];
        line.replace("\n", " ");
        s += line + "\n";
    }
    return s;
}
1160437
function ( obj ) {
		return obj.nodeName === "FORM" ? false : string.isEmpty( obj.value || element.text( obj ) );
	}
622196
function renderObjFns(obj, transOpts) {
    if (!obj || _.isEmpty(obj)) { return null; }

    var renderedObj = {};
    var me = this;

    _.each(obj, function (val, name) {
        renderedObj[name] = _.isFunction(val) ?
            me.transformers.basic.transform(val, transOpts) :
            _.isObject(val) ?
                JSON.stringify(val) :
                val;
    });

    return renderedObj;
}
507116
def node_text(node):
    """"""

    if node.text:
        result = node.text
    else:
        result = ""
    for child in node:
        if child.tail is not None:
            result += child.tail
    return result
1111626
function (key, obj) {
        'use strict';
        var keysArr = key.split('.'),
            lastKeyPart = keysArr.pop(),
            len = keysArr.length,
            i, k, objNext;
        for (i = 0; i < len; i += 1) {
            k = keysArr[i];
            objNext = obj[k];
            if (!isObj(objNext)) {
                objNext = obj[k] = {};
            }
            obj = objNext;
        }
        return {
            node: obj,
            key: lastKeyPart
        };
    }
483326
function createText(value, data) {
  const node = { object: 'text', data };
  const leaves = isArray(value) ? value : [{ text: value }];
  return { ...node, leaves };
}
1186516
function ( obj ) {
		return obj.nodeName === "FORM" ? false : string.isUrl( obj.value || element.text( obj ) );
	}