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 0.2.2 to 0.2.3

examples/bom.md

2

index.js
const parser = require('yaml-js')
const seperators = [ '---', '= yaml =']
const optionalByteOrderMark = '\\ufeff?'
const pattern = '^('
+ optionalByteOrderMark
+ '((= yaml =)|(---))'

@@ -6,0 +8,0 @@ + '$([\\s\\S]*?)'

2

package.json

@@ -11,3 +11,3 @@ {

"license": "MIT",
"version": "0.2.2",
"version": "0.2.3",
"homepage": "https://github.com/jxson/front-matter",

@@ -14,0 +14,0 @@ "bugs": "https://github.com/jxson/front-matter/issues",

@@ -95,2 +95,15 @@

})
it('works on files with byte order mark', function(done){
read('bom.md', function(err, data){
if (err) return done(err)
var content = fm(data)
assert.ok(content.attributes)
assert.equal(content.attributes.title, "Relax guy, I'm not hiding any BOMs")
done()
})
})
})

@@ -97,0 +110,0 @@

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