source: node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js@ 62b2964

finki-main main
Last change on this file since 62b2964 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 450 bytes
Line 
1const url = require('url')
2
3const node = require('../node.js')
4const polyfill = require('./polyfill.js')
5
6const useNative = node.satisfies('>=10.12.0')
7
8const fileURLToPath = (path) => {
9 // the polyfill is tested separately from this module, no need to hack
10 // process.version to try to trigger it just for coverage
11 // istanbul ignore next
12 return useNative
13 ? url.fileURLToPath(path)
14 : polyfill(path)
15}
16
17module.exports = fileURLToPath
Note: See TracBrowser for help on using the repository browser.