UNPKG

@qiwi/semantic-release-gh-pages-plugin

Version:
15 lines (14 loc) 417 B
import fs from 'node:fs'; export const catchToSmth = (fn, smth) => { return (...args) => { try { return fn(...args); } catch (e) { console.warn(e); return smth; } }; }; export const anyDefined = (...args) => args.find(item => item !== undefined); export const isDirectory = (path) => fs.existsSync(path) && fs.lstatSync(path).isDirectory();