npm.io
1.1.0 • Published 6 years ago

@does/exist

Licence
MIT
Version
1.1.0
Deps
0
Size
1 kB
Vulns
0
Weekly
0
Stars
39

@does/exist

Check if a file exists and is writeable

const exist = require('@does/exist');

const fileExists = await exist(join(__dirname, 'index.js'));

Options

quiet: false (default is true)

Will log error messages when trying to access a file that's not there

await exist(path, {quiet: false});

Keywords