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

react-hyphen

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hyphen - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

30

dist/react-hyphen.cjs.js

@@ -47,22 +47,30 @@ 'use strict';

language = _ref.language;
return React.Children.toArray(children).map(function (item) {
if (item.type === Hyphenated) {
return item;
} else if (typeof item === 'string') {
return hyphenated.hyphenated(item, {
var childrenCount = React.Children.count(children);
var hyphenateChild = function hyphenateChild(child) {
if (child.type === Hyphenated) {
return child;
} else if (typeof child === 'string') {
return hyphenated.hyphenated(child, {
language: language
});
} else {
var _item$props = item.props,
_children = _item$props.children,
props = _objectWithoutProperties(_item$props, ["children"]);
var _child$props = child.props,
_children = _child$props.children,
props = _objectWithoutProperties(_child$props, ["children"]);
return _children ? React.cloneElement(item, props, Hyphenated({
return _children ? React.cloneElement(child, props, Hyphenated({
children: _children,
language: language
})) : item;
})) : child;
}
});
};
if (childrenCount === 1) {
return hyphenateChild(children);
}
return React.Children.map(children, hyphenateChild);
};
module.exports = Hyphenated;
{
"name": "react-hyphen",
"version": "1.2.0",
"version": "1.3.0",
"keywords": [

@@ -5,0 +5,0 @@ "hyphenate",

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