🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-safe

Check if filename is safe for linux/mac/windows

1.0.0
latest
Version published
Maintainers
1
Created

is-safe

Simple package to check if a filename is valid

NPM Discord

Installation

npm i -s is-safe

Example

const isSafe = require('is-safe');

isSafe('/test.png') // => false

isSafe('test---.png') // => true

isSafe('"test.png')
// if os is windows => true
// else => false

isSafe('"test.png', true) // => false

FAQs

Package last updated on 05 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts