New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

braces

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braces

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.

3.0.3
latest
Source
npm
Version published
Weekly downloads
65M
-16.42%
Maintainers
4
Weekly downloads
 
Created

What is braces?

The braces npm package is a library for expanding braces in a string, similar to how shells like bash perform brace expansion. It is used to generate permutations of strings based on patterns with braces, which is useful for file globbing, configuration, and other tasks where such patterns are needed.

What are braces's main functionalities?

Brace Expansion

Expands a pattern with comma-separated values inside braces into an array of strings.

"{a,b,c}d" -> ['ad', 'bd', 'cd']

Sequence Expansion

Expands a pattern with numerical sequences inside braces into an array of strings.

"{1..3}d" -> ['1d', '2d', '3d']

Nested Expansion

Expands a pattern with nested braces into an array of strings.

"{a,{b,c}d}e" -> ['ae', 'bde', 'cde']

Other packages similar to braces

Keywords

alpha

FAQs

Package last updated on 21 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts