Proposal: include support for plugins
See original GitHub issueIt would be nice to support user-definable plugins, i.e. “Phone Number”
Something like:
const myRegex = SuperExpressive({ plugins: [ phoneNumber ] })
.startOfInput
.optional.string('0x')
.capture
.exactly(4).group
.plugin.phoneNumber()
.newline
.end()
.end()
.endOfInput
.toRegex();
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:6 (3 by maintainers)
Top Results From Across the Web
5 WordPress Proposal Plugins and Tools Designed to Help ...
Fortunately, there are several available worth considering, including some WordPress proposal plugins. We've explored five of them below.
Read more >Add support for global plugins/universal addons #831 - GitHub
Add support for global plugins/universal addons #831 ... Describe how your proposal will work, with code, pseudocode, mockups, ...
Read more >WP Proposals – WordPress plugin
Beautiful, simple free WordPress proposal software. ... you create stunning professional proposals that will help you and your sales team land dream deals....
Read more >How to Write Proposals for WordPress Projects - WPMU Dev
#1. Proposify. Proposify has 50+ proposal templates including the ones for WordPress development and support projects. Because Proposify offers ...
Read more >babel/plugin-proposal-class-properties not being picked up ...
I am trying to incorporate React Native Calendars into my React webapp. I have run npm install --save react-native-calendars.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jcao219 @floriancargoet @puf17640 I’ve added support for subexpression based modularity in PR #17. It was kind of tricky, but I think I managed to get something that behaves sensibly in a flexible way, and hopefully still quite easy to use.
I’ve written a set of tests which outline the edge cases I could think of. If you notice more, or have an other kinds of feedback, please let me know. I’ll keep the PR open for a little while.
Interesting idea! I’ve been thinking a bit about how this could work, and there would be some challenges
In merging two SuperExpressive instances, as @floriancargoet mentioned, you would have to address some sticking points.
With a plugin based architecture, there would be similar kinds of concerns I imagine that the plugin would be an extension of another class like
SuperExpressivePlugin
, which would provide a (perhaps more limited) interface. That limited interface might even allow the plugin author to describe that they’d like to modify a flag, or create an explicit capture group namespace, etc.Personally I’m more inclined to go with merging SuperExpressive instances, because that would allow people to very easily organise their own code in a modular way, and one interface to maintain is always better than 2!