dist/@ajsf/core/esm2015/lib/shared/jsonpointer.functions.js
/**
     * 'toGenericPointer' function
     *
     * Compares an indexed pointer to an array map and removes list array
     * indexes (but leaves tuple arrray indexes and all object keys, including
     * numeric keys) to create a generic pointer.
     *
     * For example, using the indexed pointer '/foo/1/bar/2/baz/3' and
     * the arrayMap [['/foo', 0], ['/foo/-/bar', 3], ['/foo/-/bar/-/baz', 0]]
     * would result in the generic pointer '/foo/-/bar/2/baz/-'
     * Using the indexed pointer '/foo/1/bar/4/baz/3' and the same arrayMap
     * would result in the generic pointer '/foo/-/bar/-/baz/-'
     * (the bar array has 3 tuple items, so index 2 is retained, but 4 is removed)
     *
     * The structure of the arrayMap is: [['path to array', number of tuple items]...]
     *
     *
     * //  { Pointer } indexedPointer - The indexed pointer (array or string)
     * //  { Map<string, number> } arrayMap - The optional array map (for preserving tuple indexes)
     * // { string } - The generic pointer with indexes removed
     */
'toGenericPointer' function
Compares an indexed pointer to an array map and removes list array
indexes (but leaves tuple arrray indexes and all object keys, including
numeric keys) to create a generic pointer.



The structure of the arrayMap is: [['path to array', number of tuple items]...]

{ Pointer } indexedPointer - The indexed pointer (array or string)
{ Map } arrayMap - The optional array map (for preserving tuple indexes)
{ string } - The generic pointer with indexes removed
' toGenericPointer ' function Compares an indexed pointer to an array map and removes list array indexes ( but leaves tuple arrray indexes and all object keys including numeric keys ) to create a generic pointer . The structure of the arrayMap is : [[ ' path to array ' number of tuple items ] ... ] { Pointer } indexedPointer - The indexed pointer ( array or string ) { Map } arrayMap - The optional array map ( for preserving tuple indexes ) { string } - The generic pointer with indexes removed
static toGenericPointer(indexedPointer, arrayMap = new Map()) {
        if (this.isJsonPointer(indexedPointer) && isMap(arrayMap)) {
            const pointerArray = this.parse(indexedPointer);
            for (let i = 1; i < pointerArray.length; i++) {
                const subPointer = this.compile(pointerArray.slice(0, i));
                if (arrayMap.has(subPointer) &&
                    arrayMap.get(subPointer) <= +pointerArray[i]) {
                    pointerArray[i] = '-';
                }
            }
            return this.compile(pointerArray);
        }
        if (!this.isJsonPointer(indexedPointer)) {
            console.error(`toGenericPointer error: invalid JSON Pointer: ${indexedPointer}`);
        }
        if (!isMap(arrayMap)) {
            console.error(`toGenericPointer error: invalid arrayMap: ${arrayMap}`);
        }
    }
static toGenericPointer ( indexedPointer , arrayMap = new Map ( ) ) { if ( this . isJsonPointer ( indexedPointer ) && isMap ( arrayMap ) ) { const pointerArray = this . parse ( indexedPointer ) ; for ( let i = 1 ; i < pointerArray . length ; i ++ ) { const subPointer = this . compile ( pointerArray . slice ( 0 , i ) ) ; if ( arrayMap . has ( subPointer ) && arrayMap . get ( subPointer ) <= + pointerArray [ i ] ) { pointerArray [ i ] = '-' ; } } return this . compile ( pointerArray ) ; } if ( ! this . isJsonPointer ( indexedPointer ) ) { console . error ( ` ${ indexedPointer } ` ) ; } if ( ! isMap ( arrayMap ) ) { console . error ( ` ${ arrayMap } ` ) ; } }
'toGenericPointer' function
 Compares an indexed pointer to an array map and removes list array
 indexes (but leaves tuple arrray indexes and all object keys, including
 numeric keys) to create a generic pointer.
' toGenericPointer ' function Compares an indexed pointer to an array map and removes list array indexes ( but leaves tuple arrray indexes and all object keys including numeric keys ) to create a generic pointer .