Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
448 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | const fs = require('fs')
|
---|
| 2 |
|
---|
| 3 | const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
|
---|
| 4 | const versArr = version.replace(/^v/, '').split('.')
|
---|
| 5 | const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
|
---|
| 6 |
|
---|
| 7 | const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
|
---|
| 8 | const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
|
---|
| 9 |
|
---|
| 10 | module.exports = {useNative, useNativeSync}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.