Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nanomatch

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nanomatch - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

4

lib/compilers.js

@@ -18,2 +18,3 @@ 'use strict';

*/
.set('not', function(node) {

@@ -210,3 +211,4 @@ var prev = this.prev();

if (parsed && type !== 'slash' && type !== 'bos') {
var isInside = node.isInside.paren || node.isInside.brace;
if (parsed && type !== 'slash' && type !== 'bos' && !isInside) {
val = star;

@@ -213,0 +215,0 @@ } else {

@@ -36,3 +36,3 @@ 'use strict';

.capture('bos', function() {
.capture('prefix', function() {
if (this.parsed) return;

@@ -42,3 +42,2 @@ var pos = this.position();

if (!m) return;
this.state.strictOpen = !!this.options.strictOpen;

@@ -178,6 +177,11 @@ this.state.addPrefix = true;

if (this.input.slice(0, 4) === '/**/') {
while (this.input.slice(0, 4) === '/**/') {
this.input = this.input.slice(3);
}
node.isInside = {
brace: this.isInside('brace'),
paren: this.isInside('paren')
};
if (type === 'globstar') {

@@ -184,0 +188,0 @@ this.state.globstar = true;

@@ -155,13 +155,15 @@ 'use strict';

/**
* Combines duplicate characters in the provided string.
* @param {String} `str`
* Combines duplicate characters in the provided `input` string.
* @param {String} `input`
* @returns {String}
*/
utils.combineDuplicates = function(str, val) {
if (typeof val === 'string') {
var re = new RegExp('(' + val + ')(?=(?:' + val + ')*\\1)', 'g');
return str.replace(re, '');
}
return str.replace(/(.)(?=.*\1)/g, '');
utils.combineDupes = function(input, patterns) {
patterns = utils.arrayify(patterns).join('|').split('|');
patterns = patterns.map(function(s) {
return s.replace(/\\?([+*\\/])/g, '\\$1');
});
var substr = patterns.join('|');
var regex = new RegExp('(' + substr + ')(?=\\1)', 'g');
return input.replace(regex, '');
};

@@ -168,0 +170,0 @@

{
"name": "nanomatch",
"description": "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)",
"version": "1.2.6",
"version": "1.2.7",
"homepage": "https://github.com/micromatch/nanomatch",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

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