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

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

initial commit

  • Property mode set to 100644
File size: 448 bytes
RevLine 
[6a3a178]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.