A library for generating random HTML strings for property-based testing. Version 1.1.0 is stable with no recent releases (last updated 2017). It builds on chance-generators and integrates with unexpected-check and unchecked. Unlike other HTML generators, it produces structurally valid but semantically random HTML documents, including elements, attributes, and content. Supports custom seeds and limits. Suitable for testing HTML parsers, minifiers, sanitizers, and other tools where diverse HTML input is needed.
npm install html-generatorsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates generating random HTML strings, fragments, and documents using the three main generators.
Consider migrating to a more modern alternative like faker or quick-check.
Do not use for production HTML generation; intended for testing with property-based testing frameworks.
Use require() instead of import, or use a bundler.
Run 'npm install html-generators' and ensure it is in package.json dependencies.
Use 'const { htmlString } = require('html-generators')'Assign result: 'const gen = htmlString(); const result = gen.first();'