Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export zxcvbn function conditional on the environment
Rather than directly attaching the zxcvbn function to the `window` object, check first if the window exists (i.e., we are in a browser environment). If not, then we may be in a CommonJS environment, and we can export the function by attaching it to the `exports` object.
- Loading branch information