Skip to content

Commit

Permalink
Fix case of allowUnsafe in boolean coercion
Browse files Browse the repository at this point in the history
`options.allowunsafe` is not used anywhere so I think it is an error and it should be `options.allowUnsafe` instead.
  • Loading branch information
1kjo authored and jxson committed May 27, 2020
1 parent 80ff5d4 commit f71652c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f71652c

Please sign in to comment.