Socket
Book a DemoInstallSign in
Socket

@gorebel/css-class-generator

Package Overview
Dependencies
Maintainers
10
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gorebel/css-class-generator

Generates a sequential, valid CSS class, generating the next smallest class names possible

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
9
800%
Maintainers
10
Weekly downloads
 
Created
Source

css-class-generator

Generates a sequential, valid CSS class, generating the next smallest class names possible.

npm install --save css-class-generator

API

cssNameGenerator(prefix = '') -> iterator

Will throw if prefix is not a valid class name (unless the prefix is -). The exception will be thrown when the first value is being yielded.

Class names are generated without a leading ..

It uses generators, so you'll have to be using a version of node that supports this.

Example

const cssNameGenerator = require('css-class-generator');
for (let value of cssNameGenerator()) {
  // 'A', 'B', ...
}
for (let value of cssNameGenerator('-')) {
  // '-A', '-B', ...
}
for (let value of cssNameGenerator('custom-namespace-')) {
  // You get the idea...
}

Keywords

css

FAQs

Package last updated on 02 Nov 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.