src/utils.js
function(term) {
    try {
        if(term == null) {
            return "";
        } if(term.token==='uri') {
            return "u"+term.value;
        } else if(term.token === 'blank') {
            return "b"+term.value;
        } else if(term.token === 'literal') {
            var l = "l"+term.value;
            l = l + (term.type || "");
            l = l + (term.lang || "");

            return l;
        }
    } catch(e) {
        if(typeof(term) === 'object') {
            var key = "";
            for(p in term) {
                key = key + p + term[p];
            }

            return key;
        }
        return term;
    }
}
function(term) {
    try {
        if(term == null) {
            return "";
        } if(term.token==='uri') {
            return "u"+term.value;
        } else if(term.token === 'blank') {
            return "b"+term.value;
        } else if(term.token === 'literal') {
            var l = "l"+term.value;
            l = l + (term.type || "");
            l = l + (term.lang || "");

            return l;
        }
    } catch(e) {
        if(typeof(term) === 'object') {
            var key = "";
            for(p in term) {
                key = key + p + term[p];
            }

            return key;
        }
        return term;
    }
}
function ( term ) { try { if ( term == null ) { return "" ; } if ( term . token === 'uri' ) { return "u" + term . value ; } else if ( term . token === 'blank' ) { return "b" + term . value ; } else if ( term . token === 'literal' ) { var l = "l" + term . value ; l = l + ( term . type || "" ) ; l = l + ( term . lang || "" ) ; return l ; } } catch ( e ) { if ( typeof ( term ) === 'object' ) { var key = "" ; for ( p in term ) { key = key + p + term [ p ] ; } return key ; } return term ; } }
Function that generates a hash key for a bound term.
@param term
@returns {*}
Function that generates a hash key for a bound term .