Skip to content

Regexp and ilike filter operators #13

Open
@BackupBroom

Description

@BackupBroom

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

Loopback currently supports regexp and ilike operators for where filters, but I don't see support for that in this repo. Are there plans to add these two filter operators to this repository?

Thanks.

Expected result

const filterNodes = require('loopback-filters');
const data = [ { name: 'asd' }, { name: 'fAgh' }, {name: 'qwe'}, { name: 'jkAl' }];

filterNodes(data, { where: { name: { regexp: '/\w*[aA]\w*/i' } } }) // asd, fAgh, jkAl
filterNodes(data, { where: { name: { ilike: '%a%' } } }) // same

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions