INNER CODE UNIT · JavaScript

FuzzySearchStrategy

microsoft/azuredevopslabs · js/jekyll-search.js:46

        function FuzzySearchStrategy() {
            function createFuzzyRegExpFromString(string) {
                return new RegExp(string.split("").join(".*?"), "gi")
            }
            var self = this;
            self.matches = function(string, crit) {
                return "string" != typeof string ? !1 : (string = string.trim(), !!string.match(createFuzzyRegExpFromString(crit)))
            }
        }
        module.exports = new FuzzySearchStrategy
    }, {}],
    3: [function(require, module) {
        function LiteralSearchStrategy() {
            function doMatch(string, crit) {
                return string.toLowerCase().indexOf(crit.toLowerCase()) >= 0
            }
            var self = this;
            self.matches = function(string, crit) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…