markdown-serve/parser

Handles Markdown file parsing, extracting out the YAML front-matter and parsing the content converting to HTML

Description:
  • Handles Markdown file parsing, extracting out the YAML front-matter and parsing the content converting to HTML

Source:
Author:
License:
  • MIT License

Requires

  • module:fs
  • module:js-yaml
  • module:marked
  • module:crypto
  • module:path

Members

(static) MarkdownFile

Description:
Source:

Methods

(static) parse(file, markedOptionsopt, nullable, callback) → {MarkdownFile}

Description:
  • Attempts to load a MarkdownFile

Source:
Parameters:
Name Type Attributes Description
file string

Full path to file to load

markedOptions Object <optional>
<nullable>

Optional options to pass to "marked" module for Markdown processing

callback parseCallback

parseCallback

Returns:
Type
MarkdownFile

(inner) isPlainObject(value) → {boolean}

Description:
  • Whether a value is a plain object literal (as opposed to an array, Date, string etc).
    Matches the semantics of lodash's isPlainObject, which this replaced.

Source:
Parameters:
Name Type Description
value *

Value to test

Returns:

True if value is a plain object

Type
boolean

Type Definitions

parseCallback(errnullable, result)

Description:
Source:
Parameters:
Name Type Attributes Description
err Object <nullable>

Errors if any

result MarkdownFile