is-unsafe
npmv2.0.2TypeScriptZero-dependency, DOM-free, pure predicate for detecting unsafe strings across HTML, XML, SVG, SQL, SHELL, and REGEX contexts
Safe to adopt
Yes — is-unsafe scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 21 days ago. 4 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 21 days ago. 4 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 63 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding is-unsafe to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the is-unsafe README.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE urlset [
<!ENTITY xss '</script><script>alert(document.domain)</script><x y="'>
]>
<urlset>
<url><loc>https://example.com/&xss;</loc></url>
</urlset>is-unsafe vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| is-unsafethis page | 0 | 1 | MIT | 21 days ago |
| @nodable/entities | 0 | 2 | MIT | 1 day ago |
| fast-xml-parser | 0 | 4 | MIT | 1 day ago |
| dom-serializer | 94.3M | 2 | MIT | 1 day ago |
| cheerio | 24.1M | 5 | MIT | 1 day ago |
| ssri | 0 | 2 | ISC | 1 day ago |
Dependencies
Declared by is-unsafe v2.0.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (1)
Used by
Popular packages that depend on is-unsafe.
Relationship graph
Dependencies (left) and dependents (right) of is-unsafe.
Frequently installed together
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Entity parser for XML, HTML, External entites with security and NCR control
Build XML from JSON without C/C++ based libraries
Parse String to Number based on configuration
Validates XML name productions — Name, NCName, QName, NMToken, NMTokens — for XML 1.0 and 1.1
TypeScript definitions for node
Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals
Release history
4 releases in the last two years, typically about 29 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.0.2latest | 21 days ago | 63 KB | MIT |
| 2.0.0 | 2 months ago | 63 KB | MIT |
| 1.0.1 | 3 months ago | 57 KB | MIT |
| 1.0.0 | 3 months ago | 55 KB | MIT |
Overview
is-unsafe is an npm package that zero-dependency, DOM-free, pure predicate for detecting unsafe strings across HTML, XML, SVG, SQL, SHELL, and REGEX contexts. It has 1 known dependents in the graph. The latest version is 2.0.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need zero-dependency, DOM-free, pure predicate for detecting unsafe strings across HTML, XML, SVG, SQL, SHELL, and REGEX contexts and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (1 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use is-unsafe?
Yes — is-unsafe scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 21 days ago. 4 releases in the last 2 years.
How do I install is-unsafe?
Run `npm install is-unsafe` to add is-unsafe to your npm project.
What license is is-unsafe released under?
is-unsafe is distributed under the MIT license.
How popular is is-unsafe?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on is-unsafe.
Is is-unsafe still maintained?
The most recent release of is-unsafe (v2.0.2) was published 21 days ago.
Does is-unsafe run install scripts?
No. is-unsafe does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.