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.
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.