node-cld
node-cld copied to clipboard
Safe language detection mode
Creating errors is a fairly expensive operation in JavaScript (primarily due to stacktrace generation), and it is not really necessary for conveying the fact that language resolution was not successful. It would be great if there was a support for safeDetection options flag which would not throw if detection is not successful, but merely returned an empty language list.
If this proposal is accepted, I can send in a PR!
I second this, safeDetection would be good to have