We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Love the library idea. Boundary case!
Doesn't handle {$ne: null} properly.
{$ne: null}
const data = [{prop: null}, {prop: 'hi'}] const f = new Faltu(data) console.log(f.find({prop: {$ne: null}}).get().length) // logs 0
I believe it's this line, not sure: https://github.com/moinism/faltu/blob/master/src/faltu.js#L101
Is there another recommended way to check for a property not equaling null?
The text was updated successfully, but these errors were encountered:
It also doesn't work for {$eq: null}.
{$eq: null}
Support for the $and operator would be a workaround (and a nice feature) - then a query of
$and
{$and: [ {$lt: ''}, {$gt: ''} ]}
would work.
Depending on my availability I may be able to do this
Sorry, something went wrong.
I was able to get {prop: {$eq: null}} to work by doing {prop: [null]}, so I'm happy.
{prop: {$eq: null}}
{prop: [null]}
Not sure if this is a use-case you're interested in supporting.
Glad to see that you've found a way. One workaround for the {$ne: null} problem would be to use filter.
filter
Like:
console.log(f.find().filter(function (item) { return item.prop != null; }).get().length)
You can do the same with $eq too. I'll try to fix these though.
$eq
Also, we'd love it if you could add the $and operator.
No branches or pull requests
Love the library idea. Boundary case!
Doesn't handle
{$ne: null}
properly.I believe it's this line, not sure:
https://github.com/moinism/faltu/blob/master/src/faltu.js#L101
Is there another recommended way to check for a property not equaling null?
The text was updated successfully, but these errors were encountered: