{
  "_id": "jsc-safe-url",
  "maintainers": [
    {
      "name": "metro-bot",
      "email": "metro-maintainers@fb.com"
    }
  ],
  "keywords": [
    "javascriptcore",
    "metro",
    "react-native"
  ],
  "dist-tags": {
    "latest": "0.2.4"
  },
  "author": {
    "name": "Rob Hogan",
    "email": "npm@rhogan.net"
  },
  "_rev": "6-059a1afef4af24474d160efbec8b3669",
  "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
  "readme": "## `jsc-safe-url`\n\nJavaScriptCore santizes source URLs in error stacks by stripping query strings and fragments. Ref: [`Webkit/Webkit#49109d`](https://github.com/WebKit/WebKit/commit/49109db4ab87a715f7a8987c7ee380e63060298b).\n\nThis package contains utility functions required to implement the proposed [React Native Community RFC0646](https://github.com/react-native-community/discussions-and-proposals/pull/646). It exports three functons:\n\n## `function isJscSafeUrl(url: string): boolean`\n\nReturns `false` if the URL has a query component that could be stripped by JSC.\n\n## `function toJscSafeUrl(urlToConvert: string): string`\n\nAccepts an absolute or relative URL, and encodes any data in the input query string (if present) into the [path component](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) of the URL, by using the delimiter `//&` (which cannot appear in a normalized file path) to separate the original path from the orignal query string.\n\n```\ntoJscSafeUrl('https://example.com/path?foo=bar#fragment')\n// 'https://example.com/path//&foo=bar#fragment'\n```\n\n## `function toNormalUrl(urlToNormalize: string): string`\n\nAccepts an absolute or relative URL, and replaces the first unescaped `//&` in the [path component](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) with `?`. (Effectively the reverse of `toJscSafeUrl`.)\n\n```\ntoNormalUrl('https://example.com/path//&foo=bar#fragment')\n// 'https://example.com/path?foo=bar#fragment'\n```\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/robhogan/jsc-safe-url.git"
  },
  "bugs": {
    "url": "https://github.com/robhogan/jsc-safe-url/issues"
  },
  "license": "0BSD",
  "versions": {
    "0.0.1": {
      "name": "jsc-safe-url",
      "version": "0.0.1",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "prettier": "^2.8.8"
      },
      "gitHead": "82da633b78b75a8406906d30e684aca610b75ba7",
      "_id": "jsc-safe-url@0.0.1",
      "_nodeVersion": "16.17.0",
      "_npmVersion": "8.15.0",
      "dist": {
        "integrity": "sha512-wxGCSb2T1oGeCZyR2CFCNpwVvA3m4X4+8oAGlo9I0VpiDu76wMXzNqI1VsDvnil3UNgmBkvqNUo+yASgFZwryQ==",
        "shasum": "462b7148fe045edc2227daff365f1b84861ba591",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.0.1.tgz",
        "fileCount": 7,
        "unpackedSize": 9043,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCClcFl2qvLpIwJxYA0y1HBK/XnwyhYCrGq6cy4/2WnpQIge93aUECMbW51O9HvsVxCFbxW904cGpmZ6GdrSExX9Os="
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.0.1_1683889439697_0.1016311814067572"
      },
      "_hasShrinkwrap": false
    },
    "0.1.0": {
      "name": "jsc-safe-url",
      "version": "0.1.0",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "./index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "prettier": "^2.8.8"
      },
      "types": "./index.d.ts",
      "gitHead": "372d6a25fdebef7f3ecfe9183a5d30511b6fac5d",
      "_id": "jsc-safe-url@0.1.0",
      "_nodeVersion": "16.17.0",
      "_npmVersion": "8.15.0",
      "dist": {
        "integrity": "sha512-gZiCpT7Y0eJLKxFh/eX4IMcehFPL6ndcalqyoNEY5NDRhsX3HnaEX9Foiq14JJ6lbChGNNrKSOa/0JNDx0eVJw==",
        "shasum": "309122611f25c194eb3372dc027d5349f962520c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.1.0.tgz",
        "fileCount": 8,
        "unpackedSize": 9167,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDKmkazZBc3TfdGqj/FbalFTQR6asA+Cc1gn1Th682nIgIgRxr76eBxZc2YhuBF8qIvzlUy+xGCvTe9mn05cFh8Sx0="
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.1.0_1683902607147_0.26358304798468213"
      },
      "_hasShrinkwrap": false
    },
    "0.2.0": {
      "name": "jsc-safe-url",
      "version": "0.2.0",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "./index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "prettier": "^2.8.8"
      },
      "types": "./index.d.ts",
      "gitHead": "9451b9022a0b62d2d931842ec1d613a8ed5464be",
      "_id": "jsc-safe-url@0.2.0",
      "_nodeVersion": "20.1.0",
      "_npmVersion": "9.6.4",
      "dist": {
        "integrity": "sha512-0uOKQfEjZtb6h9Lth+R0emwi7ZsqK725u7UZMIkeFOYT68f0oMToBtHaMfH0k1kvp9OYbmGM0d40BjjUX6UC3A==",
        "shasum": "8b1351403580dccfa2203477a3a3cfdfa07550fd",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.2.0.tgz",
        "fileCount": 8,
        "unpackedSize": 10298,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIBEE9U2l8mYM9zuG3ki1VQnorLMIv71wJxBb28h0nYD9AiEAjfazMgxIbZ0st0TGwnXMR8SrL/MYUJ+9OYIWpO+VzJA="
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.2.0_1684330730734_0.3318057798879206"
      },
      "_hasShrinkwrap": false
    },
    "0.2.1": {
      "name": "jsc-safe-url",
      "version": "0.2.1",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "./index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "flow-bin": "^0.206.0",
        "prettier": "^2.8.8"
      },
      "types": "./index.d.ts",
      "gitHead": "ebc6c302fba093a45615ef47110ea3a73bebb374",
      "_id": "jsc-safe-url@0.2.1",
      "_nodeVersion": "20.1.0",
      "_npmVersion": "9.6.4",
      "dist": {
        "integrity": "sha512-sET0zUOUalDdQPpDQKNEXiyIV8Xlfm/e3V/ySdj22da/bzN6YQuowo/vls5KgKlrMsVh5skWZ8D1vWF0LpxIXg==",
        "shasum": "b5cfe9b86e40ef3ad2ca16300fb9430ca38bb230",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.2.1.tgz",
        "fileCount": 5,
        "unpackedSize": 6044,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCG9R6ReVgKzoOh79STUuhGOXVAOqRGWt6V1ahpu9b+9QIhAI9L2E7F2MT+H00zrTaNak7lmu0lZbmKkLVxu9j73G51"
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.2.1_1684422733603_0.6654855087199576"
      },
      "_hasShrinkwrap": false
    },
    "0.2.2": {
      "name": "jsc-safe-url",
      "version": "0.2.2",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "flow-bin": "^0.206.0",
        "prettier": "^2.8.8"
      },
      "types": "./index.d.ts",
      "gitHead": "c4a7508ab600ef86ea70dc86af516adeb912bacc",
      "_id": "jsc-safe-url@0.2.2",
      "_nodeVersion": "20.1.0",
      "_npmVersion": "9.6.4",
      "dist": {
        "integrity": "sha512-F6ezJ+Ys7yUaZ2tG7VVGwDgmCB8T1kaDB2AlxhLnPIfTpJqgFWSjptCAU04wz7RB3oEta/SiDuy4vQxh2F4jXg==",
        "shasum": "9ce79116d6271fce4b3d1b59b879e66b82457be1",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.2.2.tgz",
        "fileCount": 5,
        "unpackedSize": 6042,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIE2+xfHrIF12edBX9U1rQIsp7RW+yoIVsM7Sy4ekVM+7AiBQ/cYPVMYUZpFEjl/F45dMDIod8TbikxCzGJRFvVAB8Q=="
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.2.2_1684424193562_0.44191790597511993"
      },
      "_hasShrinkwrap": false
    },
    "0.2.3": {
      "name": "jsc-safe-url",
      "version": "0.2.3",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "flow-bin": "^0.206.0",
        "prettier": "^2.8.8"
      },
      "types": "./index.d.ts",
      "gitHead": "3d88654b80d3f48b96c1b1757b0c79d4dd5d2d54",
      "_id": "jsc-safe-url@0.2.3",
      "_nodeVersion": "20.1.0",
      "_npmVersion": "9.6.4",
      "dist": {
        "integrity": "sha512-85sVnu5sQyfFH99sa1Hw6LzwT9bvbgH4EYsHZM0lzc2eyq1Ia8IsJLVxL4G/NLhbjolub+zlZdigZkABh48alA==",
        "shasum": "791351512911c9ab035d26b9251486324f8f1a28",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.2.3.tgz",
        "fileCount": 5,
        "unpackedSize": 6043,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIHAzE+N1Gi7sk2HOD3vxWEEUfP8QHpAO+iBh/kCW6uubAiEA1odYO+47FCy/XCEXnAqGxjpGuw3QIUFfBV5v14Y+/lY="
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.2.3_1684428798133_0.602669924981009"
      },
      "_hasShrinkwrap": false
    },
    "0.2.4": {
      "name": "jsc-safe-url",
      "version": "0.2.4",
      "description": "Utility functions for converting to and from URLs that encode query string data into URL paths",
      "main": "index.js",
      "scripts": {
        "test": "node --test"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/robhogan/jsc-safe-url.git"
      },
      "keywords": [
        "javascriptcore",
        "metro",
        "react-native"
      ],
      "author": {
        "name": "Rob Hogan",
        "email": "npm@rhogan.net"
      },
      "license": "0BSD",
      "bugs": {
        "url": "https://github.com/robhogan/jsc-safe-url/issues"
      },
      "homepage": "https://github.com/robhogan/jsc-safe-url#readme",
      "devDependencies": {
        "flow-bin": "^0.206.0",
        "prettier": "^2.8.8"
      },
      "types": "./index.d.ts",
      "gitHead": "9b00f6543466325f0663db0e34cd81a0c812e839",
      "_id": "jsc-safe-url@0.2.4",
      "_nodeVersion": "20.1.0",
      "_npmVersion": "9.6.4",
      "dist": {
        "integrity": "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q==",
        "shasum": "141c14fbb43791e88d5dc64e85a374575a83477a",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz",
        "fileCount": 5,
        "unpackedSize": 6044,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIHUKXc9qfeA1Zc2wzojZT68qty5tI1CDAr9Igov+7R+hAiEAjfprQA0jJf5bCy+oAT5hih4Oa1gHnG5bZYHePQmINX4="
          }
        ]
      },
      "_npmUser": {
        "name": "metro-bot",
        "email": "metro-maintainers@fb.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "metro-bot",
          "email": "metro-maintainers@fb.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/jsc-safe-url_0.2.4_1684428897127_0.43860819485507085"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "jsc-safe-url",
  "time": {
    "created": "2023-05-12T11:03:59.697Z",
    "0.0.1": "2023-05-12T11:03:59.884Z",
    "modified": "2026-05-19T00:43:01.605Z",
    "0.1.0": "2023-05-12T14:43:27.281Z",
    "0.2.0": "2023-05-17T13:38:50.902Z",
    "0.2.1": "2023-05-18T15:12:13.770Z",
    "0.2.2": "2023-05-18T15:36:33.773Z",
    "0.2.3": "2023-05-18T16:53:18.318Z",
    "0.2.4": "2023-05-18T16:54:57.380Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/robhogan/jsc-safe-url#readme"
}