parse-bem-identifier

4.0.0 • Public • Published

parse-bem-identifier NPM version Build Status Dependency Status

Parsing B__E_M identifier.

You can learn about identifier structure from tests.

API

parseBemIdentifier(string, [options])

Parses string as BEM identifier and returns object, that contains:

  • block
  • mod
  • modVal
  • elem
  • elemMod
  • elemVal

options

short

Type: Boolean
Default: false

If true, then elemMod will be stored in mod, modVal and elemVal will be stored in val.

License

MIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 4.0.0
    3
  • 3.0.0
    0
  • 2.1.0
    0
  • 2.0.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i parse-bem-identifier

Weekly Downloads

3

Version

4.0.0

License

MIT

Last publish

Collaborators

  • floatdrop