is-safe-filename
npmv0.1.1TypeScriptCheck if a filename is safe to use in a path join operation
Safe to adopt
Yes — is-safe-filename scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 228 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 228 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 5.1 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-safe-filename 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
- node >=20
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the is-safe-filename README.
import isSafeFilename from 'is-safe-filename';
isSafeFilename('foo');
//=> true
isSafeFilename('../foo');
//=> false
isSafeFilename('foo/bar');
//=> falseis-safe-filename 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-safe-filenamethis page | 0 | 1 | MIT | 7 months ago |
| @nodable/entities | 0 | 2 | MIT | 1 day ago |
| is-unsafe | 0 | 1 | MIT | 1 day ago |
| safe-buffer | 0 | 5 | MIT | 1 day ago |
| path-key | 244.9M | 1 | MIT | 1 day ago |
| has-flag | 166.9M | 1 | MIT | 1 day ago |
Dependencies
Declared by is-safe-filename v0.1.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on is-safe-filename.
Relationship graph
Dependencies (left) and dependents (right) of is-safe-filename.
Release history
2 releases in the last two years.
| Version | Published | Size | License |
|---|---|---|---|
| 0.1.1latest | 7 months ago | 5.1 KB | MIT |
| 0.1.0 | 7 months ago | 4.1 KB | MIT |
Overview
is-safe-filename is an npm package that check if a filename is safe to use in a path join operation. It has 1 known dependents in the graph. The latest version is 0.1.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need check if a filename is safe to use in a path join operation 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 (3 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-safe-filename?
Yes — is-safe-filename scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 228 days ago. 2 releases in the last 2 years.
How do I install is-safe-filename?
Run `npm install is-safe-filename` to add is-safe-filename to your npm project.
What license is is-safe-filename released under?
is-safe-filename is distributed under the MIT license.
How popular is is-safe-filename?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on is-safe-filename.
Is is-safe-filename still maintained?
The most recent release of is-safe-filename (v0.1.1) was published 7 months ago.
Does is-safe-filename run install scripts?
No. is-safe-filename does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.