front-matter
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -8,4 +8,12 @@ export interface FrontMatterResult<T> { | ||
export interface FrontMatterOptions { | ||
/** | ||
* Whether to use [safeload](https://github.com/nodeca/js-yaml#safeload-string---options-) | ||
* @default true | ||
*/ | ||
allowUnsafe?: boolean | ||
} | ||
interface FM { | ||
<T>(file: string): FrontMatterResult<T> | ||
<T>(file: string, options?: FrontMatterOptions): FrontMatterResult<T> | ||
test(file: string): boolean | ||
@@ -12,0 +20,0 @@ } |
@@ -23,3 +23,3 @@ var parser = require('js-yaml') | ||
options = options instanceof Object ? {...defaultOptions, ...options} : defaultOptions | ||
options.allowunsafe = Boolean(options.allowUnsafe) | ||
options.allowUnsafe = Boolean(options.allowUnsafe) | ||
var lines = string.split(/(\r?\n)/) | ||
@@ -26,0 +26,0 @@ if (lines[0] && /= yaml =|---/.test(lines[0])) { |
@@ -11,3 +11,3 @@ { | ||
"license": "MIT", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"homepage": "https://github.com/jxson/front-matter", | ||
@@ -21,3 +21,3 @@ "bugs": "https://github.com/jxson/front-matter/issues", | ||
"scripts": { | ||
"test": "make test" | ||
"test": "make test && check-dts" | ||
}, | ||
@@ -29,2 +29,3 @@ "dependencies": { | ||
"brfs": "^2.0.2", | ||
"check-dts": "^0.3.0", | ||
"coveralls": "^3.0.9", | ||
@@ -31,0 +32,0 @@ "istanbul": "^0.4.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11352
88
8