react-sourcerer

by iammerrick

iammerrick /react-sourcerer

A React based code pattern matching library.

130 Stars 4 Forks Last release: Not found 20 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

react-sourcerer

This project allows you to express code patterns in the form of React components.

This is a very experimental project. Currently, this project is under heavy development but a lot can be understood from the tests.

Example

For example the following will match code that:

  1. Imports from 'lodash'
  2. Calls forEach on any identifier imported from lodash.
{imports => 
  
    {(matches) => 
      matches.length > 0
        ? 
        : null}
  
}

Of course the patterns can be as sophisticated as you'd like them to be, and because React is awesome you can even observe changes in the code (componentDidUpdate).

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.