sourcecrop
v1.0.7
Published
sc - cat functions out of source code with autocomplete
Downloads
6
Readme
SC - spirit catcher
Bring forth towards you all that you seek. Attract the items you desire. Select the code, functions, and more from all your sources. jq, for code.
AKA Source Crop
Cat functions from files with autocomplete
Use with | less -R
to page output while preserving colors.
$ npm i -g sourcecrop@latest
What is sc
?
It's perfect for:
- Quickly navigating through large projects.
- Isolating and selecting specific code blocks.
- Reviewing or refactoring targeted parts of your code with precision.
SC is designed to (eventually) let you traverse code the same way jq slices JSON, with similar flexibility and power. Right now it just supports autcomplete through functions of JavaScript files in latest ECMAScript ESM syntax.
Usage Example
Or target specific functions or blocks:
sc <file.js> [press tab for autocomplete of function names]
Roadmap
- Add support for languages other than the latest JavaScript ESM syntax.
- Correct -listCallers, -listCallees, calls- and by- implementations.
- Add some syntax (?) for other parts like: branches, definitions, but avoid stuff that could be done easily with grep.
Contribs
Yes please!