Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

front-matter

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

front-matter - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

10

index.d.ts

@@ -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 @@ }

2

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc