airbnb/polyglot.js — pull request #18 by scarfacedeb (2014-10-20 09:11:25+00:00)
Title: Add has method

I'm often need to check if I have the translation for a given key. *(e.g. I provide default labels for backbone forms to make my views more DRY)*

I know that I can just check `key in polyglot.phrases` myself, but I think that `has` method would be a nice syntactic sugar around that common procedure.

I'm aware of `allowMissing` option, but it won't cut it here, because I don't want to see key values.
As an option, instead of adding that method, I could add another options like `emptyMissing` to return `false` or empty string when there's no translation.

Would do you think?