cockatoo.js
Version:
Fuzzy search library based based on Damerau Levenshtein distance algorithm for Node.js
24 lines (23 loc) • 1.09 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var CockatooOptions = /** @class */ (function () {
function CockatooOptions(obj) {
this.caseSensitive = false;
this.accentSensitive = false;
this.threshold = 40;
this.tokenize = true;
this.tokenThreshold = 40;
this.sorted = true;
this.exhaustive = false;
this.caseSensitive = obj.caseSensitive !== undefined ? obj.caseSensitive : false;
this.accentSensitive = obj.accentSensitive !== undefined ? obj.accentSensitive : false;
this.threshold = obj.threshold !== undefined ? obj.threshold : 40;
this.tokenize = obj.tokenize !== undefined ? obj.tokenize : true;
this.tokenThreshold = obj.tokenThreshold !== undefined ? obj.tokenThreshold : 40;
this.sorted = obj.sorted !== undefined ? obj.sorted : true;
this.exhaustive = obj.exhaustive !== undefined ? obj.exhaustive : false;
this.keys = obj.keys ? obj.keys : [];
}
return CockatooOptions;
}());
exports.CockatooOptions = CockatooOptions;