Closed
Description
- Version: v12.8.0
- Platform: Ubuntu 19.04 (Linux 5.0.0-23-generic Simple project messaging. #24-Ubuntu SMP Mon Jul 29 15:36:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux)
I'm checking if given path in config file is absolute or relative. It works great however not when ~
is used. Then it returns false.
Here is my code
import path from 'path';
path.isAbsolute('/var/www/index.html'); // true
path.isAbsolute('./index.html'); // false
path.isAbsolute('~/Documents/test.json'); // false - THIS IS BAD