{"_id":"@aegisjsproject/trusted-types","_rev":"4-edb71efa8e8aed97760e64be0a47817f","name":"@aegisjsproject/trusted-types","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@aegisjsproject/trusted-types","version":"1.0.0","keywords":[],"author":{"name":"Chris Zuber","email":"admin@kernvalley.us"},"license":"MIT","_id":"@aegisjsproject/trusted-types@1.0.0","maintainers":[{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"}],"homepage":"https://github.com/AegisJSProject/trusted-types#readme","bugs":{"url":"https://github.com/AegisJSProject/trusted-types/issues"},"dist":{"shasum":"640648cde52301ddf83b82bc6eb53fc3171f57e9","tarball":"https://registry.npmjs.org/@aegisjsproject/trusted-types/-/trusted-types-1.0.0.tgz","fileCount":13,"integrity":"sha512-0jJh+Q1Kk5GeDHAXroz+ONAtijLfFyDMLKnlv847axJTFy/GyRNPTiLUA18RtYRdU2Brq6qmKpeUqjyZrzpm1g==","signatures":[{"sig":"MEUCIDfG9pHEy3fFQmYXlw+WZtsakhOh/VN6eHY+pY7DRV3lAiEA44SscpFcDJVJ4tKgkwC1WfQWUKzF222GKRH/kidTi08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aegisjsproject%2ftrusted-types@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":65309},"main":"./trusted-types.cjs","type":"module","unpkg":"./bundle.min.js","config":{"serve":{"path":"./","port":8080,"domain":"localhost"}},"module":"./trusted-types.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":"./trusted-types.js","require":"./trusted-types.cjs"},"./*":{"import":"./*.js","require":"./*.cjs"},"./*.js":{"import":"./*.js","require":"./*.cjs"},"./*.cjs":{"import":"./*.js","require":"./*.cjs"},"./*.mjs":{"import":"./*.js","require":"./*.cjs"}},"funding":[{"url":"https://liberapay.com/shgysk8zer0","type":"librepay"},{"url":"https://github.com/sponsors/shgysk8zer0","type":"github"}],"gitHead":"96275b8f64205cfa8277842c8689e5a276f0a358","private":false,"scripts":{"test":"npm run lint:js && npm run build","build":"npm run build:js","clean":"rm -f ./*.cjs","start":"http-server ${npm_package_config_serve_path} -c-1 --port ${npm_package_config_serve_port} --gzip true --brotli true -a ${npm_package_config_serve_domain} -o /test/","fix:js":"eslint . --fix","lint:js":"eslint .","prepare":"npm run build","build:js":"npm run clean && rollup -c rollup.config.js","preversion":"npm test","create:lock":"npm i --package-lock-only --ignore-scripts --no-audit --no-fund","version:bump":"npm run version:bump:patch","version:bump:major":"npm version --no-git-tag-version major && npm run create:lock","version:bump:minor":"npm version --no-git-tag-version minor && npm run create:lock","version:bump:patch":"npm version --no-git-tag-version patch && npm run create:lock"},"_npmUser":{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"},"repository":{"url":"git+https://github.com/AegisJSProject/trusted-types.git","type":"git"},"_npmVersion":"9.6.7","description":"A polyfill for the Trusted Types API","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","rollup":"^4.13.2","http-server":"^14.1.1","@rollup/plugin-terser":"^0.4.4","@aegisjsproject/sanitizer":"^0.0.7","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/trusted-types_1.0.0_1712019100541_0.26629019186256886","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@aegisjsproject/trusted-types","version":"1.0.1","keywords":["aegis","trusted-types","security","polyfill"],"author":{"name":"Chris Zuber","email":"admin@kernvalley.us"},"license":"MIT","_id":"@aegisjsproject/trusted-types@1.0.1","maintainers":[{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"}],"homepage":"https://github.com/AegisJSProject/trusted-types#readme","bugs":{"url":"https://github.com/AegisJSProject/trusted-types/issues"},"dist":{"shasum":"43a617e47d5b5c075fcfbeeaa33c80f08b2f195c","tarball":"https://registry.npmjs.org/@aegisjsproject/trusted-types/-/trusted-types-1.0.1.tgz","fileCount":13,"integrity":"sha512-42tei55L/5tt1Jh5gQSLj6OEwZUHbWSmKcQmutrrzV1v3oWXwCZfzf1cbeovvODrxAO/Y2e9vG3wuWcZ/frdfQ==","signatures":[{"sig":"MEUCIHvu62/y5N5Q7Y55AUgw9Uneb1X2Pfs2laReHjR0yvIbAiEAnkl1fV41MHkGKLmQZKO7W2EGuG8hgKK5zSelqdjCNp4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aegisjsproject%2ftrusted-types@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":65440},"main":"./trusted-types.cjs","type":"module","unpkg":"./bundle.min.js","config":{"serve":{"path":"./","port":8080,"domain":"localhost"}},"module":"./trusted-types.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":"./trusted-types.js","require":"./trusted-types.cjs"},"./*":{"import":"./*.js","require":"./*.cjs"},"./*.js":{"import":"./*.js","require":"./*.cjs"},"./*.cjs":{"import":"./*.js","require":"./*.cjs"},"./*.mjs":{"import":"./*.js","require":"./*.cjs"}},"funding":[{"url":"https://liberapay.com/shgysk8zer0","type":"librepay"},{"url":"https://github.com/sponsors/shgysk8zer0","type":"github"}],"gitHead":"1e97987242217c90cb42b336c9ca548a73ab5eac","private":false,"scripts":{"test":"npm run lint:js && npm run build","build":"npm run build:js","clean":"rm -f ./*.cjs","start":"http-server ${npm_package_config_serve_path} -c-1 --port ${npm_package_config_serve_port} --gzip true --brotli true -a ${npm_package_config_serve_domain} -o /test/","fix:js":"eslint . --fix","lint:js":"eslint .","prepare":"npm run build","build:js":"npm run clean && rollup -c rollup.config.js","preversion":"npm test","create:lock":"npm i --package-lock-only --ignore-scripts --no-audit --no-fund","version:bump":"npm run version:bump:patch","version:bump:major":"npm version --no-git-tag-version major && npm run create:lock","version:bump:minor":"npm version --no-git-tag-version minor && npm run create:lock","version:bump:patch":"npm version --no-git-tag-version patch && npm run create:lock"},"_npmUser":{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"},"repository":{"url":"git+https://github.com/AegisJSProject/trusted-types.git","type":"git"},"_npmVersion":"9.6.7","description":"A polyfill for the Trusted Types API","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","rollup":"^4.13.2","http-server":"^14.1.1","@rollup/plugin-terser":"^0.4.4","@aegisjsproject/sanitizer":"^0.0.7","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/trusted-types_1.0.1_1712020369271_0.8247410462699931","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@aegisjsproject/trusted-types","version":"1.0.2","keywords":["aegis","trusted-types","security","polyfill"],"author":{"name":"Chris Zuber","email":"admin@kernvalley.us"},"license":"MIT","_id":"@aegisjsproject/trusted-types@1.0.2","maintainers":[{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"}],"homepage":"https://github.com/AegisJSProject/trusted-types#readme","bugs":{"url":"https://github.com/AegisJSProject/trusted-types/issues"},"dist":{"shasum":"6c9fef67fc8bd514d2f690e2c0ff5bac55e8e9d2","tarball":"https://registry.npmjs.org/@aegisjsproject/trusted-types/-/trusted-types-1.0.2.tgz","fileCount":13,"integrity":"sha512-nVca/8lS8gpWiRBpiRaIu0S+8qXcIodBIVfv5IL337Zj17UfZMf8L4j+2TPuQ6tr78Sq9/sASUKhTWAWHA69sw==","signatures":[{"sig":"MEUCIQDe7MMT6kUdnxbYbwZMP8Bf3qZjWz5HJ3VMuPEUSzP1tAIgR7fdZuDpz8/xwr6/CRXRexVkUPJ0e0o0JbIUnMif40w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aegisjsproject%2ftrusted-types@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":65655},"main":"./trusted-types.cjs","type":"module","unpkg":"./bundle.min.js","config":{"serve":{"path":"./","port":8080,"domain":"localhost"}},"module":"./trusted-types.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":"./trusted-types.js","require":"./trusted-types.cjs"},"./*":{"import":"./*.js","require":"./*.cjs"},"./*.js":{"import":"./*.js","require":"./*.cjs"},"./*.cjs":{"import":"./*.js","require":"./*.cjs"},"./*.mjs":{"import":"./*.js","require":"./*.cjs"}},"funding":[{"url":"https://liberapay.com/shgysk8zer0","type":"librepay"},{"url":"https://github.com/sponsors/shgysk8zer0","type":"github"}],"gitHead":"a65b4159518712433bd9d51ff2b95e87f7188325","private":false,"scripts":{"test":"npm run lint:js && npm run build","build":"npm run build:js","clean":"rm -f ./*.cjs","start":"http-server ${npm_package_config_serve_path} -c-1 --port ${npm_package_config_serve_port} --gzip true --brotli true -a ${npm_package_config_serve_domain} -o /test/","fix:js":"eslint . --fix","lint:js":"eslint .","prepare":"npm run build","build:js":"npm run clean && rollup -c rollup.config.js","preversion":"npm test","create:lock":"npm i --package-lock-only --ignore-scripts --no-audit --no-fund","version:bump":"npm run version:bump:patch","version:bump:major":"npm version --no-git-tag-version major && npm run create:lock","version:bump:minor":"npm version --no-git-tag-version minor && npm run create:lock","version:bump:patch":"npm version --no-git-tag-version patch && npm run create:lock"},"_npmUser":{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"},"repository":{"url":"git+https://github.com/AegisJSProject/trusted-types.git","type":"git"},"_npmVersion":"10.1.0","description":"A polyfill for the Trusted Types API","directories":{},"_nodeVersion":"20.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","rollup":"^4.13.2","http-server":"^14.1.1","@rollup/plugin-terser":"^0.4.4","@aegisjsproject/sanitizer":"^0.1.1","@shgysk8zer0/eslint-config":"^1.0.1","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/trusted-types_1.0.2_1726797027017_0.0798636646735773","host":"s3://npm-registry-packages"}},"1.1.0":{"_id":"@aegisjsproject/trusted-types@1.1.0","bugs":{"url":"https://github.com/AegisJSProject/trusted-types/issues"},"dist":{"shasum":"f48c47055ad965b4518684be18196bacc3400331","tarball":"https://registry.npmjs.org/@aegisjsproject/trusted-types/-/trusted-types-1.1.0.tgz","integrity":"sha512-ZKWwMPIu2Pbll87pmX3Y8v/VPC1OhVCO/+hT5CydR1Pp9q+ZJTHqER+JerwTV/Cx+RCKPYhwb8KS0WsySdhLgg==","fileCount":13,"unpackedSize":65915,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aegisjsproject%2ftrusted-types@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEqFatDDFMe9I75fojR759BGEj4IcdtW2sWjpPI2WAL5AiBrYjY3ET7Y9XzfRSC0XQJ1O76rKi0m82sUr3oKIkUXRg=="}]},"main":"./trusted-types.cjs","name":"@aegisjsproject/trusted-types","type":"module","unpkg":"./bundle.min.js","author":{"name":"Chris Zuber","email":"admin@kernvalley.us"},"config":{"serve":{"path":"./","port":8080,"domain":"localhost"}},"module":"./trusted-types.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":"./trusted-types.js","require":"./trusted-types.cjs"},"./*":{"import":"./*.js","require":"./*.cjs"},"./*.js":{"import":"./*.js","require":"./*.cjs"},"./*.cjs":{"import":"./*.js","require":"./*.cjs"},"./*.mjs":{"import":"./*.js","require":"./*.cjs"}},"funding":[{"url":"https://liberapay.com/shgysk8zer0","type":"librepay"},{"url":"https://github.com/sponsors/shgysk8zer0","type":"github"}],"gitHead":"1a8622e2e7261d151ddfcf8387d8c31ef0db29bf","license":"MIT","private":false,"scripts":{"test":"npm run lint:js && npm run build","build":"npm run build:js","clean":"rm -f ./*.cjs","start":"http-server ${npm_package_config_serve_path} -c-1 --port ${npm_package_config_serve_port} --gzip true --brotli true -a ${npm_package_config_serve_domain} -o /test/","fix:js":"eslint . --fix","lint:js":"eslint .","prepare":"npm run build","build:js":"npm run clean && rollup -c rollup.config.js","preversion":"npm test","create:lock":"npm i --package-lock-only --ignore-scripts --no-audit --no-fund","version:bump":"npm run version:bump:patch","version:bump:major":"npm version --no-git-tag-version major && npm run create:lock","version:bump:minor":"npm version --no-git-tag-version minor && npm run create:lock","version:bump:patch":"npm version --no-git-tag-version patch && npm run create:lock"},"version":"1.1.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e6b27857-6db3-40bf-8f04-ef5cb7c27e56"},"approver":{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"}},"homepage":"https://github.com/AegisJSProject/trusted-types#readme","keywords":["aegis","trusted-types","security","polyfill"],"repository":{"url":"git+https://github.com/AegisJSProject/trusted-types.git","type":"git"},"_npmVersion":"11.16.0","description":"A polyfill for the Trusted Types API","directories":{},"maintainers":[{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"}],"_nodeVersion":"26.3.0","allowScripts":{"fsevents@2.3.3":true},"devDependencies":{"eslint":"^10.5.0","rollup":"^4.62.0","http-server":"^14.1.1","@rollup/plugin-terser":"^1.0.0","@aegisjsproject/sanitizer":"^0.3.0","@shgysk8zer0/eslint-config":"^1.1.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trusted-types_1.1.0_1781453762785_0.6878046322999694"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-02T00:51:40.448Z","modified":"2026-06-14T16:16:03.206Z","1.0.0":"2024-04-02T00:51:40.690Z","1.0.1":"2024-04-02T01:12:49.444Z","1.0.2":"2024-09-20T01:50:27.332Z","1.1.0":"2026-06-14T16:16:02.869Z"},"bugs":{"url":"https://github.com/AegisJSProject/trusted-types/issues"},"author":{"name":"Chris Zuber","email":"admin@kernvalley.us"},"license":"MIT","homepage":"https://github.com/AegisJSProject/trusted-types#readme","keywords":["aegis","trusted-types","security","polyfill"],"repository":{"url":"git+https://github.com/AegisJSProject/trusted-types.git","type":"git"},"description":"A polyfill for the Trusted Types API","maintainers":[{"name":"shgysk8zer0","email":"shgysk8zer0@gmail.com"}],"readme":"# @aegisjsproject/trusted-types\n\nA polyfill for the [Trusted Types API](https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API)\n\n[![CodeQL](https://github.com/AegisJSProject/trusted-types/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/AegisJSProject/trusted-types/actions/workflows/codeql-analysis.yml)\n![Node CI](https://github.com/AegisJSProject/trusted-types/workflows/Node%20CI/badge.svg)\n![Lint Code Base](https://github.com/AegisJSProject/trusted-types/workflows/Lint%20Code%20Base/badge.svg)\n\n[![GitHub license](https://img.shields.io/github/license/AegisJSProject/trusted-types.svg)](https://github.com/AegisJSProject/trusted-types/blob/master/LICENSE)\n[![GitHub last commit](https://img.shields.io/github/last-commit/AegisJSProject/trusted-types.svg)](https://github.com/AegisJSProject/trusted-types/commits/master)\n[![GitHub release](https://img.shields.io/github/release/AegisJSProject/trusted-types?logo=github)](https://github.com/AegisJSProject/trusted-types/releases)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/shgysk8zer0?logo=github)](https://github.com/sponsors/shgysk8zer0)\n\n[![npm](https://img.shields.io/npm/v/@aegisjsproject/trusted-types)](https://www.npmjs.com/package/@aegisjsproject/trusted-types)\n![node-current](https://img.shields.io/node/v/@aegisjsproject/trusted-types)\n![npm bundle size gzipped](https://img.shields.io/bundlephobia/minzip/@aegisjsproject/trusted-types)\n[![npm](https://img.shields.io/npm/dw/@aegisjsproject/trusted-types?logo=npm)](https://www.npmjs.com/package/@aegisjsproject/trusted-types)\n\n[![GitHub followers](https://img.shields.io/github/followers/AegisJSProject.svg?style=social)](https://github.com/AegisJSProoject)\n![GitHub forks](https://img.shields.io/github/forks/AegisJSProject/trusted-types.svg?style=social)\n![GitHub stars](https://img.shields.io/github/stars/AegisJSProject/trusted-types.svg?style=social)\n[![Twitter Follow](https://img.shields.io/twitter/follow/shgysk8zer0.svg?style=social)](https://twitter.com/shgysk8zer0)\n\n[![Donate using Liberapay](https://img.shields.io/liberapay/receives/shgysk8zer0.svg?logo=liberapay)](https://liberapay.com/shgysk8zer0/donate \"Donate using Liberapay\")\n- - -\n\n- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)\n- [Contributing](./.github/CONTRIBUTING.md)\n- [Security Policy](./.github/SECURITY.md)\n\n## [Concepts and Usage](https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API#concepts_and_usage)\n\nClient-side, or DOM-based, XSS attacks happen when data controlled by a user\n(such as that input into a form field) reaches a function that can execute that\ndata. These functions are known as injection sinks. DOM-based XSS attacks happen\nwhen a user is able to write arbitrary JavaScript code and have it executed by one\nof these functions.\n\nThe Trusted Types API locks down risky injection sinks, requiring you to process\nthe data before passing it to one of these functions. If you use a string, then\nthe browser will throw a TypeError and prevent the use of the function.\n\nTrusted Types works alongside [Content-Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)\nwith the [`trusted-types`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types)\nand [`require-trusted-types-for`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/require-trusted-types-for)\ndirectives.\n\n### [Injection Sinks](https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API#injection_sinks)\n\nThe Trusted Types API locks down injection sinks that can act as a vector for DOM-XSS\nattacks. An injection sink is any Web API function that should only be called\nwith trusted, validated or sanitized input. Examples of injection sinks include:\n\n- Functions that insert HTML into the document such as Element.innerHTML, Element.outerHTML, or Document.write.\n- Functions that create a new same-origin Document with caller-controlled markup such as DOMParser.parseFromString.\n- Functions that execute code such as Global_Objects/eval.\n- Setters for Element attributes that accept a URL of code to load or execute.\n\nTrusted Types will force you to process the data before passing it to any\ninjection sink rather than use a string. This ensures that the data is trustworthy.\n\n> [!IMPORTANT]\n> Since the document cannot directly access HTTP headers, this polyfill requires\n> either `<meta http-equiv=\"Content-Security-Policy\">` or a `data-trusted-policies`\n> attribute to be set on `<html>`.\n\nThe Trusted Types API gives web developers a way to lock down the insecure parts\nof the DOM API to prevent client-side Cross-site scripting (XSS) attacks.\n\n## Included Scripts/Modules\n- **`trusted-types`**: Polyfills the `globalThis.trustedTypes`  object\n- **`harden`**: Overwrites \"injection sink\" property & attribute setters\n- **`bundle`**: Loads polyfill and conditionally \"harden\"s\n","readmeFilename":"README.md"}