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

@dotdev/next-components

Package Overview
Dependencies
Maintainers
8
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotdev/next-components - npm Package Compare versions

Comparing version 0.4.10 to 0.5.0

1

dist/components/dynamic-sections.d.ts

@@ -7,2 +7,3 @@ import * as React from "react";

private transform;
private legacyTransform;
render(): JSX.Element;

@@ -9,0 +10,0 @@ }

@@ -33,3 +33,28 @@ "use strict";

_this.transform = function (data) {
if (0 < data.length && !data[0]._name) {
return _this.legacyTransform(data);
}
var sections = [];
data.map(function (item, index) {
var blocks = item.blocks;
var fields = item;
delete fields.blocks;
sections.push({
id: index + "_" + item._name,
type: "dynamic",
name: item._name,
settings: fields,
blocks: blocks
? blocks.map(function (block, i) { return ({
id: i,
type: "default",
settings: block
}); })
: []
});
});
return sections;
};
_this.legacyTransform = function (data) {
var sections = [];
data.map(function (item) {

@@ -36,0 +61,0 @@ Object.keys(item).forEach(function (key) {

2

package.json
{
"name": "@dotdev/next-components",
"version": "0.4.10",
"version": "0.5.0",
"license": "UNLICENSED",

@@ -5,0 +5,0 @@ "description": "Common components for Next projects",

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