5.1.0 • Published 2 years ago

slash v5.1.0

Weekly downloads
30,526,580
License
MIT
Repository
github
Last release
2 years ago

slash

Convert Windows backslash paths to slash paths: foo\\barfoo/bar

Forward-slash paths can be used in Windows as long as they're not extended-length paths.

This was created since the path methods in Node.js outputs \\ paths on Windows.

Install

npm install slash

Usage

import path from 'node:path';
import slash from 'slash';

const string = path.join('foo', 'bar');
// Unix    => foo/bar
// Windows => foo\\bar

slash(string);
// Unix    => foo/bar
// Windows => foo/bar

API

slash(path)

Type: string

Accepts a Windows backslash path and returns a path with forward slashes.

globbyjest-message-utildeljest-resolvebabel-jestjest-runtimejest-config@jest/transform@jest/console@jest/reporters@jest/test-sequencer@jest/corebabel-corejest-watch-typeahead@babel/clilernajest-circusimagemin@lerna/collect-updates@lerna/create@xdn/next@xdn/core@xdn/cli@ilchishin/prisma-generator-nestjs-dto@megasaur/version@megasaur/collect-updates@megasaur/create@megasaur/link@neuvernetzung/cms-cli@zerico/cli@essent/lernaastro-no-undiciarchetype-librarycomponennentt@react-ssr/core@layer0/razzle@layer0/sapper@layer0/core@layer0/fastboot@layer0/sveltekit@layer0/frontity@layer0/next@layer0/clieasy-select-rn@ishopee/clivuedragdropuploadimagesadmin-bro-for-nextwx-fee-clireact-native-bluetooth2killi8n-react-native-fast-image@admin-bro/coreyarn-only-rn-clireact-static-jurosh@lolicon/vuedevtyped-image-modules@closedcollective/huskyrn-send-smsmylicensepatch-package-without-yarnspecify-importsbabel-specify-imports@icanpm/api-masterproject-name-here@arisageha/react-lazyload@arisageha/react-lazyload-fix@jas99/huskyui5-preload@cashremit/cr-streamline-icons@kibalabs/react-staticmatridvin-pg-clipg-cli-serviceadmin-bro-jz@dewen_li/gatsby-theme-bodilessreact-native-template-rfbasedoc-the-libadaption-toolvitepress-dgairscanairscan-examplebb-chatlunchcatreact-native-esc-pos-sahaabkuma-cli@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apimdtomdwi-code-pushtest-aliyun-oss-pluginvite-plugin-broswer-extension@jeiizou/aos-clideneme323112@texttree/demo-bsa-reference-rcl@piyushmishra/critical@kontikijs/cli@fundefund/funde_ck@ntt_app/react-native-custom-notificationwenke-babel-corereact-native-custom-text-hwjames
5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.0

4 years ago

3.0.0

6 years ago

2.0.0

7 years ago

1.0.0

10 years ago

0.1.3

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago