# gen-css-identifier

> Generate a unique css class or id name.

Latest version **1.0.0** (published 2015-12-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install gen-css-identifier
pnpm add gen-css-identifier
yarn add gen-css-identifier
bun add gen-css-identifier
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-12-03 |
| First published | 2015-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | smallhelm |
| Maintainers | smallhelm |
| Keywords | css, unique, class, id |

## Links

- npm: https://www.npmjs.com/package/gen-css-identifier
- Repository: https://github.com/smallhelm/gen-css-identifier
- Homepage: https://github.com/smallhelm/gen-css-identifier#readme
- Issues: https://github.com/smallhelm/gen-css-identifier/issues
- npm.io page: https://npm.io/package/gen-css-identifier

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-12-03

## README

# gen-css-identifier
Generate a unique css class or id name.

```js
var gen = require("gen-css-identifier");

//just a simple function that returns a string

gen();// -> g1
gen();// -> g2
...
...
gen();// -> gz2a


//by default they are prefixed with "g"
//you can use the factory to set your own prefix
var factory = require("gen-css-identifier/factory");

var myGen = factory("my-prefix-");

myGen();// -> my-prefix-2zq
myGen();// -> my-prefix-2zr
```

## unique?
Not globally unique, only unique to the current executing process.

## License
MIT

---
_Source: https://npm.io/package/gen-css-identifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
