myst-frontmatter
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -359,8 +359,2 @@ "use strict"; | ||
} | ||
else if (typeof input === 'string') { | ||
const format = validateExportFormat(input, opts); | ||
if (!format) | ||
return undefined; | ||
exports = [{ format }]; | ||
} | ||
else { | ||
@@ -386,3 +380,12 @@ exports = [input]; | ||
function validateExport(input, opts) { | ||
const value = (0, simple_validators_1.validateObject)(input, opts); | ||
let value; | ||
if (typeof input === 'string') { | ||
const format = validateExportFormat(input, opts); | ||
if (!format) | ||
return undefined; | ||
value = { format }; | ||
} | ||
else { | ||
value = (0, simple_validators_1.validateObject)(input, opts); | ||
} | ||
if (value === undefined) | ||
@@ -389,0 +392,0 @@ return undefined; |
@@ -347,8 +347,2 @@ import doi from 'doi-utils'; | ||
} | ||
else if (typeof input === 'string') { | ||
const format = validateExportFormat(input, opts); | ||
if (!format) | ||
return undefined; | ||
exports = [{ format }]; | ||
} | ||
else { | ||
@@ -373,3 +367,12 @@ exports = [input]; | ||
export function validateExport(input, opts) { | ||
const value = validateObject(input, opts); | ||
let value; | ||
if (typeof input === 'string') { | ||
const format = validateExportFormat(input, opts); | ||
if (!format) | ||
return undefined; | ||
value = { format }; | ||
} | ||
else { | ||
value = validateObject(input, opts); | ||
} | ||
if (value === undefined) | ||
@@ -376,0 +379,0 @@ return undefined; |
{ | ||
"name": "myst-frontmatter", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
154692
3130