Socket
Socket
Sign inDemoInstall

braces

Package Overview
Dependencies
61
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.3.2

7

index.js

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

var extend = require('extend-shallow');
var define = require('define-property');

@@ -159,3 +158,7 @@ /**

define(arr, 'result', result);
Object.defineProperty(arr, 'result', {
enumerable: false,
value: result
});
return arr;

@@ -162,0 +165,0 @@ }

'use strict';
var typeOf = require('kind-of');
var define = require('define-property');
var extend = require('extend-shallow');

@@ -41,3 +39,3 @@ var Snapdragon = require('snapdragon');

define(this.snapdragon, 'parse', function(pattern, options) {
utils.define(this.snapdragon, 'parse', function(pattern, options) {
var parsed = Snapdragon.prototype.parse.apply(this, arguments);

@@ -52,3 +50,3 @@ this.parser.ast.input = pattern;

function addParent(node, parent) {
define(node, 'parent', parent);
utils.define(node, 'parent', parent);
parent.nodes.push(node);

@@ -58,3 +56,3 @@ }

// add non-enumerable parser reference
define(parsed, 'parser', this.parser);
utils.define(parsed, 'parser', this.parser);
return parsed;

@@ -69,3 +67,3 @@ });

Braces.prototype.parse = function(ast, options) {
if (typeOf(ast) === 'object' && ast.nodes) return ast;
if (ast && typeof ast === 'object' && ast.nodes) return ast;
this.init(options);

@@ -72,0 +70,0 @@ return this.snapdragon.parse(ast, options);

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

var pos = this.position();
var m = this.match(/^(?:\[([!^]?)([^\]]{2,}|\]\-)(\]|[^*+?]+)|\[)/);
var m = this.match(/^(?:\[([!^]?)([^\]]{2,}|\]-)(\]|[^*+?]+)|\[)/);
if (!m) return;

@@ -282,3 +282,3 @@

var pos = this.position();
var m = this.match(/^((?!\\)[^${}\[\]])+/);
var m = this.match(/^((?!\\)[^${}[\]])+/);
if (!m) return;

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

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

utils.define = require('define-property');
utils.extend = require('extend-shallow');

@@ -19,2 +18,11 @@ utils.flatten = require('arr-flatten');

utils.define = function(obj, key, val) {
Object.defineProperty(obj, key, {
writable: true,
configurable: true,
enumerable: false,
value: val
});
};
/**

@@ -336,3 +344,3 @@ * Returns true if the given string contains only empty brace sets.

utils.escapeRegex = function(str) {
return str.replace(/\\?([!^*?()\[\]{}+?/])/g, '\\$1');
return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1');
};
{
"name": "braces",
"description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.",
"version": "2.3.1",
"version": "2.3.2",
"homepage": "https://github.com/micromatch/braces",

@@ -34,7 +34,5 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"array-unique": "^0.3.2",
"define-property": "^1.0.0",
"extend-shallow": "^2.0.1",
"fill-range": "^4.0.0",
"isobject": "^3.0.1",
"kind-of": "^6.0.2",
"repeat-element": "^1.1.2",

@@ -41,0 +39,0 @@ "snapdragon": "^0.8.1",

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