source: trip-planner-front/node_modules/mkdirp/index.js@ e29cc2e

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

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1const optsArg = require('./lib/opts-arg.js')
2const pathArg = require('./lib/path-arg.js')
3
4const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
5const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
6const {useNative, useNativeSync} = require('./lib/use-native.js')
7
8
9const mkdirp = (path, opts) => {
10 path = pathArg(path)
11 opts = optsArg(opts)
12 return useNative(opts)
13 ? mkdirpNative(path, opts)
14 : mkdirpManual(path, opts)
15}
16
17const mkdirpSync = (path, opts) => {
18 path = pathArg(path)
19 opts = optsArg(opts)
20 return useNativeSync(opts)
21 ? mkdirpNativeSync(path, opts)
22 : mkdirpManualSync(path, opts)
23}
24
25mkdirp.sync = mkdirpSync
26mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
27mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
28mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
29mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
30
31module.exports = mkdirp
Note: See TracBrowser for help on using the repository browser.