{
  "manifest": {
    "name": "jsesc",
    "version": "0.5.0",
    "description": "A JavaScript library for escaping JavaScript strings while generating the shortest possible valid output.",
    "homepage": "http://mths.be/jsesc",
    "main": "jsesc.js",
    "bin": {
      "jsesc": "bin/jsesc"
    },
    "man": [
      "man/jsesc.1"
    ],
    "keywords": [
      "string",
      "escape",
      "javascript",
      "tool"
    ],
    "licenses": [
      {
        "type": "MIT",
        "url": "http://mths.be/mit"
      }
    ],
    "author": {
      "name": "Mathias Bynens",
      "url": "http://mathiasbynens.be/"
    },
    "repository": {
      "type": "git",
      "url": "https://github.com/mathiasbynens/jsesc.git"
    },
    "bugs": {
      "url": "https://github.com/mathiasbynens/jsesc/issues"
    },
    "files": [
      "LICENSE-MIT.txt",
      "jsesc.js",
      "bin/",
      "man/"
    ],
    "scripts": {
      "test": "node tests/tests.js"
    },
    "devDependencies": {
      "coveralls": "^2.10.0",
      "grunt": "^0.4.5",
      "grunt-shell": "^0.7.0",
      "grunt-template": "^0.2.3",
      "istanbul": "^0.3.0",
      "qunit-extras": "^1.2.0",
      "qunitjs": "~1.11.0",
      "regenerate": "^0.6.2",
      "requirejs": "^2.1.14"
    },
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-jsesc-0.5.0-e7dee66e35d6fc16f710fe91d5cf69f70f08911d-integrity/node_modules/jsesc/package.json",
    "readmeFilename": "README.md",
    "readme": "# jsesc [![Build status](https://travis-ci.org/mathiasbynens/jsesc.svg?branch=master)](https://travis-ci.org/mathiasbynens/jsesc) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/jsesc/master.svg)](https://coveralls.io/r/mathiasbynens/jsesc) [![Dependency status](https://gemnasium.com/mathiasbynens/jsesc.svg)](https://gemnasium.com/mathiasbynens/jsesc)\n\nThis is a JavaScript library for [escaping JavaScript strings](http://mathiasbynens.be/notes/javascript-escapes) while generating the shortest possible valid ASCII-only output. [Here’s an online demo.](http://mothereff.in/js-escapes)\n\nThis can be used to avoid [mojibake](http://en.wikipedia.org/wiki/Mojibake) and other encoding issues, or even to [avoid errors](https://twitter.com/annevk/status/380000829643571200) when passing JSON-formatted data (which may contain U+2028 LINE SEPARATOR, U+2029 PARAGRAPH SEPARATOR, or [lone surrogates](http://esdiscuss.org/topic/code-points-vs-unicode-scalar-values#content-14)) to a JavaScript parser or an UTF-8 encoder, respectively.\n\nFeel free to fork if you see possible improvements!\n\n## Installation\n\nVia [Bower](http://bower.io/):\n\n```bash\nbower install jsesc\n```\n\nVia [Component](https://github.com/component/component):\n\n```bash\ncomponent install mathiasbynens/jsesc\n```\n\nVia [npm](http://npmjs.org/):\n\n```bash\nnpm install jsesc\n```\n\nIn a browser:\n\n```html\n<script src=\"jsesc.js\"></script>\n```\n\nIn [Node.js](http://nodejs.org/) and [RingoJS](http://ringojs.org/):\n\n```js\nvar jsesc = require('jsesc');\n```\n\nIn [Narwhal](http://narwhaljs.org/):\n\n```js\nvar jsesc = require('jsesc').jsesc;\n```\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('jsesc.js');\n```\n\nUsing an AMD loader like [RequireJS](http://requirejs.org/):\n\n```js\nrequire(\n  {\n    'paths': {\n      'jsesc': 'path/to/jsesc'\n    }\n  },\n  ['jsesc'],\n  function(jsesc) {\n    console.log(jsesc);\n  }\n);\n```\n\n## API\n\n### `jsesc(value, options)`\n\nThis function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in JavaScript strings](http://mathiasbynens.be/notes/javascript-escapes). The first supported value type is strings:\n\n```js\njsesc('Ich ♥ Bücher');\n// → 'Ich \\\\u2665 B\\\\xFCcher'\n\njsesc('foo 𝌆 bar');\n// → 'foo \\\\uD834\\\\uDF06 bar'\n```\n\nInstead of a string, the `value` can also be an array, or an object. In such cases, `jsesc` will return a stringified version of the value where any characters that are not printable ASCII symbols are escaped in the same way.\n\n```js\n// Escaping an array\njsesc([\n  'Ich ♥ Bücher', 'foo 𝌆 bar'\n]);\n// → '[\\'Ich \\\\u2665 B\\\\xFCcher\\',\\'foo \\\\uD834\\\\uDF06 bar\\']'\n\n// Escaping an object\njsesc({\n  'Ich ♥ Bücher': 'foo 𝌆 bar'\n});\n// → '{\\'Ich \\\\u2665 B\\\\xFCcher\\':\\'foo \\\\uD834\\\\uDF06 bar\\'}'\n```\n\nThe optional `options` argument accepts an object with the following options:\n\n#### `quotes`\n\nThe default value for the `quotes` option is `'single'`. This means that any occurences of `'` in the input string will be escaped as `\\'`, so that the output can be used in a string literal wrapped in single quotes.\n\n```js\njsesc('Lorem ipsum \"dolor\" sit \\'amet\\' etc.');\n// → 'Lorem ipsum \"dolor\" sit \\\\\\'amet\\\\\\' etc.'\n\njsesc('Lorem ipsum \"dolor\" sit \\'amet\\' etc.', {\n  'quotes': 'single'\n});\n// → 'Lorem ipsum \"dolor\" sit \\\\\\'amet\\\\\\' etc.'\n// → \"Lorem ipsum \\\"dolor\\\" sit \\\\'amet\\\\' etc.\"\n```\n\nIf you want to use the output as part of a string literal wrapped in double quotes, set the `quotes` option to `'double'`.\n\n```js\njsesc('Lorem ipsum \"dolor\" sit \\'amet\\' etc.', {\n  'quotes': 'double'\n});\n// → 'Lorem ipsum \\\\\"dolor\\\\\" sit \\'amet\\' etc.'\n// → \"Lorem ipsum \\\\\\\"dolor\\\\\\\" sit 'amet' etc.\"\n```\n\nThis setting also affects the output for arrays and objects:\n\n```js\njsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {\n  'quotes': 'double'\n});\n// → '{\"Ich \\\\u2665 B\\\\xFCcher\":\"foo \\\\uD834\\\\uDF06 bar\"}'\n\njsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], {\n  'quotes': 'double'\n});\n// → '[\"Ich \\\\u2665 B\\\\xFCcher\",\"foo \\\\uD834\\\\uDF06 bar\"]'\n```\n\n#### `wrap`\n\nThe `wrap` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output will be a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified through the `quotes` setting.\n\n```js\njsesc('Lorem ipsum \"dolor\" sit \\'amet\\' etc.', {\n  'quotes': 'single',\n  'wrap': true\n});\n// → '\\'Lorem ipsum \"dolor\" sit \\\\\\'amet\\\\\\' etc.\\''\n// → \"\\'Lorem ipsum \\\"dolor\\\" sit \\\\\\'amet\\\\\\' etc.\\'\"\n\njsesc('Lorem ipsum \"dolor\" sit \\'amet\\' etc.', {\n  'quotes': 'double',\n  'wrap': true\n});\n// → '\"Lorem ipsum \\\\\"dolor\\\\\" sit \\'amet\\' etc.\"'\n// → \"\\\"Lorem ipsum \\\\\\\"dolor\\\\\\\" sit \\'amet\\' etc.\\\"\"\n```\n\n#### `es6`\n\nThe `es6` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, any astral Unicode symbols in the input will be escaped using [ECMAScript 6 Unicode code point escape sequences](http://mathiasbynens.be/notes/javascript-escapes#unicode-code-point) instead of using separate escape sequences for each surrogate half. If backwards compatibility with ES5 environments is a concern, don’t enable this setting. If the `json` setting is enabled, the value for the `es6` setting is ignored (as if it was `false`).\n\n```js\n// By default, the `es6` option is disabled:\njsesc('foo 𝌆 bar 💩 baz');\n// → 'foo \\\\uD834\\\\uDF06 bar \\\\uD83D\\\\uDCA9 baz'\n\n// To explicitly disable it:\njsesc('foo 𝌆 bar 💩 baz', {\n  'es6': false\n});\n// → 'foo \\\\uD834\\\\uDF06 bar \\\\uD83D\\\\uDCA9 baz'\n\n// To enable it:\njsesc('foo 𝌆 bar 💩 baz', {\n  'es6': true\n});\n// → 'foo \\\\u{1D306} bar \\\\u{1F4A9} baz'\n```\n\n#### `escapeEverything`\n\nThe `escapeEverything` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, all the symbols in the output will be escaped, even printable ASCII symbols.\n\n```js\njsesc('lolwat\"foo\\'bar', {\n  'escapeEverything': true\n});\n// → '\\\\x6C\\\\x6F\\\\x6C\\\\x77\\\\x61\\\\x74\\\\\"\\\\x66\\\\x6F\\\\x6F\\\\\\'\\\\x62\\\\x61\\\\x72'\n// → \"\\\\x6C\\\\x6F\\\\x6C\\\\x77\\\\x61\\\\x74\\\\\\\"\\\\x66\\\\x6F\\\\x6F\\\\'\\\\x62\\\\x61\\\\x72\"\n```\n\nThis setting also affects the output for arrays and objects:\n\n```js\njsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {\n  'escapeEverything': true\n});\n// → '{\\'\\x49\\x63\\x68\\x20\\u2665\\x20\\x42\\xFC\\x63\\x68\\x65\\x72\\':\\'\\x66\\x6F\\x6F\\x20\\uD834\\uDF06\\x20\\x62\\x61\\x72\\'}'\n// → \"{'\\x49\\x63\\x68\\x20\\u2665\\x20\\x42\\xFC\\x63\\x68\\x65\\x72':'\\x66\\x6F\\x6F\\x20\\uD834\\uDF06\\x20\\x62\\x61\\x72'}\"\n\njsesc([ 'Ich ♥ Bücher': 'foo 𝌆 bar' ], {\n  'escapeEverything': true\n});\n// → '[\\'\\x49\\x63\\x68\\x20\\u2665\\x20\\x42\\xFC\\x63\\x68\\x65\\x72\\',\\'\\x66\\x6F\\x6F\\x20\\uD834\\uDF06\\x20\\x62\\x61\\x72\\']'\n```\n\n#### `compact`\n\nThe `compact` option takes a boolean value (`true` or `false`), and defaults to `true` (enabled). When enabled, the output for arrays and objects will be as compact as possible; it won’t be formatted nicely.\n\n```js\njsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {\n  'compact': true // this is the default\n});\n// → '{\\'Ich \\u2665 B\\xFCcher\\':\\'foo \\uD834\\uDF06 bar\\'}'\n\njsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {\n  'compact': false\n});\n// → '{\\n\\t\\'Ich \\u2665 B\\xFCcher\\': \\'foo \\uD834\\uDF06 bar\\'\\n}'\n\njsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], {\n  'compact': false\n});\n// → '[\\n\\t\\'Ich \\u2665 B\\xFCcher\\',\\n\\t\\'foo \\uD834\\uDF06 bar\\'\\n]'\n```\n\nThis setting has no effect on the output for strings.\n\n#### `indent`\n\nThe `indent` option takes a string value, and defaults to `'\\t'`. When the `compact` setting is enabled (`true`), the value of the `indent` option is used to format the output for arrays and objects.\n\n```js\njsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {\n  'compact': false,\n  'indent': '\\t' // this is the default\n});\n// → '{\\n\\t\\'Ich \\u2665 B\\xFCcher\\': \\'foo \\uD834\\uDF06 bar\\'\\n}'\n\njsesc({ 'Ich ♥ Bücher': 'foo 𝌆 bar' }, {\n  'compact': false,\n  'indent': '  '\n});\n// → '{\\n  \\'Ich \\u2665 B\\xFCcher\\': \\'foo \\uD834\\uDF06 bar\\'\\n}'\n\njsesc([ 'Ich ♥ Bücher', 'foo 𝌆 bar' ], {\n  'compact': false,\n  'indent': '  '\n});\n// → '[\\n  \\'Ich \\u2665 B\\xFCcher\\',\\n\\  t\\'foo \\uD834\\uDF06 bar\\'\\n]'\n```\n\nThis setting has no effect on the output for strings.\n\n#### `json`\n\nThe `json` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output is valid JSON. [Hexadecimal character escape sequences](http://mathiasbynens.be/notes/javascript-escapes#hexadecimal) and [the `\\v` or `\\0` escape sequences](http://mathiasbynens.be/notes/javascript-escapes#single) will not be used. Setting `json: true` implies `quotes: 'double', wrap: true, es6: false`, although these values can still be overridden if needed — but in such cases, the output won’t be valid JSON anymore.\n\n```js\njsesc('foo\\x00bar\\xFF\\uFFFDbaz', {\n  'json': true\n});\n// → '\"foo\\\\u0000bar\\\\u00FF\\\\uFFFDbaz\"'\n\njsesc({ 'foo\\x00bar\\xFF\\uFFFDbaz': 'foo\\x00bar\\xFF\\uFFFDbaz' }, {\n  'json': true\n});\n// → '{\"foo\\\\u0000bar\\\\u00FF\\\\uFFFDbaz\":\"foo\\\\u0000bar\\\\u00FF\\\\uFFFDbaz\"}'\n\njsesc([ 'foo\\x00bar\\xFF\\uFFFDbaz', 'foo\\x00bar\\xFF\\uFFFDbaz' ], {\n  'json': true\n});\n// → '[\"foo\\\\u0000bar\\\\u00FF\\\\uFFFDbaz\",\"foo\\\\u0000bar\\\\u00FF\\\\uFFFDbaz\"]'\n\n// Values that are acceptable in JSON but aren’t strings, arrays, or object\n// literals can’t be escaped, so they’ll just be preserved:\njsesc([ 'foo\\x00bar', [1, '©', { 'foo': true, 'qux': null }], 42 ], {\n  'json': true\n});\n// → '[\"foo\\\\u0000bar\",[1,\"\\\\u00A9\",{\"foo\":true,\"qux\":null}],42]'\n// Values that aren’t allowed in JSON are run through `JSON.stringify()`:\njsesc([ undefined, -Infinity ], {\n  'json': true\n});\n// → '[null,null]'\n```\n\n**Note:** Using this option on objects or arrays that contain non-string values relies on `JSON.stringify()`. For legacy environments like IE ≤ 7, use [a `JSON` polyfill](http://bestiejs.github.io/json3/).\n\n### `jsesc.version`\n\nA string representing the semantic version number.\n\n### Using the `jsesc` binary\n\nTo use the `jsesc` binary in your shell, simply install jsesc globally using npm:\n\n```bash\nnpm install -g jsesc\n```\n\nAfter that you will be able to escape strings from the command line:\n\n```bash\n$ jsesc 'föo ♥ bår 𝌆 baz'\nf\\xF6o \\u2665 b\\xE5r \\uD834\\uDF06 baz\n```\n\nTo escape arrays or objects containing string values, use the `-o`/`--object` option:\n\n```bash\n$ jsesc --object '{ \"föo\": \"♥\", \"bår\": \"𝌆 baz\" }'\n{'f\\xF6o':'\\u2665','b\\xE5r':'\\uD834\\uDF06 baz'}\n```\n\nTo prettify the output in such cases, use the `-p`/`--pretty` option:\n\n```bash\n$ jsesc --pretty '{ \"föo\": \"♥\", \"bår\": \"𝌆 baz\" }'\n{\n  'f\\xF6o': '\\u2665',\n  'b\\xE5r': '\\uD834\\uDF06 baz'\n}\n```\n\nFor valid JSON output, use the `-j`/`--json` option:\n\n```bash\n$ jsesc --json --pretty '{ \"föo\": \"♥\", \"bår\": \"𝌆 baz\" }'\n{\n  \"f\\u00F6o\": \"\\u2665\",\n  \"b\\u00E5r\": \"\\uD834\\uDF06 baz\"\n}\n```\n\nRead a local JSON file, escape any non-ASCII symbols, and save the result to a new file:\n\n```bash\n$ jsesc --json --object < data-raw.json > data-escaped.json\n```\n\nOr do the same with an online JSON file:\n\n```bash\n$ curl -sL \"http://git.io/aorKgQ\" | jsesc --json --object > data-escaped.json\n```\n\nSee `jsesc --help` for the full list of options.\n\n## Support\n\nThis library has been tested in at least Chrome 27-29, Firefox 3-22, Safari 4-6, Opera 10-12, IE 6-10, Node.js v0.10.0, Narwhal 0.3.2, RingoJS 0.8-0.9, PhantomJS 1.9.0, and Rhino 1.7RC4.\n\n**Note:** Using the `json` option on objects or arrays that contain non-string values relies on `JSON.parse()`. For legacy environments like IE ≤ 7, use [a `JSON` polyfill](http://bestiejs.github.io/json3/).\n\n## Unit tests & code coverage\n\nAfter cloning this repository, run `npm install` to install the dependencies needed for development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.\n\nOnce that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`.\n\nTo generate the code coverage report, use `grunt cover`.\n\n## Author\n\n| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|\n| [Mathias Bynens](http://mathiasbynens.be/) |\n\n## License\n\nThis library is available under the [MIT](http://mths.be/mit) license.\n",
    "license": "MIT"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz",
    "hash": "e7dee66e35d6fc16f710fe91d5cf69f70f08911d",
    "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==",
    "registry": "npm",
    "packageName": "jsesc",
    "cacheIntegrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0="
  },
  "registry": "npm",
  "hash": "e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
}