jsesc-no-undef (npm): Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.
Keywords: buffer|escape|javascript|json|map|set|string|stringify|tool|ascii-safe|code-generation|ecmascript|escape-sequences|unicode