You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

braces

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braces

Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.

2.1.0
Source
npmnpm
Version published
Weekly downloads
102M
6.68%
Maintainers
3
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 26 Apr 2017

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