From 60b3b6774259277d2041ada1948fddc08f09d889 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 15 May 2020 13:45:29 -0400 Subject: [PATCH] readme update --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fda896c..4e9fb24 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ And end up with an object like this: var fm = require('front-matter') ``` -## fm(string) +## fm(string, allowUnsafe = false) Return a `content` object with two properties: @@ -81,6 +81,9 @@ Return a `content` object with two properties: * `content.bodyBegin` contains the line number the body contents begins at * `content.frontmatter` contains the original yaml string contents +**NOTE:** By default `fm()` uses `ys-yaml`'s `safeLoad` unless you set the +optional second argument to true. + # fm.test(string) Check if a string contains a front matter header of "---" or "= yaml =". Primarily used internally but is useful outside of the module.