Huge News!Announcing our $40M Series B led by Abstract Ventures.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
  • Socket score

Version published
Weekly downloads
79M
increased by0.22%
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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc