Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
* whitelist

For examples please refer to [specs](https://github.com/tadatuta/bem-naming-transformations/blob/master/test/index.js).