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

expandobem

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expandobem

ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ExpandOBem

ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.

ExpandOBem expands abbreviated BEM-style classes, like so:

<div class='post--featured--recent'></div>

Becomes:

<div class='post--featured post--recent'></div>

The result is cleaner, more readable source HTML and the speedier switching of modifiers.

Install

npm install expandobem

Usage

ExpandOBem exposes three methods for processing HTML:

Process File

Read a file and transform it.

expandobem.processFile(path, options)

Process String

Transform a string.

expandobem.processString(string, options)

Process Stream

Transform streaming HTML.

expandobem.processStream(options)

Options

syntax.element (default: __)

The connecting syntax prefixing a block or element.

syntax.modifier (default: --)

The connecting syntax prefixing a modifier.

Test

npm test

Gulp

Add link to Gulp plugin...

Todo

  • Find a way to integrate with Jade
  • Improve docs

Release notes

0.0.2 - 14/07/14

Enforce Trumpet version 1.6.3. 1.6.4 seems to have a bug which means the stream is not ended (in this use case).

0.0.1 - 08/04/14

First release

FAQs

Package last updated on 14 Jul 2014

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