UNPKG

everyutil

Version:

A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.

11 lines (10 loc) 297 B
/** * Returns the Shannon entropy of a string. * * Useful for detecting randomness, passwords, or encoded data. * * @author @dailker * @param {string} str - The input string. * @returns {number} The Shannon entropy. */ export declare function stringEntropy(str: string): number;