How to use fuzzaldrin-plus - 10 common examples

To help you get started, we’ve selected a few fuzzaldrin-plus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / fuzzaldrin-plus / fuzzaldrin-plus-tests.ts View on Github external
fz.score('Maybe', 'me', { allowErrors: true })
fz.score('Application: Install Update', 'install')
fz.score('Application: Install Update', 'install', { preparedQuery })

fz.match('Maybe', 'me')
fz.match('Application: Install Update', 'install')
fz.match('Application: Install Update', 'install', { preparedQuery })

fz.wrap('Maybe', 'me')

//
// Complex filter cases, using all the options
// ----------------------------------------------------------------------

fz.filter(['Maybe', 'Me'], 'me')
fz.filter(['Maybe', 'Me'], 'me', undefined)
fz.filter(['Maybe', 'Me'], 'me', null)
fz.filter(['Maybe', 'Me'], 'me', {})
fz.filter(['Maybe', 'Me'], 'me', { allowErrors: true })
fz.filter(['Maybe', 'Me'], 'me', { key: 'key' })
fz.filter(['Maybe', 'Me'], 'me', {
    preparedQuery: fz.prepareQuery('me')
})
fz.filter(['Maybe', 'Me'], 'me', {
    allowErrors: true,
    usePathScoring: true
})
fz.filter(['Maybe', 'Me'], 'me', {
    allowErrors: true,
    usePathScoring: true,
    useExtensionBonus: true
})
github DefinitelyTyped / DefinitelyTyped / types / fuzzaldrin-plus / fuzzaldrin-plus-tests.ts View on Github external
fz.score('Application: Install Update', 'install')
fz.score('Application: Install Update', 'install', { preparedQuery })

fz.match('Maybe', 'me')
fz.match('Application: Install Update', 'install')
fz.match('Application: Install Update', 'install', { preparedQuery })

fz.wrap('Maybe', 'me')

//
// Complex filter cases, using all the options
// ----------------------------------------------------------------------

fz.filter(['Maybe', 'Me'], 'me')
fz.filter(['Maybe', 'Me'], 'me', undefined)
fz.filter(['Maybe', 'Me'], 'me', null)
fz.filter(['Maybe', 'Me'], 'me', {})
fz.filter(['Maybe', 'Me'], 'me', { allowErrors: true })
fz.filter(['Maybe', 'Me'], 'me', { key: 'key' })
fz.filter(['Maybe', 'Me'], 'me', {
    preparedQuery: fz.prepareQuery('me')
})
fz.filter(['Maybe', 'Me'], 'me', {
    allowErrors: true,
    usePathScoring: true
})
fz.filter(['Maybe', 'Me'], 'me', {
    allowErrors: true,
    usePathScoring: true,
    useExtensionBonus: true
})
fz.filter(['Maybe', 'Me'], 'me', {
github owtf / owtf / owtf / webapp / src / containers / Sessions / SessionTable.js View on Github external
return sessions.filter(session => {
      // Use the filter from fuzzaldrin-plus to filter by name.
      const result = filter([session.name], searchQuery)
      return result.length === 1;
    })
  }
github owtf / owtf / owtf / webapp / src / containers / TargetsPage / TargetsTable.js View on Github external
return targets.filter(target => {
      // Use the filter from fuzzaldrin-plus to filter by name.
      const result = filter([target.target_url], searchQuery);
      return result.length === 1;
    });
  };
github segmentio / evergreen / docs / src / components / examples / AdvancedTable.js View on Github external
return profiles.filter(profile => {
      // Use the filter from fuzzaldrin-plus to filter by name.
      const result = filter([profile.name], searchQuery)
      return result.length === 1
    })
  }
github segmentio / evergreen / src / table / stories / AdvancedTable.js View on Github external
return profiles.filter(profile => {
      // Use the filter from fuzzaldrin-plus to filter by name.
      const result = filter([profile.name], searchQuery)
      return result.length === 1
    })
  }
github bojand / ghz / web / ui / src / components / ProjectList.jsx View on Github external
return projects.filter(p => {
      // Use the filter from fuzzaldrin-plus to filter by name.
      const result = filter([p.name], searchQuery)
      return result.length === 1
    })
  }
