Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tadatuta/bem-naming-transformations
BEM naming notation transformations
https://github.com/tadatuta/bem-naming-transformations
Last synced: 30 days ago
JSON representation
BEM naming notation transformations
- Host: GitHub
- URL: https://github.com/tadatuta/bem-naming-transformations
- Owner: tadatuta
- Created: 2018-07-31T11:50:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-01T07:44:04.000Z (over 3 years ago)
- Last Synced: 2024-10-05T08:39:39.069Z (about 1 month ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bem-naming-transformations
[BEM naming notation](https://en.bem.info/methodology/naming-convention/) transformations.
## Usage
```js
const BemEntityName = require('@bem/sdk.entity-name');
const transform = require('bem-naming-transformations');const originEntity = BemEntityName.create({ block: 'my-block', elem: 'some-elem' });
const reactEntity = transform(originEntity, { naming: 'react' });console.log(reactEntity); // { block: 'MyBlock', elem: 'SomeElem' }
```### Options
* naming
* transforms
* blacklist
* whitelistFor examples please refer to [specs](https://github.com/tadatuta/bem-naming-transformations/blob/master/test/index.js).