DEV Community

Discussion on: Point-free gotchas in JavaScript

Collapse
 
coatesap profile image
Andy Coates

'Fix B' from above could be expressed slightly more elegantly as:

// Fix B - binding
const isActivationCodePointFree = RegExp.prototype.test.bind(/^\d{4}-\d{4}-\d{4}$/);