is-safe-path
Check if a path is safe to use to prevent directory traversal attacks.
Installation
$ npm install is-safe-path
Usage
const isSafePath = ; ; // => true; // => false
License
Copyright (c) 2017 Martin Kolárik. Released under the MIT license.