Files
flipper/desktop/test-utils/src/pathUtils.ts
Anton Nikolaev d27fa34505 Added module for test-utilities used across all packages
Summary: Added new package with test utilities re-used by other packages

Reviewed By: mweststrate

Differential Revision: D21949629

fbshipit-source-id: 8bfa959401669dc8911a1f647f417cafd92c2e4b
2020-06-09 04:58:37 -07:00

17 lines
400 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
export function normalizePath(path: string): string {
if (process.platform === 'win32') {
path = path.replace(/\\/g, '/');
path = path.substring(path.indexOf('/'));
}
return path;
}