-
-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
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
Allow to use functions instead of strings for keys specification #99
Comments
@Phyks, in your example you're passing in |
Hmm, books should be an Immutable List of Immutable Map. Immutable List is indeed an object, but is the Immutable equivalent of Array I think? |
By doing var books = Immutable.fromJS([{
title: "Old Man's War"
author: {
firstName: "John",
lastName: "Scalzi"
}
}])
Object.prototype.toString.call(books) // [object Object] vs: var books = [{
title: "Old Man's War"
author: {
firstName: "John",
lastName: "Scalzi"
}
}]
Object.prototype.toString.call(books) // [object Array] As a result, Fuse.js cannot iterate on that 😢 . |
|
I'm merely saying that Fuse.js should not (arguably) be making that decision 😄 . Note the following:
This is why the object being passed in should be an |
Ok. I got your point. So being able to support Immutable objects directly in Fuse would add to Immutable-specific code and it would be better to convert back to JS Arrays and pass them? |
@Phyks, exactly 😄 |
Hi,
When using
Immutable.JS
, one has to convert back and forth betweenImmutable
objects and JavaScript objects, to pass them toFuse
.If we could use functions to specify which key to use, it would allow the use of non-array objects such as Immutable ones:
Thanks
The text was updated successfully, but these errors were encountered: