ExodusMovement / schemasafe

A reasonably safe JSON Schema validator with draft-04/06/07/2019-09/2020-12 support.
https://npmjs.com/@exodus/schemasafe
MIT License
161 stars 12 forks source link

Stringify regex to new RegExp(...) #47

Closed ChALkeR closed 4 years ago

ChALkeR commented 4 years ago

After #46.

Otherwise wrong stringification can happen on Node.js 10 and below.

Demo (for old behavior): console.log(String(new RegExp('\n'))).

kklash commented 4 years ago

Rebased