Open ramakrishnan opened 8 years ago
@wzrdtales I feel passing the index options as an object will make the code more flexible. I will add a work around for backward compatibility. Moving forward shall we encourage users to pass as options?
Please share your thoughts.
@ramakrishnan I would rather go for an options object than adding the huge bunch of arguments that you want to add. And it would be the better solution if we talk about flexibility though.
Though from my side I would remove your params again and give the optionality to pass an object in instead and handle the backwards compatibility by just checking if the second param is a string or an object.
@ramakrishnan Confused your changes with the original, but it keeps the same. Just passing in the second param as an object should be enough to check for the original behavior.
Exactly in line with my thoughts. Backward compatibility I mean is to check if the second param is a string or an object.
Apart from the last mentioned items everything looks fine though :)
Fix for #10 Added provision to pass sparse option while creating index