New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bemto-components

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bemto-components - npm Package Compare versions

Comparing version 2.3.4 to 2.3.5

4

Changelog.md
## Bemto-components changelog
### v2.3.5 (2018-04-06)
- Fixed the state passed to `optional` option.
### v2.3.1–v2.3.4 (2018-04-05)

@@ -4,0 +8,0 @@

2

lib/index.js

@@ -373,3 +373,3 @@ const React = require('react');

if (elemName || item.omitTag || item.tag || item.tagString || item.className || item.props || item.content) {
const optional = typeof item.optional === 'function' ? item.optional(props) : item.optional;
const optional = typeof item.optional === 'function' ? item.optional(props, component.state, component) : item.optional;
if (props['__' + elemName] === false || props['__' + elemName] === null || optional && !elemProp) {

@@ -376,0 +376,0 @@ return;

{
"name": "bemto-components",
"version": "2.3.4",
"version": "2.3.5",
"description": "Smart components for using parts of BEM methodology with React",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -2075,1 +2075,23 @@ const React = require('react');

});
test('optionality of an element based on state', () => {
testSnapshot(
bemto('.myBlock', {
initialState: { foo: true },
content: [
{
optional: (props, state) => !state.foo,
elem: 'Helper',
content: 'helper'
},
{
children: true
}
]
}),
{
},
'hello there'
);
});

Sorry, the diff of this file is not supported yet

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