Comparing version 0.1.0 to 0.1.1
@@ -1,3 +0,4 @@ | ||
import { defined, incrementOptions, validateBoolean, validateList, validateObjectKeys, validateObject, validateString, validationError, } from 'simple-validators'; | ||
const COMMON_ENTRY_KEYS = ['title', 'hidden', 'numbering', 'id', 'part', 'class']; | ||
import { defined, incrementOptions, validateList, validateObjectKeys, validateObject, validateString, validationError, } from 'simple-validators'; | ||
const COMMON_ENTRY_KEYS = ['title']; | ||
// const COMMON_ENTRY_KEYS = ['title', 'hidden', 'numbering', 'id', 'class']; | ||
function validateCommonEntry(entry, opts) { | ||
@@ -8,17 +9,14 @@ const output = {}; | ||
} | ||
if (defined(entry.hidden)) { | ||
output.hidden = validateBoolean(entry.hidden, incrementOptions('hidden', opts)); | ||
} | ||
if (defined(entry.numbering)) { | ||
output.numbering = validateString(entry.numbering, incrementOptions('numbering', opts)); | ||
} | ||
if (defined(entry.id)) { | ||
output.id = validateString(entry.id, incrementOptions('id', opts)); | ||
} | ||
if (defined(entry.part)) { | ||
output.part = validateString(entry.part, incrementOptions('part', opts)); | ||
} | ||
if (defined(entry.class)) { | ||
output.class = validateString(entry.class, incrementOptions('class', opts)); | ||
} | ||
// if (defined(entry.hidden)) { | ||
// output.hidden = validateBoolean(entry.hidden, incrementOptions('hidden', opts)); | ||
// } | ||
// if (defined(entry.numbering)) { | ||
// output.numbering = validateString(entry.numbering, incrementOptions('numbering', opts)); | ||
// } | ||
// if (defined(entry.id)) { | ||
// output.id = validateString(entry.id, incrementOptions('id', opts)); | ||
// } | ||
// if (defined(entry.class)) { | ||
// output.class = validateString(entry.class, incrementOptions('class', opts)); | ||
// } | ||
return output; | ||
@@ -25,0 +23,0 @@ } |
@@ -7,7 +7,2 @@ /** | ||
title?: string; | ||
hidden?: boolean; | ||
numbering?: string; | ||
id?: string; | ||
part?: string; | ||
class?: string; | ||
}; | ||
@@ -14,0 +9,0 @@ /** |
{ | ||
"name": "myst-toc", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
11633
209