NaturalNode / natural

general natural language facilities for node
MIT License
10.58k stars 861 forks source link

When you try to `addDocument`, it lets you do so for false-y values. #378

Open brianzhou13 opened 6 years ago

brianzhou13 commented 6 years ago

I think there should be a check before actually performing the addDocument action that will throw when a false-y value like undefined as an argument is called with.

This is also the fault of the user (i.e. me), but it was a painful debugging process trying to pinpoint where this was happening.

What do you think?

kkoch986 commented 6 years ago

yea im ok with that. im wondering if the empty string may still have merit being included?