🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@rstack-dev/doc-ui

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rstack-dev/doc-ui - npm Package Compare versions

Comparing version
1.13.1
to
1.13.2
+23
-4
dist/blog-list/index.js

@@ -240,7 +240,26 @@ import './index.css';

const getClassName = (...classNames)=>classNames.filter(Boolean).join(' ');
const ISO_DATE_PREFIX_RE = /^(\d{4})-(\d{2})-(\d{2})(?:$|[T\s])/;
const getDatePartsFromString = (value)=>{
const match = ISO_DATE_PREFIX_RE.exec(value.trim());
if (!match) return;
const [, year, month, day] = match;
return {
year: Number(year),
month: Number(month),
day: Number(day)
};
};
const normalizeDate = (value)=>{
if (void 0 === value) return;
const date = value instanceof Date ? value : new Date(value);
const date = value instanceof Date ? value : 'string' == typeof value ? new Date(value) : new Date(value);
return Number.isNaN(date.getTime()) ? void 0 : date;
};
const formatBlogDate = (value, formatter)=>{
if ('string' == typeof value) {
const dateParts = getDatePartsFromString(value);
if (dateParts) return formatter.format(new Date(dateParts.year, dateParts.month - 1, dateParts.day));
}
const date = normalizeDate(value);
return date ? formatter.format(date) : void 0;
};
const getPostKey = (post, index)=>{

@@ -283,3 +302,3 @@ if (void 0 !== post.id) return post.id;

function BlogCard({ post, isFeatured, Link, dateFormatter, interactive, renderInlineMarkdown }) {
const normalizedDate = normalizeDate(post.date);
const formattedDate = formatBlogDate(post.date, dateFormatter);
const isInteractive = interactive && Boolean(post.href);

@@ -294,5 +313,5 @@ const hasTitle = hasContent(post.title);

children: [
normalizedDate ? /*#__PURE__*/ jsx("span", {
formattedDate ? /*#__PURE__*/ jsx("span", {
className: index_module.date,
children: dateFormatter.format(normalizedDate)
children: formattedDate
}) : null,

@@ -299,0 +318,0 @@ hasTitle ? /*#__PURE__*/ jsx("div", {

+1
-1
{
"name": "@rstack-dev/doc-ui",
"version": "1.13.1",
"version": "1.13.2",
"type": "module",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",