hiddentao / fast-levenshtein

Efficient Javascript implementation of Levenshtein algorithm with locale-specific collator support.
MIT License
596 stars 56 forks source link

Tighten the check for a commonjs environment. #12

Closed eventualbuddha closed 8 years ago

eventualbuddha commented 8 years ago

Looking only for a top-level module that is non-null incorrectly flags e.g. the module function QUnit 1.x. This restricts it to checking that both module and exports exists and that module.exports === exports, as is the case in a commonjs environment.

hiddentao commented 8 years ago

Thanks!