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

bem-names

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bem-names - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

5

CHANGELOG.md

@@ -0,1 +1,6 @@

### 1.3.3
* Fix typo in warning message #2 (@sirctseb)
* Publish smaller package, by excluding tests and source code from bundle.
### 1.3.2

@@ -2,0 +7,0 @@

2

dist/bem-names.js

@@ -180,3 +180,3 @@ (function (global, factory) {

if (config.bemLike && strWarn && process.env.NODE_ENV !== 'production') {
console.warn('Provided modifier "' + modifiers + '" is now allowed!');
console.warn('Provided modifier "' + modifiers + '" is not allowed!');
return extracted;

@@ -183,0 +183,0 @@ }

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.window=e.window||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return o(p,r[0],r.slice(1))}function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=f({},p,r,{separators:f({},p.separators,r.separators)});return n.bemLike&&!u(e)&&console.error('block name: "'+e+'" is not a string'),function(){for(var r=arguments.length,t=Array(r),i=0;i<r;i++)t[i]=arguments[i];return o(n,e,t)}}function t(e,r){for(var n=f({},p,e,{separators:f({},p.separators,e.separators)}),t=arguments.length,i=Array(t>2?t-2:0),s=2;s<t;s++)i[s-2]=arguments[s];return o(n,r,i)}function o(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.bemLike&&u(n[0])?i(e,r+e.separators.element+n.shift(),n):e.bemLike?i(e,r,n):i(e,void 0,[r].concat(n))}function i(e,r,n){var t=e.bemLike,o=e.parseModifier,i=e.joinWith,c=e.stringModifiers,f=e.styles,y=e.stylesPolicy,p=n,d=[];t&&c===l.PASS_THROUGH&&(d=n.filter(u));var m=p.reduce(a(e),[]),v=m;return t&&(m=m.map(function(n){return o(e,r,n)}),v=[r].concat(m,d)),void 0!=f&&(v=s(v,f,y)),v.join(i)}function s(e,r,n){if(n===y.WARN){return e.reduce(function(e,n){return n in r?e.push(r[n]):"production"!==process.env.NODE_ENV&&console.warn("Key "+n+" is missing in styles"),e},[])}n!==y.WARN&&"production"!==process.env.NODE_ENV&&console.warn('StylePolicy: "'+n+'" has invalid value');return e.reduce(function(e,n){return n in r?e.push(r[n])&&e:e},[])}function a(e){var r=e.separators.keyValue;return function(n,t){if(Array.isArray(t))return n.concat(t);if("object"==(void 0===t?"undefined":c(t))&&null!==t){var o=function(e){return!!t[e]&&n.push(e)};return e.bemLike&&e.keyValue&&(o=function(e){var o=t[e];!0===o?n.push(e):o&&n.push(e+r+o)}),Object.keys(t).forEach(o),n}var i=e.stringModifiers==l.WARN;return e.bemLike&&i&&"production"!==process.env.NODE_ENV?(console.warn('Provided modifier "'+t+'" is now allowed!'),n):(e.bemLike&&e.stringModifiers!=l.ALLOW||n.push(t),n)}}function u(e){return"string"==typeof e||e instanceof String}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},l={WARN:"warn",ALLOW:"allow",PASS_THROUGH:"passThrough"},y={WARN:"warn",IGNORE:"ignore"},p={separators:{element:"__",modifier:"--",keyValue:"-"},states:{},styles:void 0,stylesPolicy:y.WARN,joinWith:" ",bemLike:!0,keyValue:!1,stringModifiers:l.WARN,parseModifier:function(e,r,n){return n in e.states?e.states[n]:r+e.separators.modifier+n}};r.factory=n,r.custom=t,r.StringModifiers=l,r.StylesPolicy=y,e.bemNames=r,e.customBemNames=t,e.bemNamesFactory=n,e.StringModifiers=l,e.StylesPolicy=y,e.default=r,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.window=e.window||{})}(this,function(e){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n={WARN:"warn",ALLOW:"allow",PASS_THROUGH:"passThrough"},o={WARN:"warn",IGNORE:"ignore"},i={separators:{element:"__",modifier:"--",keyValue:"-"},states:{},styles:void 0,stylesPolicy:o.WARN,joinWith:" ",bemLike:!0,keyValue:!1,stringModifiers:n.WARN,parseModifier:function(e,r,t){if(t in e.states)return e.states[t];return r+e.separators.modifier+t}};function s(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return c(i,r[0],r.slice(1))}function a(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t({},i,r,{separators:t({},i.separators,r.separators)});return n.bemLike&&!l(e)&&console.error('block name: "'+e+'" is not a string'),function(){for(var r=arguments.length,t=Array(r),o=0;o<r;o++)t[o]=arguments[o];return c(n,e,t)}}function u(e,r){for(var n=t({},i,e,{separators:t({},i.separators,e.separators)}),o=arguments.length,s=Array(o>2?o-2:0),a=2;a<o;a++)s[a-2]=arguments[a];return c(n,r,s)}function c(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.bemLike&&l(t[0])?f(e,r+e.separators.element+t.shift(),t):e.bemLike?f(e,r,t):f(e,void 0,[r].concat(t))}function f(e,t,i){var s=e.bemLike,a=e.parseModifier,u=e.joinWith,c=e.stringModifiers,f=e.styles,y=e.stylesPolicy,p=i,d=[];s&&c===n.PASS_THROUGH&&(d=i.filter(l));var m,v,b=p.reduce((v=(m=e).separators.keyValue,function(e,t){if(Array.isArray(t))return e.concat(t);if("object"==(void 0===t?"undefined":r(t))&&null!==t){var o=function(r){return!!t[r]&&e.push(r)};return m.bemLike&&m.keyValue&&(o=function(r){var n=t[r];!0===n?e.push(r):n&&e.push(r+v+n)}),Object.keys(t).forEach(o),e}var i=m.stringModifiers==n.WARN;return m.bemLike&&i&&"production"!==process.env.NODE_ENV?(console.warn('Provided modifier "'+t+'" is not allowed!'),e):(m.bemLike&&m.stringModifiers!=n.ALLOW||e.push(t),e)}),[]),h=b;return s&&(b=b.map(function(r){return a(e,t,r)}),h=[t].concat(b,d)),void 0!=f&&(h=function(e,r,t){if(t===o.WARN){return e.reduce(function(e,t){t in r?e.push(r[t]):"production"!==process.env.NODE_ENV&&console.warn("Key "+t+" is missing in styles");return e},[])}t!==o.WARN&&"production"!==process.env.NODE_ENV&&console.warn('StylePolicy: "'+t+'" has invalid value');return e.reduce(function(e,t){return t in r?e.push(r[t])&&e:e},[])}(h,f,y)),h.join(u)}function l(e){return"string"==typeof e||e instanceof String}s.factory=a,s.custom=u,s.StringModifiers=n,s.StylesPolicy=o,e.bemNames=s,e.customBemNames=u,e.bemNamesFactory=a,e.StringModifiers=n,e.StylesPolicy=o,e.default=s,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "bem-names",
"version": "1.3.2",
"description": "Advanced generator of BEM-like class names",
"version": "1.3.3",
"description": "Advanced generator of BEM class names",
"main": "dist/bem-names.js",

@@ -13,7 +13,16 @@ "scripts": {

},
"files": [
"dist",
"LICENSE"
],
"keywords": [
"bem",
"names",
"generator",
"class",
"classname",
"generator"
"classnames",
"react",
"bemNames",
"css"
],

@@ -27,3 +36,3 @@ "author": "Piotr Tomasz Monarski",

"devDependencies": {
"b_": "1.3.3",
"b_": "1.3.4",
"babel-cli": "6.24.1",

@@ -33,11 +42,11 @@ "babel-core": "6.25.0",

"babel-preset-stage-3": "6.24.1",
"babel-register": "6.24.1",
"babel-register": "6.26.0",
"bem-classname": "0.1.1",
"bem-classnames": "1.0.7",
"bem-cn": "2.1.3",
"chai": "4.0.2",
"chai": "4.1.2",
"classnames": "2.2.5",
"eslint": "4.0.0",
"eslint": "4.16.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.4.2",
"mocha": "5.0.0",
"rollup": "0.43.0",

@@ -44,0 +53,0 @@ "rollup-plugin-babel": "2.7.1",

# bemNames
[![npm version](https://badge.fury.io/js/bem-names.svg)](https://badge.fury.io/js/bem-names)
[![Build Status](https://travis-ci.org/Monar/bem-names.svg?branch=master)](https://travis-ci.org/Monar/bem-names)
[![npm version](https://badge.fury.io/js/bem-names.svg)](https://badge.fury.io/js/bem-names)
[![Test Coverage](https://codeclimate.com/github/Monar/bem-names/badges/coverage.svg)](https://codeclimate.com/github/Monar/bem-names/coverage)
Advanced generator of bem-like class names. `bemNames` can follow any BEM
Advanced generator of BEM class names. `bemNames` can follow any BEM
naming convention and allow easy transition between any of them. It also

@@ -9,0 +9,0 @@ supports a transition between classic [classnames][classnames] as well as

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