github DefinitelyTyped / DefinitelyTyped / types / fuzzaldrin-plus / fuzzaldrin-plus-tests.ts View on Github external
'Find And Replace: Select All',
    'Settings View: Uninstall Packages',
    'Settings View: View Installed Themes',
    'Application: Install Update',
    'Install'
]
const objectCandidates = candidates.map(s => ({ foo: s }))
const options: fz.IOptions = { allowErrors: true }
const filterOptions: fz.IFilterOptions = {
    allowErrors: true,
    key: 'foo'
}

fz.filter(candidates, 'install')
fz.filter(candidates, 'install', options)
fz.filter(candidates, 'install', filterOptions)
fz.filter(objectCandidates, 'install', { key: 'foo' })

const preparedQuery: fz.Query = fz.prepareQuery('install')

fz.score('Maybe', 'me')
fz.score('Maybe', 'me', undefined)
fz.score('Maybe', 'me', null)
fz.score('Maybe', 'me', {})
fz.score('Maybe', 'me', { allowErrors: true })
fz.score('Application: Install Update', 'install')
fz.score('Application: Install Update', 'install', { preparedQuery })

fz.match('Maybe', 'me')
fz.match('Application: Install Update', 'install')
fz.match('Application: Install Update', 'install', { preparedQuery })
github DefinitelyTyped / DefinitelyTyped / types / fuzzaldrin-plus / fuzzaldrin-plus-tests.ts View on Github external
const candidates = [
    'Find And Replace: Select All',
    'Settings View: Uninstall Packages',
    'Settings View: View Installed Themes',
    'Application: Install Update',
    'Install'
]
const objectCandidates = candidates.map(s => ({ foo: s }))
const options: fz.IOptions = { allowErrors: true }
const filterOptions: fz.IFilterOptions = {
    allowErrors: true,
    key: 'foo'
}

fz.filter(candidates, 'install')
fz.filter(candidates, 'install', options)
fz.filter(candidates, 'install', filterOptions)
fz.filter(objectCandidates, 'install', { key: 'foo' })

const preparedQuery: fz.Query = fz.prepareQuery('install')

fz.score('Maybe', 'me')
fz.score('Maybe', 'me', undefined)
fz.score('Maybe', 'me', null)
fz.score('Maybe', 'me', {})
fz.score('Maybe', 'me', { allowErrors: true })
fz.score('Application: Install Update', 'install')
fz.score('Application: Install Update', 'install', { preparedQuery })

fz.match('Maybe', 'me')
fz.match('Application: Install Update', 'install')
fz.match('Application: Install Update', 'install', { preparedQuery })
github DefinitelyTyped / DefinitelyTyped / types / fuzzaldrin-plus / fuzzaldrin-plus-tests.ts View on Github external
const candidates = [
    'Find And Replace: Select All',
    'Settings View: Uninstall Packages',
    'Settings View: View Installed Themes',
    'Application: Install Update',
    'Install'
]
const objectCandidates = candidates.map(s => ({ foo: s }))
const options: fz.IOptions = { allowErrors: true }
const filterOptions: fz.IFilterOptions = {
    allowErrors: true,
    key: 'foo'
}

fz.filter(candidates, 'install')
fz.filter(candidates, 'install', options)
fz.filter(candidates, 'install', filterOptions)
fz.filter(objectCandidates, 'install', { key: 'foo' })

const preparedQuery: fz.Query = fz.prepareQuery('install')

fz.score('Maybe', 'me')
fz.score('Maybe', 'me', undefined)
fz.score('Maybe', 'me', null)
fz.score('Maybe', 'me', {})
fz.score('Maybe', 'me', { allowErrors: true })
fz.score('Application: Install Update', 'install')
fz.score('Application: Install Update', 'install', { preparedQuery })

fz.match('Maybe', 'me')
fz.match('Application: Install Update', 'install')

fuzzaldrin-plus

Fuzzy filtering and string similarity scoring - compatible with fuzzaldrin

MIT
Latest version published 6 years ago

Package Health Score

50 / 100
Full package analysis

Popular fuzzaldrin-plus functions