source: trip-planner-front/node_modules/mkdirp/lib/use-native.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 448 bytes
Line 
1const fs = require('fs')
2
3const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
4const versArr = version.replace(/^v/, '').split('.')
5const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
6
7const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
8const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
9
10module.exports = {useNative, useNativeSync}
Note: See TracBrowser for help on using the repository browser.