Back to Explore

sindresorhus/slash

GitHub
1 watchersOpen source

Last release:

slash converts Windows backslash paths into forward-slash paths (for example, `foo\bar` becomes `foo/bar`). It is useful when Node.js path methods produce `\\` on Windows and you need consistent slash-separated paths for code, URLs, or other tooling.

Project status

  • The repo appears quiet/dormant, with the latest upstream push and published updates dating to 2023-05-09, which is several years ago relative to today (2026-08-12).
  • Update cadence looks infrequent, with updates spanning 2022-09-27 (v5.0.0), 2023-04-25 (v5.0.1), and 2023-05-09 (v5.1.0), and then no further updates observed.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v5.1.0

    v5.1.0 primarily targets performance improvements. The code change replaces the extended-length Windows path detection regex with a string prefix check, and dev tool dependencies are bumped in package.json.

  • v5.0.1

    Release v5.0.1 updates the TypeScript declaration documentation for slash. The only code change is a modification to the JSDoc comment in index.d.ts, and the package.json version is bumped to 5.0.1.

  • v5.0.0

    v5.0.0 updates the package to require Node.js 14 and changes path handling to remove the previous limitation around non-ASCII characters. The implementation and tests now convert Windows backslash paths even when they contain non-ASCII characters.

    BreakingFeatures
  • v4.0.0

    v4.0.0 modernizes the slash package for Node.js 12+ and converts it to a pure ESM-only module. The implementation is now an ESM default export, and the TypeScript typings and tests were updated accordingly.

    Breaking
  • v3.0.0

    v3.0.0 updates the package to require a newer Node.js runtime. It also adds TypeScript type definitions, improving developer experience for TypeScript users.

    BreakingFeatures