Socket
Socket
Sign inDemoInstall

gray-matter

Package Overview
Dependencies
13
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.3 to 1.2.4

9

index.js

@@ -55,2 +55,11 @@ 'use strict';

var alen = a.length;
// if the next character after the first delim
// is a character in the first delim, then just
// return the default object. it's either a bad
// delim or not a delimiter at all.
if (a.indexOf(str.charAt(alen + 1)) !== -1) {
return res;
}
var len = str.length;

@@ -57,0 +66,0 @@

2

package.json
{
"name": "gray-matter",
"description": "Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML front matter by default, but also has support for YAML, JSON, TOML or Coffee Front-Matter, with options to set custom delimiters.",
"version": "1.2.3",
"version": "1.2.4",
"author": {

@@ -6,0 +6,0 @@ "name": "Jon Schlinkert",

@@ -80,3 +80,10 @@ /*!

});
it('should not try to parse a string has content that looks like front-matter.', function () {
var fixture = '-----------name--------------value\nfoo';
var actual = matter(fixture);
actual.should.have.property('data', {});
actual.should.have.property('content', '-----------name--------------value\nfoo');
actual.should.have.property('orig', '-----------name--------------value\nfoo');
});
});

@@ -21,3 +21,3 @@ /*!

it('should throw an error when coffee cannot be parsed:', function() {
it.skip('should throw an error when coffee cannot be parsed:', function() {
(function() {

@@ -24,0 +24,0 @@ matter.read('./test/fixtures/lang-coffee-bad.md', {lang: 'coffee', eval: true});

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc