From f71652cfef6f296f7b5ab495461914ae61d76da2 Mon Sep 17 00:00:00 2001 From: greg904 <56923875+greg904@users.noreply.github.com> Date: Tue, 26 May 2020 12:12:33 +0200 Subject: [PATCH] Fix case of `allowUnsafe` in boolean coercion `options.allowunsafe` is not used anywhere so I think it is an error and it should be `options.allowUnsafe` instead. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f9a5f94..e8a817d 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ function extractor (string, options) { string = string || '' var defaultOptions = { allowUnsafe: false } options = options instanceof Object ? {...defaultOptions, ...options} : defaultOptions - options.allowunsafe = Boolean(options.allowUnsafe) + options.allowUnsafe = Boolean(options.allowUnsafe) var lines = string.split(/(\r?\n)/) if (lines[0] && /= yaml =|---/.test(lines[0])) { return parse(string, options.allowUnsafe)