pinojs / quick-format-unescaped

Solves a problem with util.format
MIT License
17 stars 13 forks source link

What's different between quick-format-unescaped and quick-format #10

Closed fengmk2 closed 7 years ago

fengmk2 commented 7 years ago

They're using the same git repo https://github.com/davidmarkclements/quick-format.

mcollina commented 7 years ago

This is quick-format-unescaped: https://github.com/davidmarkclements/quick-format/tree/unescaped.

davidmarkclements commented 7 years ago

@fengmk2 the point of quick-format-unescaped is for situations where you want to interpolate without escaping (because escaping will happen at some higher point)

this prevents double escaping - rolling it as a separate module (rather than using an option) was necessary because the option check would have caused performance degradation - we're at the maximum amount of logical paths (e.g. conditional checks) before V8 will bail on inlining the function