Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 834 Bytes

README.md

File metadata and controls

44 lines (27 loc) · 834 Bytes

chance-class-name Build Status

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