
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.
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 post--featured post--recent'></div>
The result is cleaner, more readable source HTML and the speedier switching of modifiers.
npm install expandobem
Install globally to use the CLI. ExpandOBem accepts an input file, or can use stdin. It'll either write to a file you specify or pipe to stdout.
expandobem input.html -o 'output.html'
--element, -e Element syntax
--modifier, -m Modifier syntax
--outfile, -o Write the ExpandOBem output to this file.
If unspecified, ExpandOBem pipes to stdout.
--help, -h Show help
ExpandOBem exposes three methods for processing HTML:
Read a file and transform it.
expandobem.processFile(path, options)
Transform a string.
expandobem.processString(string, options)
Transform streaming HTML.
expandobem.processStream(options)
__
)The connecting syntax prefixing a block or element.
--
)The connecting syntax prefixing a modifier.
npm test
You can use ExpandOBem directly in a Gulp pipeline using the vinyl-transform plugin and ExpandOBem's processStream
function.
var gulp = require('gulp');
var transform = require('vinyl-transform');
var expandobem = require('expandobem');
gulp.src([ '*.html' ])
.pipe(transform(expandobem.processStream))
.pipe(gulp.dest('./build'));
FAQs
ExpandOBem is a preprocessing step for HTML that allows you to write BEM-style classes in a shorter, more expressive manner.
The npm package expandobem receives a total of 0 weekly downloads. As such, expandobem popularity was classified as not popular.
We found that expandobem demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.