Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

myst-toc

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myst-toc - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

32

dist/toc.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc