string-entropy
Calculate the information entropy of a string
As pointed out by other sources, string entropy is propably the most reliable way of scoring a password. This module implements the algorithm described here, using a variable sized alphabet based on the actual contents of the string.
Documentation
See the annotated sources or have a look at index.js.
Browser support
A number of builds are available in the dist
folder. Checkout the demo for an example of this module
implemented as a bootstrap plugin.
Example
var entropy = ; console;// outputs 132console;// outputs 66