github krisk/Fuse v6.3.0

latest releases: v7.0.0, v6.6.2, v6.6.1...
3 years ago

Features

  • provide alternative array notation for nested paths (7077fbe), closes #432

    const options = {
      // equivalent to `keys: [['author', 'firstName'], ['author', 'lastName']]`
      keys: ['author.firstName', 'author.lastName']
    }

    And with logical query expressions, the following are equivalent:

    // Example 1
    {
      $and: [{ 'author.firstName': 'jon' }, { 'author.firstName': 'scazi' }]
    }
    
    // Example 2
    {
      $and: [
        {
          $path: ['author', 'firstNname'],
          $val: 'jon'
        },
        {
          $path: ['author', 'lastName'],
          $val: 'scazi'
        }
      ]
    }

Don't miss a new Fuse release

NewReleases is sending notifications on new releases.