![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
front-matter-markdown
Advanced tools
Get the config object from a markdown string. It will extract configuration from front-matter.
And get the directory
from the list of heading TOC/Table Of Content/Summary
.
It will generate a TOC from the markdown string if the list is empty
parseMarkdown = require('front-matter-markdown')
markdownStr = """
---
title: this is a title
---
# table of contents
* [Directory](./dir1)
* [Directory2](/dir2)
* [Directory3](#inline)
# this is a inline heading {#inline}
"""
console.log(JSON.stringify parseMarkdown(markdownStr), null, 1)
the results:
{
"title": "this is a title",
"ordered": false,
"contents": [
{
"title": "Directory",
"path": "./dir1",
"ordered": false,
"contents": [
{
"title": "Directory2",
"path": "/dir2"
}
]
},
{
"title": "Directory3",
"path": "#inline"
}
]
}
var parseMarkdown = require('front-matter-markdown');
parseMarkdown(aMarkdownString, aOptions)
: parse a markdown string to a plain object.
aOptions
(Object):
content
(Boolean): whether extract the markdown content from configuration.
defaults to true. it will store the compiled markdown to $compiled
too.
content
and $compiled
attributes are non-enumerable.toc
(Boolean): whether extract the directory from the list in the specified heading.
defaults to true.heading
(String|RegExp|ArrayOf(String)): the heading(s) to extract the directory.
defaults to ['TOC', 'Table Of Content', 'Summary']headingsAsToc
(Boolean|Object): whether generate
the directory from the headings of markdown.
defaults to true. It will generate
the toc if no toc list in the specified heading(toc
enabled).
maxDepth
(Number): Use headings whose depth is at most max depth for generate
.
defaluts to 3.firstLevel
(Number): the first level to generate
the directory from the headings of markdown.
defaluts to 1.MIT
FAQs
get the config and toc object from the markdown string.
The npm package front-matter-markdown receives a total of 0 weekly downloads. As such, front-matter-markdown popularity was classified as not popular.
We found that front-matter-markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.