Sha256: f92520525c626ab49eeef5ba8663906187fc90790419e1d0aa9298d709faf682

Contents?: true

Size: 450 Bytes

Versions: 7

Compression:

Stored size: 450 Bytes

Contents

const url = require('url')

const node = require('../node.js')
const polyfill = require('./polyfill.js')

const useNative = node.satisfies('>=10.12.0')

const fileURLToPath = (path) => {
  // the polyfill is tested separately from this module, no need to hack
  // process.version to try to trigger it just for coverage
  // istanbul ignore next
  return useNative
    ? url.fileURLToPath(path)
    : polyfill(path)
}

module.exports = fileURLToPath

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.16.1 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js
disco_app-0.15.2 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js
disco_app-0.18.4 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js
disco_app-0.18.1 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js
disco_app-0.14.0 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js