Socket
Socket
Sign inDemoInstall

gray-matter

Package Overview
Dependencies
19
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.6 to 0.2.8

2

bower.json
{
"name": "gray-matter",
"version": "0.2.6",
"version": "0.2.7",
"main": [

@@ -5,0 +5,0 @@ "index.js"

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ # {%= shortname %} [![NPM version](https://badge.fury.io/js/{%= name %}.png)](http://badge.fury.io/js/{%= name %})

@@ -0,0 +0,0 @@

@@ -21,7 +21,11 @@ /**

function matter(str, options) {
var opts = _.extend({delims: ['---','---'], lang: 'yaml'}, options);
var opts = _.defaults({}, options, {
delims: ['---', '---'],
delimsOpts: {},
lang: 'yaml',
});
var metadata = {};
var content = str;
var delimiters = delims(opts.delims).evaluate;
var delimiters = delims(opts.delims, opts.delimsOpts).evaluate;

@@ -28,0 +32,0 @@ // If true, will attempt to detect and register

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

{
"name": "gray-matter",
"description": "A simple to use YAML, JSON or Coffee Front-Matter parsing and extraction library, with options to set custom delimiters.",
"version": "0.2.6",
"version": "0.2.8",
"author": {

@@ -11,3 +11,3 @@ "name": "Jon Schlinkert",

"type": "git",
"url": "https://github.com/assemble/matter.git"
"url": "https://github.com/assemble/gray-matter.git"
},

@@ -17,3 +17,3 @@ "licenses": [

"type": "MIT",
"url": "https://github.com/assemble/matter/blob/master/LICENSE-MIT"
"url": "https://github.com/assemble/gray-matter/blob/master/LICENSE-MIT"
}

@@ -20,0 +20,0 @@ ],

@@ -0,0 +0,0 @@ # gray-matter [![NPM version](https://badge.fury.io/js/gray-matter.png)](http://badge.fury.io/js/gray-matter)

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ ;;; json

@@ -0,0 +0,0 @@ ---yaml

@@ -0,0 +0,0 @@ --- coffee

@@ -0,0 +0,0 @@ ---coffee

@@ -0,0 +0,0 @@ ---

@@ -88,3 +88,3 @@ /**

var fixture = file.readFileSync('./test/fixtures/alpha.hbs');
var actual = matter.stringifyJSON(fixture);
var actual = matter.stringify(fixture);
expect(actual).to.deep.equal({foo: 'bar', version: 2});

@@ -129,2 +129,19 @@ done();

describe('Use custom delimiters:', function () {
xit('should use custom delimiters.', function (done) {
var actual = matter.read('./test/fixtures/code-comments.js', {
// /\/\*\*([\S\s]+)\*\//
delims: ['\/\*\*', '\*\/'],
delimsOpts: {
body: '\\s+\\*\\s*([\\s\\S]+?)',
escape: true
}
});
expect(actual).to.deep.equal(customDelims);
done();
});
});
describe('Parse JSON:', function () {

@@ -131,0 +148,0 @@ var expected = {

Sorry, the diff of this file is not supported yet

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