UNPKG

@kamkam1_0/errorhandler

Version:

ErrorHandler is simple to use module that allows you to handle several errors to prevent your program from crashing

12 lines (10 loc) 263 B
const os = require('node:os') let osSymbol = '/' if (os.platform() === 'win32') { osSymbol = "\\" } module.exports = () => { let link = process.cwd() link = link.split(osSymbol).filter(e => e.length > 0) return link[link.length - 1] }