strapi-markdown-parser
Advanced tools
Comparing version 0.0.1 to 0.0.2
10
index.js
class StrapiMarkdown { | ||
constructor(model, types, options) { | ||
if (types.constructor === Object) { | ||
this.types = {} | ||
if (types && types.constructor === Object) { | ||
this.types.standard = types.standard | ||
this.types.inline = types.inline | ||
} else if (Array.isArray(types)) { | ||
} else if (types && Array.isArray(types)) { | ||
this.types.standard = types | ||
@@ -15,4 +17,4 @@ } else { | ||
options.markdown | ||
? this.marked.setOptions(options.marked) | ||
options | ||
? this.marked.setOptions(options) | ||
: this.marked.setOptions({ | ||
@@ -19,0 +21,0 @@ smartypants: true, |
{ | ||
"name": "strapi-markdown-parser", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Strapi controller module to parse Markdown to HTML", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
6412
112