MCPcopy Index your code
hub / github.com/hizzgdev/jsmind / _put_node

Method _put_node

src/jsmind.mind.js:342–350  ·  view source on GitHub ↗

* Put node into the map if id is not taken. * @param {Node} node * @returns {boolean}

(node)

Source from the content-addressed store, hash-verified

340 * @returns {boolean}
341 */
342 _put_node(node) {
343 if (node.id in this.nodes) {
344 logger.warn("the node_id '" + node.id + "' has been already exist.");
345 return false;
346 } else {
347 this.nodes[node.id] = node;
348 return true;
349 }
350 }
351 /**
352 * Re-index children by Node.compare.
353 * @param {Node} node

Callers 3

set_rootMethod · 0.95
add_nodeMethod · 0.95
jsmind.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected