Socket
Socket
Sign inDemoInstall

react-twemoji

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-twemoji - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

lib/Twemoji/__tests__/index-test.js

@@ -23,3 +23,3 @@ "use strict";

noWrapper: true
}, _react["default"].createElement("p", null, "\uD83D\uDE09", _react["default"].createElement("a", null, "\uD83D\uDE0A")))));
}, "\uD83D\uDE09", _react["default"].createElement("p", null, "\uD83D\uDE09", _react["default"].createElement("a", null, "\uD83D\uDE0A")))));
}

@@ -26,0 +26,0 @@

@@ -106,2 +106,8 @@ "use strict";

return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].Children.map(children, function (c, i) {
if (typeof c === 'string') {
// eslint-disable-next-line no-console
console.warn("Twemoji can't parse string child when noWrapper is set. Skipping child \"".concat(c, "\""));
return c;
}
_this2.childrenRefs[i] = _this2.childrenRefs[i] || _react["default"].createRef();

@@ -108,0 +114,0 @@ return _react["default"].cloneElement(c, {

{
"name": "react-twemoji",
"version": "0.2.0",
"version": "0.2.1",
"description": "A React wrapper for Twemoji",

@@ -5,0 +5,0 @@ "keyword": [

@@ -47,3 +47,3 @@ # react-twemoji

| `options` | `Object` | `{}` | `twemoji.parse` options |
| `noWrapper` | `Boolean` | `false` | When it is `true`, Twemoji will not render a wrapping `div` to contain children |
| `noWrapper` | `Boolean` | `false` | When it is `true`, `Twemoji` will not render a wrapping `div` to contain children. Note that since `twemoji.parse` needs an DOM element reference, any direct pure text child of `Twemoji` is not parsed when `noWrapper` is `true`. E.g. `foo` in `<Twemoji noWrapper={true}>foo<p>bar</p></Twmoji>` is not parsed. |

@@ -50,0 +50,0 @@ ### Run example

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