Socket
Socket
Sign inDemoInstall

react-mobiledoc-hooks

Package Overview
Dependencies
8
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.1.2

11

cjs/useMobiledoc.js

@@ -181,6 +181,7 @@ 'use strict';

var items = markers.map(function (item, index) {
var items = markers.map(function (item, key) {
var itemKey = "".concat(nodeKey, "-").concat(key);
return renderMarkersOnElement(React.createElement("li", {
key: index
}, []), item, index);
key: itemKey
}, []), item, itemKey);
});

@@ -357,6 +358,8 @@ return React.createElement(Tag, {

return mobiledoc.sections.map(function (section, nodeKey) {
return mobiledoc.sections.map(function (section, key) {
var _section = _slicedToArray(section, 1),
type = _section[0];
var nodeKey = "mobiledoc-".concat(type, "-").concat(key);
switch (type) {

@@ -363,0 +366,0 @@ case MARKUP_SECTION_TYPE:

{
"name": "react-mobiledoc-hooks",
"version": "0.1.1",
"version": "0.1.2",
"description": "Collection of React hooks for Mobiledoc",
"homepage": "https://github.com/hope-media/react-mobiledoc-hooks",
"bugs": "https://github.com/hope-media/react-mobiledoc-hooks/issues",
"repository": {
"type": "git",
"url": "https://github.com/hope-media/react-mobiledoc-hooks.git"
},
"author": "Eduardo Ludi",

@@ -6,0 +12,0 @@ "main": "cjs/index.js",

@@ -74,5 +74,6 @@ import React from 'react'

function renderListSection([type, Tag, markers], nodeKey) {
const items = markers.map((item, index) =>
renderMarkersOnElement(<li key={index}>{[]}</li>, item, index)
)
const items = markers.map((item, key) => {
const itemKey = `${nodeKey}-${key}`
return renderMarkersOnElement(<li key={itemKey}>{[]}</li>, item, itemKey)
})

@@ -224,5 +225,7 @@ return <Tag key={nodeKey}>{items}</Tag>

return mobiledoc.sections
.map((section, nodeKey) => {
.map((section, key) => {
const [type] = section
const nodeKey = `mobiledoc-${type}-${key}`
switch (type) {

@@ -229,0 +232,0 @@ case MARKUP_SECTION_TYPE:

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc