You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this with sequelize and the 'in' with strings, i.e. a name in an array of strings. The 'in' operator works fine with strings directly in sequelize. Processing with sqs, I have to strip the
curly braces that are added by this line in the sqs code, then it works fine.
| |
const arrayHave = (v) => { return v.split(' ').map(v => { return isNaN(v) ? {${v}} : v }) }
I assume the only use cases is that v is numeric or a string, so leaving it as a string here makes sense to me. Am I missing something? I have developed a method for querying on associations that works pretty well with this.
ps. It could be confusion with other string function versions of 'in', and that the curly braces would not affect a match. This usage will test whether that string matches any in the array exactly. So the curly braces do prevent a match.