UNPKG

@stryke/path

Version:

A package containing various utilities that expand the functionality of NodeJs's built-in `path` module

12 lines (11 loc) 419 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.existsSync = exports.exists = void 0; var _nodeFs = require("node:fs"); var _promises = require("node:fs/promises"); const existsSync = s => (0, _nodeFs.existsSync)(s), exists = async s => (0, _promises.access)(s, _promises.constants.F_OK).then(() => !0).catch(() => !1); exports.exists = exists; exports.existsSync = existsSync;