{
    "content": [
        {
            "type": "text",
            "text": "# jsesc (man)\n\n## NAME\n\njsesc — escape strings for use in JavaScript string literals\n\n## SYNOPSIS\n\njsesc [-s | --single-quotes string]\n[-d | --double-quotes string]\n[-w | --wrap string]\n[-e | --escape-everything string]\n[-6 | --es6 string]\n[-l | --lowercase-hex string]\n[-j | --json string]\n[-p | --object string]\n[-p | --pretty string]\n[-v | --version]\n[-h | --help]\n\n## DESCRIPTION\n\njsesc  escapes  strings  for  use in JavaScript string literals while generating the shortest\npossible valid ASCII-only output.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (11 subsections)\n- **EXIT STATUS**\n- **EXAMPLES** (2 subsections)\n- **BUGS**\n- **AUTHOR**\n- **WWW**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "jsesc",
        "section": "",
        "mode": "man",
        "summary": "jsesc — escape strings for use in JavaScript string literals",
        "synopsis": "jsesc [-s | --single-quotes string]\n[-d | --double-quotes string]\n[-w | --wrap string]\n[-e | --escape-everything string]\n[-6 | --es6 string]\n[-l | --lowercase-hex string]\n[-j | --json string]\n[-p | --object string]\n[-p | --pretty string]\n[-v | --version]\n[-h | --help]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-s",
                "long": "--single-quotes",
                "arg": null,
                "description": "Escape any occurrences of ' in the input string as \\', so that the output can be used in a JavaScript string literal wrapped in single quotes."
            },
            {
                "flag": "-d",
                "long": "--double-quotes",
                "arg": null,
                "description": "Escape any occurrences of \" in the input string as \\\", so that the output can be used in a JavaScript string literal wrapped in double quotes."
            },
            {
                "flag": "-w",
                "long": "--wrap",
                "arg": null,
                "description": "Make sure the output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified using the -s | --single-quotes or -d | --double-quotes settings."
            },
            {
                "flag": "-6",
                "long": "--es6",
                "arg": null,
                "description": "Escape any astral Unicode symbols using ECMAScript 6 Unicode code point escape sequences."
            },
            {
                "flag": "-e",
                "long": "--escape-everything",
                "arg": null,
                "description": "Escape all the symbols in the output, even printable ASCII symbols."
            },
            {
                "flag": "-j",
                "long": "--json",
                "arg": null,
                "description": "Make sure the output is valid JSON. Hexadecimal character escape sequences and the \\v or \\0 escape sequences will not be used. Setting this flag enables the -d | --double-quotes and -w | --wrap settings."
            },
            {
                "flag": "-o",
                "long": "--object",
                "arg": null,
                "description": "Treat the input as a JavaScript object rather than a string. Accepted values are flat arrays containing only string values, and flat objects containing only string values."
            },
            {
                "flag": "-p",
                "long": "--pretty",
                "arg": null,
                "description": "Pretty-print the output for objects, using whitespace to make it more readable. Setting this flag enables the"
            },
            {
                "flag": "-l",
                "long": "--lowercase-hex",
                "arg": null,
                "description": "Use lowercase for alphabetical hexadecimal digits in escape sequences. -o | --object set‐ ting."
            },
            {
                "flag": "-v",
                "long": "--version",
                "arg": null,
                "description": "Print jsesc's version."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Show the help screen."
            }
        ],
        "examples": [
            "Print an escaped version of the given string.",
            "Print an escaped version of the string that gets piped in."
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-s, --single-quotes",
                        "lines": 3,
                        "flag": "-s",
                        "long": "--single-quotes"
                    },
                    {
                        "name": "-d, --double-quotes",
                        "lines": 3,
                        "flag": "-d",
                        "long": "--double-quotes"
                    },
                    {
                        "name": "-w, --wrap",
                        "lines": 3,
                        "flag": "-w",
                        "long": "--wrap"
                    },
                    {
                        "name": "-6, --es6",
                        "lines": 2,
                        "flag": "-6",
                        "long": "--es6"
                    },
                    {
                        "name": "-e, --escape-everything",
                        "lines": 2,
                        "flag": "-e",
                        "long": "--escape-everything"
                    },
                    {
                        "name": "-j, --json",
                        "lines": 4,
                        "flag": "-j",
                        "long": "--json"
                    },
                    {
                        "name": "-o, --object",
                        "lines": 3,
                        "flag": "-o",
                        "long": "--object"
                    },
                    {
                        "name": "-p, --pretty",
                        "lines": 3,
                        "flag": "-p",
                        "long": "--pretty"
                    },
                    {
                        "name": "-l, --lowercase-hex",
                        "lines": 3,
                        "flag": "-l",
                        "long": "--lowercase-hex"
                    },
                    {
                        "name": "-v, --version",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--version"
                    },
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "jsesc 'foo bar baz'",
                        "lines": 2
                    },
                    {
                        "name": "echo 'foo bar baz' | jsesc",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "WWW",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "jsesc — escape strings for use in JavaScript string literals\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "jsesc [-s | --single-quotes string]\n[-d | --double-quotes string]\n[-w | --wrap string]\n[-e | --escape-everything string]\n[-6 | --es6 string]\n[-l | --lowercase-hex string]\n[-j | --json string]\n[-p | --object string]\n[-p | --pretty string]\n[-v | --version]\n[-h | --help]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "jsesc  escapes  strings  for  use in JavaScript string literals while generating the shortest\npossible valid ASCII-only output.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-s, --single-quotes",
                        "content": "Escape any occurrences of ' in the input string as \\', so that the output can be  used  in  a\nJavaScript string literal wrapped in single quotes.\n",
                        "flag": "-s",
                        "long": "--single-quotes"
                    },
                    {
                        "name": "-d, --double-quotes",
                        "content": "Escape  any  occurrences  of \" in the input string as \\\", so that the output can be used in a\nJavaScript string literal wrapped in double quotes.\n",
                        "flag": "-d",
                        "long": "--double-quotes"
                    },
                    {
                        "name": "-w, --wrap",
                        "content": "Make sure the output is a valid JavaScript string literal wrapped  in  quotes.  The  type  of\nquotes can be specified using the -s | --single-quotes or -d | --double-quotes settings.\n",
                        "flag": "-w",
                        "long": "--wrap"
                    },
                    {
                        "name": "-6, --es6",
                        "content": "Escape any astral Unicode symbols using ECMAScript 6 Unicode code point escape sequences.\n",
                        "flag": "-6",
                        "long": "--es6"
                    },
                    {
                        "name": "-e, --escape-everything",
                        "content": "Escape all the symbols in the output, even printable ASCII symbols.\n",
                        "flag": "-e",
                        "long": "--escape-everything"
                    },
                    {
                        "name": "-j, --json",
                        "content": "Make  sure  the output is valid JSON. Hexadecimal character escape sequences and the \\v or \\0\nescape sequences will not be used. Setting this flag enables the -d | --double-quotes and  -w\n| --wrap settings.\n",
                        "flag": "-j",
                        "long": "--json"
                    },
                    {
                        "name": "-o, --object",
                        "content": "Treat  the input as a JavaScript object rather than a string. Accepted values are flat arrays\ncontaining only string values, and flat objects containing only string values.\n",
                        "flag": "-o",
                        "long": "--object"
                    },
                    {
                        "name": "-p, --pretty",
                        "content": "Pretty-print the output for objects, using whitespace to make it more readable. Setting  this\nflag enables the\n",
                        "flag": "-p",
                        "long": "--pretty"
                    },
                    {
                        "name": "-l, --lowercase-hex",
                        "content": "Use  lowercase  for  alphabetical hexadecimal digits in escape sequences.  -o | --object set‐\nting.\n",
                        "flag": "-l",
                        "long": "--lowercase-hex"
                    },
                    {
                        "name": "-v, --version",
                        "content": "Print jsesc's version.\n",
                        "flag": "-v",
                        "long": "--version"
                    },
                    {
                        "name": "-h, --help",
                        "content": "Show the help screen.\n",
                        "flag": "-h",
                        "long": "--help"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "The jsesc utility exits with one of the following values:\n\n0     jsesc successfully escaped the given string and printed the result.\n1     jsesc wasn't instructed to escape anything (for example, the --help flag was set);  or,\nan error occurred.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "jsesc 'foo bar baz'",
                        "content": "Print an escaped version of the given string.\n"
                    },
                    {
                        "name": "echo 'foo bar baz' | jsesc",
                        "content": "Print an escaped version of the string that gets piped in.\n"
                    }
                ]
            },
            "BUGS": {
                "content": "jsesc's bug tracker is located at <https://github.com/mathiasbynens/jsesc/issues>.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Mathias Bynens <https://mathiasbynens.be/>\n",
                "subsections": []
            },
            "WWW": {
                "content": "<https://mths.be/jsesc>\n\nMay 13, 2016                                    jsesc(1)",
                "subsections": []
            }
        }
    }
}