Comparing version 0.1.2 to 0.1.3
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
2
0
13626
164
- Removedfs-utils@~0.1.11
- Removedargparse@0.1.16(transitive)
- Removedasync@0.2.10(transitive)
- Removedesprima@1.0.4(transitive)
- Removedfs-utils@0.1.11(transitive)
- Removedglob@3.2.11(transitive)
- Removedglobule@0.2.0(transitive)
- Removediconv-lite@0.2.11(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjs-yaml@3.0.2(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedminimatch@0.2.140.3.0(transitive)
- Removedmkdirp@0.3.5(transitive)
- Removedrimraf@2.2.8(transitive)
- Removedsigmund@1.0.1(transitive)
- Removedunderscore@1.7.0(transitive)
- Removedunderscore.string@2.4.0(transitive)