[fn.uniq] 去重或根据字段去重
@param srcArr  : array
@param pathStr : string [?]
@param isDeep  : boolean = true
321059
function uniq(srcArr, pathStr, isDeep) {
      if (isUdf(isDeep)) isDeep = true;
      if (isBol(pathStr)) isDeep = pathStr, pathStr = UDF;
      pathStr = typeVal(pathStr, 'str');
      var tmpArr = srcArr.slice(), i = -1;
      while (++i < tmpArr.length - 1) {
        for (var j = i + 1; j < tmpArr.length; j++) {
          var isDuplicate;
          if (pathStr) {
            var val1 = get(tmpArr[i], pathStr), val2 = get(tmpArr[j], pathStr);
            isDuplicate = isDeep ? isDeepEqual(val1, val2) : val1 === val2;
          } else {
            isDuplicate = isDeep ? isDeepEqual(tmpArr[i], tmpArr[j]) : tmpArr[i] === tmpArr[j];
          }
          if (isDuplicate) tmpArr.splice(j--, 1);
        }
      }
      return tmpArr;
    }
957630
function createDir(srcPath, desPath) {
    var pathInfo = path.parse(desPath);
    var searchvalue = pathInfo.root[pathInfo.root.length - 1]
    var start = 0;
    var found = pathInfo.dir.indexOf(searchvalue);
    var subPath = '';
    var dirs = [];

    if (found != -1) {
        while (true) {
            subPath = pathInfo.dir.substr(start, found - start + 1);
            if (subPath != '') {
                dirs.push(subPath);
            }
            start = found + 1;
            found = pathInfo.dir.indexOf(searchvalue, start);
            if (found == -1) {
                if (start < pathInfo.dir.length) {
                    dirs.push(pathInfo.dir.substr(start));
                }
                break;
            }
        }
    }

    subPath = '';
    dirs.forEach(function (dir, num) {
        subPath += dir;
        if (!fs.existsSync(subPath)) {
            try {
                fs.mkdirSync(subPath);
            } catch (e) {
                if (e.code != 'EEXIST') {
                    console.log('[error] ', e);
                };
            }
            console.log('[info] create  dir:', subPath);
        }
        if (num == dirs.length - 1 && pathInfo.base != '') {
            copyFile(srcPath, desPath);
            //console.log('src file:', srcPath);
            //console.log('des file:', desPath);
        }
    });

}
820249
void dfsPathSplit(String path, String[] result)
    {
        int ri = 0, rlast = result.length - 1;
        int i = 0, b = 0, len = path.length();

        do {
            if (ri == rlast) {
                result[rlast] = path.substring(b);
                return;
            }
            if (i == len || path.charAt(i) == '\\') {
                result[ri++] = path.substring(b, i);
                b = i + 1;
            }
        } while (i++ < len);

        while (ri < result.length) {
            result[ri++] = "";
        }
    }
726683
public static boolean is_yanadi(String str)
    {

        String s1 = VarnaUtil.getAdiVarna(str);
        if (is_yan(s1)) return true;
        return false;
    }
1319573
function isRelativeFilepath(str) {
  if (str) {
    return (
      isFilepath(str) && (str.indexOf('./') == 0 || str.indexOf('../') == 0)
    );
  }
  return false;
}
509569
public static boolean is_ashadi(String str)
    {
        String s1 = VarnaUtil.getAdiVarna(str);
        if (is_ash(s1)) return true;
        return false;
    }
598063
async function untar(istream, dst){
    // is destination a directory ?
    if (!await _isDirectory(dst)){
        throw Error('Destination is not a valid directory: ' + dst);
    }

    // get instance
    const extract = _tar.extract();

    // list of extracted files
    const items = [];
    
    // wrap into Promise
    return new Promise(function(resolve, reject){

        // process each tar entry!
        extract.on('entry', async function(header, fstream, next){

            // add item to list
            items.push(header.name);

            // directory entry ?
            if (header.type == 'directory'){
                // create subdirectory
                await _mkdirp(_path.join(dst, header.name), header.mode, true);

            // file entry ?
            }else if (header.type == 'file'){
                // redirect content to file
                await _fileOutputStream(fstream, _path.join(dst, header.name), header.mode);
            }

            // next entry
            next();
        });
        
        // listener
        extract.on('finish', function(){
            resolve(items);
        });
        extract.on('error', reject);

        // pipe through extractor
        istream.pipe(extract);
    });
}
994384
function f_idler_aktif_tarih_araligindakiler(_tahta_id, _tarih1, _tarih2) {
        console.log("f_idler_aktif_tarih_araligindakiler")
        return f_tahta_ihale_idler_aktif(_tahta_id)
            .then(function (_ihale_idler) {
                var tarih1 = _tarih1 ? _tarih1 : "-inf",
                    tarih2 = _tarih2 ? _tarih2 : "+inf";

                return result.dbQ.zunionstore(result.kp.temp.zsetTahtaIhaleTarihineGore(_tahta_id), 2, result.kp.ihale.zsetYapilmaTarihi, result.kp.temp.ssetTahtaIhale(_tahta_id))
                    .then(function () {
                        return result.dbQ.zrangebyscore(result.kp.temp.zsetTahtaIhaleTarihineGore(_tahta_id), tarih1, tarih2);
                    })
                    .then(function (_ihale_idler) {
                        if (Array.isArray(_ihale_idler) && _ihale_idler.length > 0) {
                            return _ihale_idler;
                        } else {
                            return [];
                        }
                    });
            });
    }
1044365
private boolean pathExists(T u, T v, boolean includeAdjacent) {
        if (!nodes.contains(u) || !nodes.contains(v)) {
            return false;
        }
        if (includeAdjacent && isAdjacent(u, v)) {
            return true;
        }
        Deque<T> stack = new LinkedList<>();
        Set<T> visited = new HashSet<>();
        stack.push(u);
        while (!stack.isEmpty()) {
            T node = stack.pop();
            if (node.equals(v)) {
                return true;
            }
            if (!visited.contains(node)) {
                visited.add(node);
                edges.get(node).stream()
                     .filter(e -> includeAdjacent || !node.equals(u) || !e.equals(v))
                     .forEach(stack::push);
            }
        }
        assert !visited.contains(v);
        return false;
    }
941153
private static List<Segment> parseSegments(String origPathStr) {
        String pathStr = origPathStr;
        if (!pathStr.startsWith("/")) {
            pathStr = pathStr + "/";
        }

        List<Segment> result = new ArrayList<>();
        for (String segmentStr : PATH_SPLITTER.split(pathStr)) {
            Matcher m = SEGMENT_PATTERN.matcher(segmentStr);
            if (!m.matches()) {
                throw new IllegalArgumentException("Bad aql path: " + origPathStr);
            }
            Segment segment = new Segment();
            segment.attribute = m.group(1);
            segment.nodeId = m.groupCount() >= 3 ? m.group(3) : null;
            result.add(segment);
        }
        return result;
    }
1056426
public static boolean is_khar(String str)
    {
        if (is_vargiya1(str) || is_vargiya2(str) || is_shar(str)) return true;

        return false;
    }
1310236
private int nextXpathNodeSeperator() {
        int start = pos;
        boolean inQuote = false;
        char last = 0;
        do {
            if (queue.length() - start == 0) {
                return -1;
            }
            Character c = queue.charAt(start++);

            if (last == 0 || last != ESC) {
                if ((c.equals('\'') || c.equals('"')))
                    inQuote = !inQuote;
                if (inQuote)
                    continue;
            }

            if (c == '/') {
                return start;
            }

            last = c;
        } while (true);
    }
805151
public static void isBlankThen(String str, Consumer<String> consumer) {
        if (isBlank(str)) {
            consumer.accept(str);
        }
    }
709518
function parsePath(path, islineToArc) {
    var coord = this._coord;
    path = GPath.parsePathString(path);
    if (coord.isPolar && islineToArc !== false) {
      path = PathUtil.convertPolarPath(coord, path);
    } else {
      path = PathUtil.convertNormalPath(coord, path);
    }
    return path;
  }
757241
public boolean isCurrent(String str) {
	if (pos + str.length() > lcText.length) return false;
	for (int i = str.length() - 1; i >= 0; i--) {
	    if (str.charAt(i) != lcText[pos + i]) return false;
	}
	return true;
    }
247775
function isSrcSubdir (src, dest) {
  const srcArray = path.resolve(src).split(path.sep)
  const destArray = path.resolve(dest).split(path.sep)
  return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true)
}
618968
public static boolean is_tavargadi(String str)
    {
        String s1 = VarnaUtil.getAdiVarna(str);
        if (is_tavarga(s1)) return true;
        return false;
    }