4.0.0 • Published 9 months ago

slash v4.0.0

Weekly downloads
30,526,580
License
MIT
Repository
github
Last release
9 months 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 and don't contain any non-ascii characters.

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

Install

$ npm install slash

Usage

import path from '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-runtime@jest/console@jest/transform@jest/core@jest/reportersbabel-corejest-watch-typeahead@babel/clijest-circusimagemin@lerna/collect-updates@lerna/create@lerna/version@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-hwjamesbussr-admin-bro@roman-hotsiy/redocly-dev-portal@redocly/portal@arifali/bytenode-webpack-plugin@startdt/next-clireact-native-covid-sdkgql_din_modkyle-cli-xh@wepy/cli@whey/gatsby-theme-whey@wessberg/rollup-plugin-ts@wiajs/cli@whitetrefoil/log-utils@wondon/mock@wedgekit/scripts@zilliz/mdtomd@zhansingsong/gulp-path-alias@zkochan/patch-packageadd-name-vue@wundero/bytenode-webpack-plugin@yuandana/react-cli@zebracompany/f_editor@yfwz100/vite-plugin-vue2@ynet-cli/core@yuzhouu/quiet@zatkoa/eslint-config-zatkoa
4.0.0

9 months ago

3.0.0

3 years ago

2.0.0

4 years ago

1.0.0

7 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

9 years ago