chance-class-name
v1.0.1
Published
A Chance.js mixin to generate class names.
Downloads
24
Maintainers
Readme
chance-class-name
A Chance.js mixin to generate class names.
Class names are generated according the W3C CSS spec.
Install
NPM
$ npm i chance-class-name
Yarn
$ yarn add chance-class-name
Usage
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
License
MIT © Michael Novotny