Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/floatdrop/parse-bem-identifier
Parse B__E_M identifier
https://github.com/floatdrop/parse-bem-identifier
Last synced: about 1 month ago
JSON representation
Parse B__E_M identifier
- Host: GitHub
- URL: https://github.com/floatdrop/parse-bem-identifier
- Owner: floatdrop
- Created: 2014-07-30T07:32:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-17T22:42:44.000Z (over 3 years ago)
- Last Synced: 2024-10-26T21:12:11.427Z (3 months ago)
- Language: JavaScript
- Size: 191 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# parse-bem-identifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]
Parsing B__E_M identifier.
You can learn about identifier structure from [tests](https://github.com/floatdrop/parse-bem-identifier/blob/master/test/index.js).
## Disclaimer
Use [`bem-naming`](https://github.com/bem/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 ([email protected])[npm-url]: https://npmjs.org/package/parse-bem-identifier
[npm-image]: http://img.shields.io/npm/v/parse-bem-identifier.svg[travis-url]: https://travis-ci.org/floatdrop/parse-bem-identifier
[travis-image]: http://img.shields.io/travis/floatdrop/parse-bem-identifier.svg[depstat-url]: https://david-dm.org/floatdrop/parse-bem-identifier
[depstat-image]: https://david-dm.org/floatdrop/parse-bem-identifier.svg?theme=shields.io