@orbitdb/core
Version:
Distributed p2p database on IPFS
13 lines (9 loc) • 321 B
JavaScript
export const posixJoin = (...paths) => paths
.join('/')
.replace(/((?<=\/)\/+)|(^\.\/)|((?<=\/)\.\/)/g, '') || '.'
export const win32Join = (...paths) => paths
.join('\\')
.replace(/\//g, '\\')
.replace(/((?<=\\)\\+)|(^\.\\)|((?<=\\)\.\\)/g, '') || '.'
export const join = posixJoin
export default posixJoin