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

Version Path
rswag-ui-2.16.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.15.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.14.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.13.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.12.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.11.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.10.1 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.10.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.9.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.8.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.7.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.6.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.5.1 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.5.1.rc1 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.4.0 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.3.3 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.3.2 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.3.1 node_modules/swagger-ui-dist/absolute-path.js
rswag-ui-2.3.0 node_modules/swagger-ui-dist/absolute-path.js
openapi-rswag-ui-0.0.4 node_modules/swagger-ui-dist/absolute-path.js