Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

comby-helper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comby-helper

Wrapper around CLI tool [Comby](https://github.com/comby-tools/comby). Comby is a tool for searching and changing code structure

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Comby Helper

Wrapper around CLI tool Comby. Comby is a tool for searching and changing code structure

Quckstart

Install Comby manually https://comby.dev/docs/get-started

  1. Run Comby Helper CLI
npx comby-helper
  1. Inside of interactive CLI create new pattern
init test

.comby_rules/test.toml file will be created

  1. Edit it
[pattern]

match='''swap(:[1], :[2])'''

rewrite='''swap(:[2], :[1])'''

rule='where true'
  1. Dry run (to test rule).

Create src folder and add test file to it (somefile.js)

swap(x, y)

Return to interactive console. First argument is a target folder. Second argument is a rule name.

dry-run ./src test # or d ./src test
  1. If everything is OK - apply this rule by calling
apply ./src test # or a ./src test

Every file will be changed automatically.

Additional Options

To filter files by extensions add -x option

a ./src test -x .js,.ts,.jsx,.tsx

To exlude folders add -e option

a ./src test -e vendor,node_modules,test

Documentation

Plz refer to official comby docs https://comby.dev/docs/overview

FAQs

Package last updated on 16 Aug 2021

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