unhead 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -18
- package/dist/index.mjs +2 -18
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -226,23 +226,7 @@ const sortTags = (aTag, bTag) => {
|
|
|
226
226
|
};
|
|
227
227
|
|
|
228
228
|
const UniqueTags = ["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs"];
|
|
229
|
-
|
|
230
|
-
"og:image",
|
|
231
|
-
"og:video",
|
|
232
|
-
"og:audio",
|
|
233
|
-
"og:locale:alternate",
|
|
234
|
-
"video:actor",
|
|
235
|
-
"video:director",
|
|
236
|
-
"video:writer",
|
|
237
|
-
"video:tag",
|
|
238
|
-
"article:author",
|
|
239
|
-
"article:tag",
|
|
240
|
-
"book:tag",
|
|
241
|
-
"book:author",
|
|
242
|
-
"music:album",
|
|
243
|
-
"music:musician"
|
|
244
|
-
];
|
|
245
|
-
function tagDedupeKey(tag) {
|
|
229
|
+
function tagDedupeKey(tag, fn) {
|
|
246
230
|
const { props, tag: tagName } = tag;
|
|
247
231
|
if (UniqueTags.includes(tagName))
|
|
248
232
|
return tagName;
|
|
@@ -256,7 +240,7 @@ function tagDedupeKey(tag) {
|
|
|
256
240
|
for (const n of name) {
|
|
257
241
|
if (typeof props[n] !== "undefined") {
|
|
258
242
|
const val = String(props[n]);
|
|
259
|
-
if (
|
|
243
|
+
if (fn && !fn(val))
|
|
260
244
|
return false;
|
|
261
245
|
return `${tagName}:${n}:${val}`;
|
|
262
246
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -224,23 +224,7 @@ const sortTags = (aTag, bTag) => {
|
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
const UniqueTags = ["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs"];
|
|
227
|
-
|
|
228
|
-
"og:image",
|
|
229
|
-
"og:video",
|
|
230
|
-
"og:audio",
|
|
231
|
-
"og:locale:alternate",
|
|
232
|
-
"video:actor",
|
|
233
|
-
"video:director",
|
|
234
|
-
"video:writer",
|
|
235
|
-
"video:tag",
|
|
236
|
-
"article:author",
|
|
237
|
-
"article:tag",
|
|
238
|
-
"book:tag",
|
|
239
|
-
"book:author",
|
|
240
|
-
"music:album",
|
|
241
|
-
"music:musician"
|
|
242
|
-
];
|
|
243
|
-
function tagDedupeKey(tag) {
|
|
227
|
+
function tagDedupeKey(tag, fn) {
|
|
244
228
|
const { props, tag: tagName } = tag;
|
|
245
229
|
if (UniqueTags.includes(tagName))
|
|
246
230
|
return tagName;
|
|
@@ -254,7 +238,7 @@ function tagDedupeKey(tag) {
|
|
|
254
238
|
for (const n of name) {
|
|
255
239
|
if (typeof props[n] !== "undefined") {
|
|
256
240
|
const val = String(props[n]);
|
|
257
|
-
if (
|
|
241
|
+
if (fn && !fn(val))
|
|
258
242
|
return false;
|
|
259
243
|
return `${tagName}:${n}:${val}`;
|
|
260
244
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unhead",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"packageManager": "pnpm@7.14.0",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@unhead/dom": "1.0.
|
|
34
|
-
"@unhead/schema": "1.0.
|
|
33
|
+
"@unhead/dom": "1.0.1",
|
|
34
|
+
"@unhead/schema": "1.0.1",
|
|
35
35
|
"hookable": "^5.4.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"zhead": "^1.0.
|
|
38
|
+
"zhead": "^1.0.2"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "unbuild .",
|