code: function levenshteinDistance(source, target) {
    var sourceLen = source.length;
    var targetLen = target.length;
    var sourceSegment = void 0,
        targetSegment = void 0;
    var temp = 0;
    if (sourceLen === 0 || targetLen === 0) {
      return null;
    }
    var dist = [];
    for (var i = 0; i <= sourceLen; i++) {
      dist[i] = [];
      dist[i][0] = { min: i };
    }
    for (var j = 0; j <= targetLen; j++) {
      dist[0][j] = { min: j };
    }
  
    for (var _i4 = 1; _i4 <= sourceLen; _i4++) {
      sourceSegment = source[_i4 - 1];
      for (var _j2 = 1; _j2 <= targetLen; _j2++) {
        targetSegment = target[_j2 - 1];
        if (isEqual(sourceSegment, targetSegment)) {
          temp = 0;
        } else {
          temp = 1;
        }
        var del = dist[_i4 - 1][_j2].min + 1;
        var add = dist[_i4][_j2 - 1].min + 1;
        var modify = dist[_i4 - 1][_j2 - 1].min + temp;
        dist[_i4][_j2] = getMinDiff(del, add, modify);
      }
    }
    return dist;
  }
docs: /*
  https://en.wikipedia.org/wiki/Levenshtein_distance
  计算两条path的编辑距离