slash-path
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

slash-path

Motivation

It's good or bad practice, but we need to compose file paths uniformly, I need to ignore Windows backslash and adopt Linux forward slash to compose paths to system files and resources.

Description

This library wraps the routes library and exposes the same methods with the slash method, to use slash as the default separator.

Example

// import path from "path";
import path from "slash-path";

const filePath = path.resolve('./file.txt')

console.log('path: ', filePath);
// output
// path: c:/path/to/ptoject/file.txt

Package Sidebar

Install

npm i slash-path

Weekly Downloads

141

Version

0.0.1

License

MIT

Unpacked Size

50.3 kB

Total Files

7

Last publish

Collaborators

  • yracnet