mswjs / data

Data modeling and relation library for testing JavaScript applications.
https://npm.im/@mswjs/data
MIT License
823 stars 52 forks source link

It's impossible to use case insensitive search via "where" statement #255

Open alexeygorbachevsky opened 1 year ago

alexeygorbachevsky commented 1 year ago

some="Abc"

where: { some: { contains: "abc", }, },

Actual result: no matches

sdelpuerto-intelygenz commented 1 year ago

I have the same problem, it would be great if we could do something like this:

where: {
  name: {
    contains: 'search text',
    caseSensitive: false,
  }
}

Alternatively, new case insensitive string operators would also do the trick. Something like ciContains, ciNotContains, ciEquals, ciNotEquals...