UNPKG

node-7z-threetwo

Version:

A CommonJs and ESM frontend to 7-Zip, downloads binaries in for Linux, Windows, and Mac OSX, with methods to create SFX self extracting 7z archives targeting different platforms.

15 lines (13 loc) 381 B
'use strict'; const nativeSeparator = require('path').sep; /** * @param {string} path A path with the native directory separator. * @return {string} A path with / for directory separator. */ module.exports = function (path) { let result = path, next; while ((next = result.replace(nativeSeparator, '/')) !== result) { result = next; } return result; };