Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 30, 2024 via pnpm

braces 1.5.0

Fastest brace expansion for node.js, with more complete support of Bash 4.3 than minimatch.
Package summary
Share
4
issues
4
low severity
vulnerability
4
1
license
17
MIT
Package created
20 Oct 2014
Version published
28 Jan 2015
Maintainers
3
Total deps
17
Direct deps
4
License
MIT

Issues

4

4 low severity issues

low
Recommendation: Upgrade to version 2.3.1 or later
via: braces@1.5.0
Recommendation: Upgrade to version 2.3.1 or later
via: braces@1.5.0
Recommendation: Upgrade to version 2.3.1 or later
via: braces@1.5.0
Recommendation: Upgrade to version 2.3.1 or later
via: braces@1.5.0
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
17 Packages, Including:
arr-filter@1.1.2
braces@1.5.0
expand-range@1.8.2
fill-range@2.2.4
is-buffer@1.1.6
is-number@2.1.0
is-number@4.0.0
isarray@1.0.0
isobject@2.1.0
kind-of@3.2.2
kind-of@6.0.3
make-iterator@1.0.1
math-random@1.0.4
preserve@0.2.0
randomatic@3.1.1
repeat-element@1.1.4
repeat-string@1.6.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of braces 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
arr-filter1.1.22.72 kBMIT
prod
expand-range1.8.23.17 kBMIT
prod
preserve0.2.03.63 kBMIT
prod
repeat-element1.1.42.36 kBMIT
prod

Visualizations

Frequently Asked Questions

What does braces do?

Braces is a JavaScript library that implements Bash-like brace expansion. This library enables users to safely generate and match brace patterns. It offers complete support for the Bash 4.3 braces specification and is designed to be fast and efficient without compromising on safety. This makes it an ideal choice when dealing with brace patterns in JavaScript, as it can prevent aggressive or malicious brace patterns from breaking your application, such as those that could be used for DDoS attacks.

How do you use braces?

You can use the braces library by first installing it with npm using the following command: npm install --save braces. Once installed, you can require it in your JavaScript file and use it like so:

const braces = require('braces');

console.log(braces(['{01..05}', '{a..e}']));
//=> ['(0[1-5])', '([a-e])']

console.log(braces(['{01..05}', '{a..e}'], { expand: true }));
//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e']

The main export is a function that takes one or more brace 'patterns' and 'options'. By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. You can set the expand option to true if you want to enable brace expansion, which returns an array similar to what you'd expect from Bash. Additionally, it supports lists (aka "sets"), sequences (aka "ranges"), steps (aka "increments"), and escaping.

Where are the braces docs?

The official documentation for the braces library is in its README file, which is available on the project's GitHub page. You can visit the URL git+https://github.com/micromatch/braces.git to access the complete documentation. This includes detailed explanations on the use of the brace library, its options and different use-cases it supports, performance considerations, among others.