Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bem/naming

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bem/naming - npm Package Compare versions

Comparing version 2.0.0-4 to 2.0.0-5

26

CHANGELOG.md

@@ -219,2 +219,28 @@ Changelog

#### Delims field ([#167]).
Added `delims` field instead of `elemDelim`, `modDelim` and `modValDelim` for consistency with [bemNaming](README.md#bemnaming-delims-elem-mod-wordpattern-) function.
**API v1.x.x**
```js
const bemNaming = require('bem-naming');
bemNaming.elemDelim
bemNaming.modDelim
bemNaming.modValDelim
```
**API v2.x.x**
```js
const bemNaming = require('@bem/naming');
bemNaming.delims.elem
bemNaming.delims.mod.name
bemNaming.delims.mod.val
```
[#167]: https://github.com/bem-sdk/bem-naming/pull/167
### NPM

@@ -221,0 +247,0 @@

8

index.js

@@ -5,12 +5,8 @@ 'use strict';

const api = [
'parse', 'stringify',
'elemDelim', 'modDelim', 'modValDelim'
];
const originalNaming = createNaming();
api.forEach(function (name) {
createNaming[name] = originalNaming[name];
Object.keys(originalNaming).forEach(key => {
createNaming[key] = originalNaming[key];
});
module.exports = createNaming;

@@ -56,15 +56,3 @@ 'use strict';

*/
elemDelim: delims.elem,
/**
* String to separate modifiers from blocks and elements.
*
* @type {String}
*/
modDelim: delims.mod.name,
/**
* String to separate value of modifier from name of modifier.
*
* @type {String}
*/
modValDelim: delims.mod.val
delims
};

@@ -71,0 +59,0 @@

{
"name": "@bem/naming",
"version": "2.0.0-4",
"version": "2.0.0-5",
"description": "Manage naming of BEM entities",

@@ -5,0 +5,0 @@ "license": "MPL-2.0",

@@ -58,5 +58,3 @@ bem-naming

* [stringify(obj)](#stringifyobj)
* [elemDelim](#elemdelim)
* [modDelim](#moddelim)
* [modValDelim](#modvaldelim)
* [delims](#delims)

@@ -256,8 +254,6 @@ BEM Entity representation

* [bemNaming({ delims: {elem, mod}, wordPattern })](##bemnaming-delims-elem-mod-wordpattern-)
* [bemNaming({ delims: {elem, mod}, wordPattern })](#bemnaming-delims-elem-mod-wordpattern-)
* [parse(str)](#parsestr)
* [stringify(obj)](#stringifyobj)
* [elemDelim](#elemdelim)
* [modDelim](#moddelim)
* [modValDelim](#modvaldelim)
* [delims](#delims)

@@ -320,14 +316,32 @@ ### bemNaming({ delims: {elem, mod}, wordPattern })

### elemDelim
### delims
Strings to separate names of bem entities.
Type: `Object`
#### delims.elem
String to separate an element from a block.
### modDelim
Type: `String`
Default: `__`
#### delims.mod.name
String to separate a modifier name from a block or element.
### modValDelim
Type: `String`
Default: `_`
#### delims.mod.val
String to separate a modifier value from the name of the modifier.
Type: `String`
Default: `_`
License

@@ -334,0 +348,0 @@ -------

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc