6095a677f9724579a5a014ee56c295c6325c9bef5995be5b1df5c4c0f1bf710bc00e6f8125e0c36a27a34150dc12d15e10be190df0fcb79e4b5bd3d4124f22 450 B

1234567891011121314151617
  1. const url = require('url')
  2. const node = require('../node.js')
  3. const polyfill = require('./polyfill.js')
  4. const useNative = node.satisfies('>=10.12.0')
  5. const fileURLToPath = (path) => {
  6. // the polyfill is tested separately from this module, no need to hack
  7. // process.version to try to trigger it just for coverage
  8. // istanbul ignore next
  9. return useNative
  10. ? url.fileURLToPath(path)
  11. : polyfill(path)
  12. }
  13. module.exports = fileURLToPath