How to use the @pluginjs/match function in @pluginjs/match

To help you get started, we’ve selected a few @pluginjs/match 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 pluginjs / pluginjs / modules / auto-complete / src / main.js View on Github external
match(data, query, options = {}) {
    if (isUndefined(this.keys)) {
      this.keys = options.keys
      if (isNull(this.keys) && data.length > 0) {
        if (isPlainObject(data[0])) {
          this.keys = Object.keys(data[0]).filter(key => isString(data[0][key]))
        }
      }
    }

    options.keys = this.keys

    return match(data, query, options)
  }

@pluginjs/match

A flexible modern match js plugin.

GPL-3.0
Latest version published 2 years ago

Package Health Score

46 / 100
Full package analysis

Popular @pluginjs/match functions

Similar packages