Skip to content

floatdrop/parse-bem-identifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parse-bem-identifier NPM version Build Status Dependency Status

Parsing B__E_M identifier.

You can learn about identifier structure from tests.

Disclaimer

Use bem-naming

API

parseBemIdentifier(pattern, [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)

About

Parse B__E_M identifier

Resources

Stars

Watchers

Forks

Packages

No packages published