🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-datocms

Package Overview
Dependencies
Maintainers
6
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-datocms - npm Package Compare versions

Comparing version

to
5.0.0

17

dist/cjs/Seo/remixUtils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toRemixMeta = void 0;
function toRemixMeta(metaTags) {
exports.toRemixMeta = exports.toRemixV1Meta = void 0;
function toRemixV1Meta(metaTags) {
if (!metaTags) {

@@ -23,3 +23,16 @@ return {};

}
exports.toRemixV1Meta = toRemixV1Meta;
function toRemixMeta(tags) {
if (!tags) {
return [];
}
return tags
.map((x) => {
if (x.tag === 'title' && x.content)
return { title: x.content };
return x.attributes;
})
.filter((x) => Boolean(x));
}
exports.toRemixMeta = toRemixMeta;
//# sourceMappingURL=remixUtils.js.map

@@ -1,2 +0,2 @@

export function toRemixMeta(metaTags) {
export function toRemixV1Meta(metaTags) {
if (!metaTags) {

@@ -20,2 +20,14 @@ return {};

}
export function toRemixMeta(tags) {
if (!tags) {
return [];
}
return tags
.map((x) => {
if (x.tag === 'title' && x.content)
return { title: x.content };
return x.attributes;
})
.filter((x) => Boolean(x));
}
//# sourceMappingURL=remixUtils.js.map

5

dist/types/Seo/remixUtils.d.ts
import { SeoOrFaviconTag, TitleMetaLinkTag } from './types.js';
interface RemixHtmlMetaDescriptor {
interface RemixV1HtmlMetaDescriptor {
[name: string]: string | string[];
}
export declare function toRemixMeta(metaTags: null | TitleMetaLinkTag[] | SeoOrFaviconTag[]): RemixHtmlMetaDescriptor;
export declare function toRemixV1Meta(metaTags: null | TitleMetaLinkTag[] | SeoOrFaviconTag[]): RemixV1HtmlMetaDescriptor;
export declare function toRemixMeta(tags: null | TitleMetaLinkTag[] | SeoOrFaviconTag[]): NonNullable<Record<string, string> | import("./types.js").RegularMetaAttributes | import("./types.js").OgMetaAttributes | import("./types.js").FaviconAttributes | import("./types.js").AppleTouchIconAttributes | null | undefined>[];
export {};
{
"name": "react-datocms",
"version": "4.2.2",
"version": "5.0.0",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=8.0.0"

import { SeoOrFaviconTag, TitleMetaLinkTag } from './types.js';
interface RemixHtmlMetaDescriptor {
interface RemixV1HtmlMetaDescriptor {
[name: string]: string | string[];
}
export function toRemixMeta(
export function toRemixV1Meta(
metaTags: null | TitleMetaLinkTag[] | SeoOrFaviconTag[],
): RemixHtmlMetaDescriptor {
): RemixV1HtmlMetaDescriptor {
if (!metaTags) {

@@ -33,3 +33,18 @@ return {};

};
}, {} as RemixHtmlMetaDescriptor);
}, {} as RemixV1HtmlMetaDescriptor);
}
export function toRemixMeta(
tags: null | TitleMetaLinkTag[] | SeoOrFaviconTag[],
) {
if (!tags) {
return [];
}
return tags
.map((x) => {
if (x.tag === 'title' && x.content) return { title: x.content };
return x.attributes;
})
.filter((x): x is NonNullable<typeof x> => Boolean(x));
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet