unhead 1.0.13 → 1.0.14
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 +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -152,7 +152,7 @@ function resolveMetaKeyType(key) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
function unpackMeta(input) {
|
|
155
|
-
|
|
155
|
+
const meta = unpackToArray(input, {
|
|
156
156
|
key({ key }) {
|
|
157
157
|
return resolveMetaKeyType(key);
|
|
158
158
|
},
|
|
@@ -163,6 +163,8 @@ function unpackMeta(input) {
|
|
|
163
163
|
return MetaPackingSchema[key]?.keyValue || fixKeyCase(key);
|
|
164
164
|
},
|
|
165
165
|
resolveValueData({ value, key }) {
|
|
166
|
+
if (value === null)
|
|
167
|
+
return "_null";
|
|
166
168
|
if (typeof value === "object") {
|
|
167
169
|
const definition = MetaPackingSchema[key];
|
|
168
170
|
if (key === "refresh")
|
|
@@ -173,6 +175,8 @@ function unpackMeta(input) {
|
|
|
173
175
|
entrySeparator: ", ",
|
|
174
176
|
keyValueSeparator: "=",
|
|
175
177
|
resolve({ value: value2, key: key2 }) {
|
|
178
|
+
if (value2 === null)
|
|
179
|
+
return "";
|
|
176
180
|
if (typeof value2 === "boolean")
|
|
177
181
|
return `${key2}`;
|
|
178
182
|
},
|
|
@@ -183,6 +187,7 @@ function unpackMeta(input) {
|
|
|
183
187
|
return typeof value === "number" ? value.toString() : value;
|
|
184
188
|
}
|
|
185
189
|
});
|
|
190
|
+
return meta.filter((v) => typeof v.content === "undefined" || v.content !== "_null");
|
|
186
191
|
}
|
|
187
192
|
|
|
188
193
|
const PropertyPrefixKeys = /^(og|twitter|fb)/;
|
package/dist/index.mjs
CHANGED
|
@@ -150,7 +150,7 @@ function resolveMetaKeyType(key) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
function unpackMeta(input) {
|
|
153
|
-
|
|
153
|
+
const meta = unpackToArray(input, {
|
|
154
154
|
key({ key }) {
|
|
155
155
|
return resolveMetaKeyType(key);
|
|
156
156
|
},
|
|
@@ -161,6 +161,8 @@ function unpackMeta(input) {
|
|
|
161
161
|
return MetaPackingSchema[key]?.keyValue || fixKeyCase(key);
|
|
162
162
|
},
|
|
163
163
|
resolveValueData({ value, key }) {
|
|
164
|
+
if (value === null)
|
|
165
|
+
return "_null";
|
|
164
166
|
if (typeof value === "object") {
|
|
165
167
|
const definition = MetaPackingSchema[key];
|
|
166
168
|
if (key === "refresh")
|
|
@@ -171,6 +173,8 @@ function unpackMeta(input) {
|
|
|
171
173
|
entrySeparator: ", ",
|
|
172
174
|
keyValueSeparator: "=",
|
|
173
175
|
resolve({ value: value2, key: key2 }) {
|
|
176
|
+
if (value2 === null)
|
|
177
|
+
return "";
|
|
174
178
|
if (typeof value2 === "boolean")
|
|
175
179
|
return `${key2}`;
|
|
176
180
|
},
|
|
@@ -181,6 +185,7 @@ function unpackMeta(input) {
|
|
|
181
185
|
return typeof value === "number" ? value.toString() : value;
|
|
182
186
|
}
|
|
183
187
|
});
|
|
188
|
+
return meta.filter((v) => typeof v.content === "undefined" || v.content !== "_null");
|
|
184
189
|
}
|
|
185
190
|
|
|
186
191
|
const PropertyPrefixKeys = /^(og|twitter|fb)/;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unhead",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "1.0.14",
|
|
5
|
+
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"hookable": "^5.4.2",
|
|
34
|
-
"@unhead/dom": "1.0.
|
|
35
|
-
"@unhead/schema": "1.0.
|
|
34
|
+
"@unhead/dom": "1.0.14",
|
|
35
|
+
"@unhead/schema": "1.0.14"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"zhead": "^1.0.
|
|
38
|
+
"zhead": "^1.0.9"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "unbuild .",
|