Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gen-css-identifier

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gen-css-identifier

Generate a unique css class or id name.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-46%
Maintainers
1
Weekly downloads
 
Created
Source

gen-css-identifier

Generate a unique css class or id name.

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

Keywords

FAQs

Package last updated on 03 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc