IvanFon / super-labeler-action

A superpowered issue and pull request labeler for Github Actions.
GNU General Public License v3.0
22 stars 12 forks source link

Refactor processRegExpPattern #17

Closed jbinda closed 4 years ago

jbinda commented 4 years ago

During last work with the repo I have looked on processRegexp(pattern) function and... decide to refactor it. It should be more clear now. We can refactor it more by replacig below line

const [source ,flags] = (matchDelimiters || []).slice(1);

to

const [,source ,flags] = matchDelimiters || [];

but I don't have strong opinion about this. What version do you like more ?

IvanFon commented 4 years ago

Wow, it's much shorter!

I think I prefer: const [, source, flags] = matchDelimiters || [];

jbinda commented 4 years ago

Changed !