@unhead/shared 1.1.25 → 1.1.26
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 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -74,13 +74,13 @@ function tagDedupeKey(tag, fn) {
|
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
function resolveTitleTemplate(template, title) {
|
|
78
78
|
if (template == null)
|
|
79
79
|
return title || null;
|
|
80
80
|
if (typeof template === "function")
|
|
81
81
|
return template(title);
|
|
82
82
|
return template;
|
|
83
|
-
}
|
|
83
|
+
}
|
|
84
84
|
|
|
85
85
|
exports.HasElementTags = HasElementTags;
|
|
86
86
|
exports.SelfClosingTags = SelfClosingTags;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ declare function computeHashes(hashes: string[]): string;
|
|
|
18
18
|
|
|
19
19
|
declare function tagDedupeKey<T extends HeadTag>(tag: T, fn?: (key: string) => boolean): string | false;
|
|
20
20
|
|
|
21
|
-
declare
|
|
21
|
+
declare function resolveTitleTemplate(template: string | ((title?: string) => string | null) | null, title?: string): string | null;
|
|
22
22
|
|
|
23
23
|
export { Arrayable, HasElementTags, SelfClosingTags, TagConfigKeys, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, computeHashes, defineHeadPlugin, hashCode, hashTag, resolveTitleTemplate, tagDedupeKey };
|
package/dist/index.mjs
CHANGED
|
@@ -72,12 +72,12 @@ function tagDedupeKey(tag, fn) {
|
|
|
72
72
|
return false;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
function resolveTitleTemplate(template, title) {
|
|
76
76
|
if (template == null)
|
|
77
77
|
return title || null;
|
|
78
78
|
if (typeof template === "function")
|
|
79
79
|
return template(title);
|
|
80
80
|
return template;
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
82
|
|
|
83
83
|
export { HasElementTags, SelfClosingTags, TagConfigKeys, TagsWithInnerContent, UniqueTags, ValidHeadTags, asArray, computeHashes, defineHeadPlugin, hashCode, hashTag, resolveTitleTemplate, tagDedupeKey };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "1.1.26",
|
|
5
|
+
"packageManager": "pnpm@7.32.0",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unhead/schema": "1.1.
|
|
38
|
+
"@unhead/schema": "1.1.26"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "unbuild .",
|