source: trip-planner-front/node_modules/istanbul-lib-source-maps/lib/pathutils.js@ 8d391a1

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

initial commit

  • Property mode set to 100644
File size: 537 bytes
Line 
1/*
2 Copyright 2015, Yahoo Inc.
3 Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 */
5'use strict';
6
7const path = require('path');
8
9module.exports = {
10 isAbsolute: path.isAbsolute,
11 asAbsolute(file, baseDir) {
12 return path.isAbsolute(file)
13 ? file
14 : path.resolve(baseDir || process.cwd(), file);
15 },
16 relativeTo(file, origFile) {
17 return path.isAbsolute(file)
18 ? file
19 : path.resolve(path.dirname(origFile), file);
20 }
21};
Note: See TracBrowser for help on using the repository browser.