Comparing version
{ | ||
"name": "delims", | ||
"version": "0.1.1", | ||
"version": "0.1.3", | ||
"main": [ | ||
@@ -5,0 +5,0 @@ "index.js" |
18
index.js
@@ -1,4 +0,3 @@ | ||
/* | ||
* delims | ||
* https://github.com/jonschlinkert/delims | ||
/*! | ||
* delims <https://github.com/jonschlinkert/delims> | ||
* | ||
@@ -9,9 +8,6 @@ * Copyright (c) 2014 Jon Schlinkert | ||
'use strict'; | ||
const _ = require('lodash'); | ||
const utils = require('./lib/utils'); | ||
var _ = require('lodash'); | ||
var utils = require('./lib/utils'); | ||
// Generate RegExp patterns dynamically. By default, patterns use | ||
@@ -23,3 +19,3 @@ // [\s\S] instead to avoid the need for multiline and dotall flags. | ||
// Defaults | ||
var opts = _.extend({ | ||
var opts = _.defaults({}, options, { | ||
beginning: '^', // '^' Matches beginning of input. | ||
@@ -30,7 +26,7 @@ matter: '([\\s\\S]+?)', // The "content" between the delims | ||
flags: '' // g, m, i | ||
}, options); | ||
}); | ||
opts.body = delims[2] || opts.body || ''; | ||
// Generate regex ections | ||
var open = utils.buildRegexGroup(delims[0], opts); | ||
var open = utils.buildRegexGroup(delims[0], opts); | ||
var close = utils.buildRegexGroup(delims[1], opts); | ||
@@ -37,0 +33,0 @@ var block = opts.matter + close + opts.body + opts.end; |
@@ -1,4 +0,3 @@ | ||
/* | ||
* delims | ||
* https://github.com/jonschlinkert/delims | ||
/*! | ||
* delims <https://github.com/jonschlinkert/delims> | ||
* | ||
@@ -9,15 +8,5 @@ * Copyright (c) 2014 Jon Schlinkert | ||
'use strict'; | ||
const _ = require('lodash'); | ||
const utils = module.exports = {}; | ||
var _ = require('lodash'); | ||
/** | ||
* Export utils | ||
*/ | ||
var utils = module.exports = {}; | ||
utils.arrayify = function(arr) { | ||
@@ -24,0 +13,0 @@ return !Array.isArray(arr) ? [arr] : _.compact(arr); |
{ | ||
"name": "delims", | ||
"description": "Generate RegExp for delimiters, to be used with templates, files or data streams.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/jonschlinkert/delims", | ||
@@ -28,10 +28,7 @@ "author": { | ||
"devDependencies": { | ||
"globule": "~0.2.0", | ||
"fs-utils": "~0.1.11", | ||
"chai": "~1.8.1", | ||
"mocha": "~1.17.1" | ||
"chai": "~1.9.1", | ||
"mocha": "~1.18.2" | ||
}, | ||
"dependencies": { | ||
"lodash": "~2.4.1", | ||
"fs-utils": "~0.1.11" | ||
"lodash": "~2.4.1" | ||
}, | ||
@@ -38,0 +35,0 @@ "keywords": [ |
@@ -1,20 +0,13 @@ | ||
/* | ||
* delims | ||
* https://github.com/jonschlinkert/delims | ||
/*! | ||
* delims <https://github.com/jonschlinkert/delims> | ||
* | ||
* Copyright (c) 2014 Jon Schlinkert | ||
* Copyright (c) 2014 Jon Schlinkert, contributors | ||
* Licensed under the MIT license. | ||
*/ | ||
'use strict'; | ||
const util = require('util'); | ||
const expect = require('chai').expect; | ||
const delims = require('../'); | ||
// Node.js | ||
var util = require('util'); | ||
// node_modules | ||
var expect = require('chai').expect; | ||
// Local libs | ||
var delims = require('../'); | ||
describe('create delims:', function () { | ||
@@ -21,0 +14,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
-50%2
-50%0
-100%13626
-1.37%164
-6.82%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed