A Chance.js mixin to generate class names.
Class names are generated according the W3C CSS spec.
$ npm i chance-class-name
$ yarn add chance-class-name
import Chance from 'chance';
import className from 'chance-class-name';
const chance = new Chance();
chance.mixin({
className
});
chance.className();
By default, chance-class-name
will return a randomly generated class name.
Class names will be between 1 and 25 characters long.
Example: M-oYLdbPVMpbhjGrsLH
MIT © Michael Novotny