var_representation 0.1.1

A compact, more readable alternative to var_export.


var_representation is a compact alternative to var_export that properly escapes control characters

License: BSD-3-Clause

Changes

* Optimize escaping single quoted strings
* Add a new flag VAR_REPRESENTATION_UNESCAPED to always encode strings as single quoted strings without escaping control characters.
This may be useful when the result of var_representation is escaped again before being rendered (e.g. json encoding),
or when a short representation is desired.