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 19, 2024 via pnpm

brace-expansion 1.1.11

Brace expansion as known from sh/bash
Package summary
Share
0
issues
1
license
3
MIT
Package created
13 Oct 2013
Version published
10 Feb 2018
Maintainers
2
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

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
3 Packages, Including:
balanced-match@1.0.2
brace-expansion@1.1.11
concat-map@0.0.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

2
All Dependencies CSV
β“˜ This is a list of brace-expansion 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
balanced-match1.0.22.61 kBMIT
prod
concat-map0.0.12.21 kBMIT
prod

Visualizations

Frequently Asked Questions

What does brace-expansion do?

Brace-expansion is a powerful JavaScript tool that parallels the functionality of brace expansion in shell/bash. Its primary function is to generate an array of all valid and possible expansions of a given string. If no expansions are found, it returns an array containing the original string. The brace-expansion tool supports a range of valid expansions including comma-separated lists of options, numeric sequences, and alphabetic sequences. It is designed for compatibility and does not allow the string "${" for brace expansion.

How do you use brace-expansion?

To make use of the brace-expansion tool in your JavaScript code, you need to require it in your program as follows: var expand = require('brace-expansion');. To then carry out a brace expansion, you call the expand function with your string as the argument. For example, to expand a string representing a range of filenames, you may write expand('file-{a,b,c}.jpg'). This will return an array as follows: ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'].

Here are some more examples:

expand('-v{,,}') // returns ['-v', '-v', '-v']
expand('file{0..2}.jpg') // returns ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg') // returns ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg') // returns ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg') // returns ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg') // returns ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg') //returns ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}') // returns ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}') // returns ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']

Where are the brace-expansion docs?

For more information on using brace-expansion, including its API and installation instructions, refer to the documentation on the GitHub repository at git://github.com/juliangruber/brace-expansion.git. The 'README' file contained within the repository provides a comprehensive overview of brace-expansion's functionalities, usage examples, and more.