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

contentful-hugo

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful-hugo - npm Package Compare versions

Comparing version 1.15.1 to 1.15.2

22

dist/main/src/processEntry/mapper/index.js

@@ -108,2 +108,16 @@ "use strict";

var isDateField = function (input) {
var requiredSymbols = ['-', ':', 'T'];
if (typeof input !== 'string') {
return false;
}
for (var _i = 0, requiredSymbols_1 = requiredSymbols; _i < requiredSymbols_1.length; _i++) {
var symbol = requiredSymbols_1[_i];
if (!input.includes(symbol)) {
return false;
}
}
var year = input.split('-')[0];
if (isNaN(Number(year))) {
return false;
}
if (typeof input === 'string') {

@@ -209,9 +223,7 @@ var date = Date.parse(input);

default:
if (exports.isDateField(fieldContent)) {
if (exports.isDateField(fieldContent) && fieldContent.length > 10) {
// don't convert dates with no time info
// i.e. 2021-01-05
if (fieldContent.length > 10) {
frontMatter[fieldName] = new Date(fieldContent).toISOString();
break;
}
frontMatter[fieldName] = new Date(fieldContent).toISOString();
break;
}

@@ -218,0 +230,0 @@ frontMatter[fieldName] = fieldContent;

{
"name": "contentful-hugo",
"version": "1.15.1",
"version": "1.15.2",
"description": "Node module that pulls data from Contentful and turns it into markdown files for Hugo. Can be used with other Static Site Generators, but has some Hugo specific features.",

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

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