js-string-escape (npm): Escape strings for use as JavaScript string literals
Keywords: string|escape|backslash|javascript|ecmascript