Created
July 18, 2018 14:40
-
-
Save Bamblehorse/abf3c1a151a57341d1edded088a93ff8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const fileExists = path => file => fs.existsSync(`${path}/${file}`); | |
const fileExistsInSrc = fileExists('/src'); // file => fs.existsSync(`${path}/${file}`) | |
fileExistsInSrc('index.js') // true || false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment