src/IdentityDag.js
/**
    * Removes a node by applying a depth-first search
    *
    * @param   {Object}         node         tree's node that may contain the target node
    * @param   {String}         search       target node's label
    * @return  {Object}                      node                                             
    */
Removes a node by applying a depth-first search
@param   {Object}         node         tree's node that may contain the target node
@param   {String}         search       target node's label
@return  {Object}                      node
Removes a node by applying a depth - first search @param { Object } node tree ' s node that may contain the target node @param { String } search target node ' s label @return { Object } node
static removeNode(node, search) { 
        if(search === 'root') return false
        if(node.label === search) return node
        else if(node.childrens && node.childrens.length > 0) {
            for(let i = 0; i < node.childrens.length; i++){
                let result = this.removeNode(node.childrens[i], search)
                if(result && result.label === search) node.childrens.splice(i,1)
                if(result) return renewNodeHash(node)
            }
        }
        return null  
    }
static removeNode ( node , search ) { if ( search === 'root' ) return false if ( node . label === search ) return node else if ( node . childrens && node . childrens . length > 0 ) { for ( let i = 0 ; i < node . childrens . length ; i ++ ) { let result = this . removeNode ( node . childrens [ i ] , search ) if ( result && result . label === search ) node . childrens . splice ( i , 1 ) if ( result ) return renewNodeHash ( node ) } } return null }
Removes a node by applying a depth-first search
 @param   {Object}         node         tree's node that may contain the target node
 @param   {String}         search       target node's label
 @return  {Object}                      node
Removes a node by applying a depth - first search @param { Object } node tree ' s node that may contain the target node @param { String } search target node ' s label @return { Object } node