Sha256: 79af12840d716032568e9893b4be14a3ab004bc54b15c750f3cb0f97dd0a4faa
Contents?: true
Size: 530 Bytes
Versions: 36
Compression:
Stored size: 530 Bytes
Contents
/* * getAbsoluteFSPath * @return {string} When run in NodeJS env, returns the absolute path to the current directory * When run outside of NodeJS, will return an error message */ const getAbsoluteFSPath = function () { // detect whether we are running in a browser or nodejs if (typeof module !== "undefined" && module.exports) { return require("path").resolve(__dirname) } throw new Error('getAbsoluteFSPath can only be called within a Nodejs environment'); } module.exports = getAbsoluteFSPath
Version data entries
36 entries across 36 versions & 5 rubygems