static compare(globA, globB) {
        // trivial case, both are exactly the same!
        // or both are wildcard e.g. `*` or `[*]`
        if (globA === globB || (re.WILDCARD.test(globA) && re.WILDCARD.test(globB))) return 0;

        const { split, _inspect } = NotationGlob;

        const a = _inspect(globA);
        const b = _inspect(globB);
        const notesA = split(a.absGlob);
        const notesB = split(b.absGlob);

        // Check depth (number of levels)
        if (notesA.length === notesB.length) {
            // count wildcards
            const wildCountA = (a.absGlob.match(re.WILDCARDS) || []).length;
            const wildCountB = (b.absGlob.match(re.WILDCARDS) || []).length;
            if (wildCountA === wildCountB) {
                // check for negation
                if (!a.isNegated && b.isNegated) return -1;
                if (a.isNegated && !b.isNegated) return 1;
                // both are negated or neither are, return alphabetical
                return a.absGlob < b.absGlob ? -1 : (a.absGlob > b.absGlob ? 1 : 0);
            }
            return wildCountA > wildCountB ? -1 : 1;
        }

        return notesA.length < notesB.length ? -1 : 1;
    }
/**
     *  Compares two given notation globs and returns an integer value as a
     *  result. This is generally used to sort glob arrays. Loose globs (with
     *  stars especially closer to beginning of the glob string) and globs
     *  representing the parent/root of the compared property glob come first.
     *  Verbose/detailed/exact globs come last. (`* < *.abc < abc`).
     *
     *  For instance; `store.address` comes before `store.address.street`. So
     *  this works both for `*, store.address.street, !store.address` and `*,
     *  store.address, !store.address.street`. For cases such as `prop.id` vs
     *  `!prop.id` which represent the same property; the negated glob comes
     *  last.
     *  @name Notation.Glob.compare
     *  @function
     *
     *  @param {String} globA - First notation glob to be compared.
     *  @param {String} globB - Second notation glob to be compared.
     *
     *  @returns {Number} - Returns `-1` if `globA` comes first, `1` if `globB`
     *  comes first and `0` if equivalent priority.
     *
     *  @throws {NotationError} - If either `globA` or `globB` is invalid glob
     *  notation.
     *
     *  @example
     *  const { compare } = Notation.Glob;
     *  compare('*', 'info.user')               // -1
     *  compare('*', '[*]')                     // 0
     *  compare('info.*.name', 'info.user')     // 1
     */
Compares two given notation globs and returns an integer value as a
result. This is generally used to sort glob arrays. Loose globs (with
stars especially closer to beginning of the glob string) and globs
representing the parent/root of the compared property glob come first.
Verbose/detailed/exact globs come last.



@param {String} globA - First notation glob to be compared.
@param {String} globB - Second notation glob to be compared.



@throws {NotationError} - If either `globA` or `globB` is invalid glob
notation.


Compares two given notation globs and returns an integer value as a result . This is generally used to sort glob arrays . Loose globs ( with stars especially closer to beginning of the glob string ) and globs representing the parent / root of the compared property glob come first . Verbose / detailed / exact globs come last . @param { String } globA - First notation glob to be compared . @param { String } globB - Second notation glob to be compared . @throws { NotationError } - If either ` globA ` or ` globB ` is invalid glob notation .
static compare(globA, globB) {
        if (globA === globB || (re.WILDCARD.test(globA) && re.WILDCARD.test(globB))) return 0;
        const { split, _inspect } = NotationGlob;
        const a = _inspect(globA);
        const b = _inspect(globB);
        const notesA = split(a.absGlob);
        const notesB = split(b.absGlob);
        if (notesA.length === notesB.length) {
            const wildCountA = (a.absGlob.match(re.WILDCARDS) || []).length;
            const wildCountB = (b.absGlob.match(re.WILDCARDS) || []).length;
            if (wildCountA === wildCountB) {
                if (!a.isNegated && b.isNegated) return -1;
                if (a.isNegated && !b.isNegated) return 1;
                return a.absGlob < b.absGlob ? -1 : (a.absGlob > b.absGlob ? 1 : 0);
            }
            return wildCountA > wildCountB ? -1 : 1;
        }
        return notesA.length < notesB.length ? -1 : 1;
    }
static compare ( globA , globB ) { if ( globA === globB || ( re . WILDCARD . test ( globA ) && re . WILDCARD . test ( globB ) ) ) return 0 ; const { split , _inspect } = NotationGlob ; const a = _inspect ( globA ) ; const b = _inspect ( globB ) ; const notesA = split ( a . absGlob ) ; const notesB = split ( b . absGlob ) ; if ( notesA . length === notesB . length ) { const wildCountA = ( a . absGlob . match ( re . WILDCARDS ) || [ ] ) . length ; const wildCountB = ( b . absGlob . match ( re . WILDCARDS ) || [ ] ) . length ; if ( wildCountA === wildCountB ) { if ( ! a . isNegated && b . isNegated ) return - 1 ; if ( a . isNegated && ! b . isNegated ) return 1 ; return a . absGlob < b . absGlob ? - 1 : ( a . absGlob > b . absGlob ? 1 : 0 ) ; } return wildCountA > wildCountB ? - 1 : 1 ; } return notesA . length < notesB . length ? - 1 : 1 ; }
Compares two given notation globs and returns an integer value as a
  result.
Compares two given notation globs and returns an integer value as a result .
// trivial case, both are exactly the same! // or both are wildcard e.g. `*` or `[*]` // Check depth (number of levels) // count wildcards // check for negation // both are negated or neither are, return alphabetical