
Grasp – JavaScript structural search, replace, and refactor - nailer
http://www.graspjs.com/
======
nikita2206
SSR (structural search and replace) is one of the greatest but overlooked
features of IntelliJ. It helps with refactorings a lot

~~~
crispinb
I was going to make the same comment. It's amazing how often I see
enthusiastic reports on new tools whose equivalent has been just a keyboard
shortcut away in IntelliJ for years.

Maybe I should add a c2.com wiki page for 'SmugIntelliJWeenie'

------
nobleach
I played around with jscodeshift and ASTExplorer a few weekends ago. I found
it to be fairly opaque. All I was hoping to do was remove a wrapping function
and replace it with its child/children. The documentation for jscodeshift is
fairly rudimentary. I had high hopes of creating examples and submitting them
as PRs... but alas, a weekend is only so long. Perhaps this weekend will have
me giving it another shot with this tool.

------
nailer
I've been able to use this for some basic stuff like renames, but still trying
to work on a way to convert old style string concats:

    
    
        'foo'+bar+'baz'
    

to current JS template literals:

    
    
        `foo${bar}baz`
    

If you do it first, let me know! Otherwise I'll throw mine on npm.

------
travmatt
I remember running across this when I was researching jscodeshift, though that
seems to have a steeper learning curve.

------
saas_co_de
Exciting tool. I look forward to working with it.

------
iovrthoughtthis
This is honestly great.

------
souenzzo
It's funny to see how many tools a non-lisp programmer needs...

~~~
ken
Lisp programmer here. This seems genuinely useful, in all languages.

Can you describe how you'd do their examples (like "find the word 'remote',
but only when used as an identifier") in Lisp?

------
angel_j
npm star grasp

~~~
angel_j
haters

